When developing solutions for SharePoint 2010 there are 3 primary options for development. These options are as follows:
- Farm
- Sandbox
- Client Object Model (Managed, Silverlight, and Javascript)
It’s great that we’ve been provided options, however with these options we’re also presented with a choice. And in my opinion you should choose wisely, because each option provides some advances and disadvantages.
Because of these distinctions and my own growing pains, I thought I would share what I’ve learned.
Option #1: Farm Solutions:
A farm solution is a solution which gets deployed to the server environment. These solutions essentially provide you with access to anything in the environment. This was our only option prior to SharePoint 2010.
-Advantages:
- Unrestricted access to SharePoint resources
- Easiest to troubleshoot and debug
- Can be scoped and made available to Farm, Web Application, Site Collection, and Web
-Disadvantages:
- Must be deployed to server environment by Farm Administrator
- When deployed to the GAC, code runs unrestricted
- Some solutions require an IIS reset to take affect
- Cannot be used in SharePoint Online (Office 365)
-Recommended Use:
- Visual Web Parts
- State Machine and Sequential Workflows
- Timer Jobs
- Sending Custom Emails
- Custom Actions which utilize compiled code
- Custom solutions which access a database
- Custom solutions which access server information
Option #2: Sandbox Solutions:
A sandbox solution is a solution which is deployed to the Site Collection Solutions Gallery. These are a new addition to SharePoint 2010 which provide you access to resources within the current site collection. This option is very useful for individuals who are familiar with the SharePoint Object Model and are not allowed to deploy to the Farm.
-Advantages:
- Easy development of solutions using SharePoint Object Model
- Only need site collection administrator to deploy to site collection
- Runs within restricted worker process which ensures integrity of SharePoint environment
-Disadvantages:
- No access to data within other site collections
- No access to data from other external sources
- No access to Script Manager, which means no UpdatePanel
- Restricted subset of solution types
- Runs within separate worker process which can have issues (a lot of issues in my experience)
-Recommended Use:
- Simple Web Parts
- Deploying Branding to a site collection
- Custom Declarative Workflow Actions
- Custom solutions which utilize SDK’s which are not accessible through client technologies such as OpenXML
Option #3: Client Object Model:
A Client Object Model solution is a solution which utilizes client technologies to access SharePoint and External data. These types of solutions can be built using the Managed Client Object Model, the Silverlight Client Object Model, or the Javascript Object Model. Given that these use specialized client technologies, I will outline each of these below in their own sections.
Managed Client Object Model:
A Managed Client Object Model solution is a solution which uses the client object model framework and is accessed using a .NET solution. These kinds of solutions would be generally built into Console Apps or Windows Forms Apps. They essentially give you the ability to access SharePoint data from outside the browser.
-Advantages:
- Provides out of browser access to SharePoint data
- Can tie into windows applications
-Disadvantages:
- Requires using new Client object model syntax
- Accessing authenticated data may require credentials to be configured
- Cannot access in browser
-Recommended Use:
- If for some reason you need to access SharePoint data from out of the browser
- For those who are more familiar with client windows technologies
Silverlight Client Object Model:
A Silverlight Client Object Model solution is a solution which uses the client object model framework and is accessed using a Silverlight solution. This type of solution is best for someone who is looking to take advantage of the rich visual affects of Silverlight.
-Advantages:
- Rich Silverlight API
- Asynchronous loading
- Access to other site collections in SharePoint
- Access to external data through Web Services
-Disadvantages:
- Not recommended for internet sites because not everyone has the Silverlight Client installed
- Requires using new Client object model syntax
- Changes to the solution requires recompiling of XAP package
- Can be difficult to debug
-Recommended Use:
- Creating anything visual like Charts, Slideshows, Child Windows, etc
- Improving page load times by offloading to client side
- Displaying information from any site collection
- Displaying information from external sites
Javascript Object Model (My New Favorite):
A Javascript Object Model solution is a solution which uses the client object model framework and is accessed using Javascript. This solution type is great for web designers that are not experience with object oriented technologies like C#.
-Advantages:
- Javascript is an accepted standard used in all modern browsers
- Asynchronous loading
- No compiling necessary to write code
- jQuery integration!
-Disadvantages:
- Can only access the current site collection
- Requires using new Client object model syntax
- Very difficult to debug
- Very little documentation online (in my experience at least)
-Recommended Use:
- Creating solutions which can be easily modified by most web designers
- Improving page load times by offloading to client side
So those are essentially my thoughts on the primary options that are out there. Hopefully this has been helpful
No comments:
Post a Comment