Towards More ReUse in SharePoint
Towards More ReUse in SharePoint
Trying to enhance the ReUse in your daily work, Microsoft Practices has developed what is so called SharePoint Guidance or Developing Applications for SharePoint 2010. This guidance has a ready code for you to ReUse.
What is it?
The SharePoint Guidance Library is a collection of reusable
code-based utilities that address common challenges in application development
for the SharePoint platform.
What is there to ReUse?
ReUse |
Description |
List aggregation within a site collection |
Effective use of feature partitioning for reliable solution deployment. Using query objects to retrieve data from multiple lists. Using the model-view-presenter pattern in a Web Part to isolate business logic from the presentation layer and the underlying data source. Using constructor injection patterns to isolate business logic from dependencies. Using an exception shielding pattern to stop unhandled Web Part errors from preventing the host page from loading. |
The Application Setting Manager |
The Application Setting Manager is a set of utility classes that you can use to store and retrieve configuration settings for your SharePoint applications. |
The SharePoint Logger |
The SharePoint Logger is a reusable component that you can use to write messages to the Windows event logs and the ULS trace log. |
The Service Locator |
Pattern allows you to request an implementation of an interface without knowing the details of the implementation. As such, you can replace dependencies with alternative implementations or mock implementations without editing or recompiling your code. |
Model-View-Presenter (MVP) |
Pattern allows you to isolate the business logic in your application from the user interface. As such, you can test the business logic in isolation. You can also make the business logic easier to understand and maintain by removing user interface–specific implementation details. |
Repository |
Pattern allows you to isolate the data access code in your application from the business logic. You can use the Repository pattern to wrap any data source, such as a database or a SharePoint list. This allows you to test the data access code in isolation and to substitute the data access implementation to unit test your business logic. |
Configuration |
You can use the following mechanisms to manage configuration information within the SharePoint environment:
|
List aggregation with supplemental data from a CRM system |
Creating, deploying, and registering a full-trust proxy. Consuming a full-trust proxy from sandboxed code. Deploying pages and client-side scripts to the sandbox environment. Launching pages as modal dialogs from the sandbox environment. |
Interaction with external data from sandboxed Web Parts |
Creating and consuming external lists from a sandboxed solution. Creating and managing external content types in the Business Data Connectivity (BDC) service application. Configuring the Secure Store Service (SSS) to enable sandboxed code to impersonate credentials for external data sources. |
Deployment of declarative workflows with custom full-trust activities and custom sandboxed actions |
Creating and deploying full-trust workflow activities. Creating and deploying sandboxed workflow actions. Consuming custom activities and sandboxed actions from a declarative workflow. |
Aggregation of data from multiple site collections using a timer job |
Creating, deploying, and registering a timer job. Managing configuration data for timer jobs. Deploying custom application pages to the central administration Web site. |
Modeling application data with standard SharePoint Lists |
Modeling data with lists, including many-to-many relationships. Using Lookup fields and list relationships. Using LINQ to SharePoint for list access. |
Modeling application data with an external data source and consuming the data in SharePoint |
Connecting to a database with Business Connectivity Services (BCS). Modeling many-to-many relationships with BCS. Using the BCS API to access external data. Using the Business Data Web Parts to access external data. Representing associations between entities using stored procedures. Integrating to external data sources using a .NET Connectivity Assembly. |
Using rich internet application (RIA) with SharePoint |
Using the Client-Side Object Model (CSOM) from Silverlight and JavaScript. Using REST Services from Silverlight and JavaScript. Using the Model-View-ViewModel pattern with Silverlight. Accessing non-SharePoint services using Silverlight. Accessing binary data with Silverlight. Accessing SharePoint Web Services from Silverlight. |