Evolutions in the SharePoint Platform for Developers

SharePoint 2007 grew in leaps and bounds over SharePoint 2003 and became recognized as a versatile and powerful development platform, but there were still limitations in the areas of security, portability, performance, reliability, and features. With SharePoint 2010, the bar has been raised yet again. The latest iteration of the SharePoint platform has too many enhancements to cover in a single chapter, but some of the highlights are covered in this section, along with a summary of enhancements in Designer 2010 and Visual Studio 2010.

SharePoint 2010 provides a powerful new client object model that is formally defined as the SharePoint Foundation 2010 Managed Client Object Model, or simply the client object model. The client object model allows code that runs remotely or directly on the server to consume SharePoint objects, methods, lists, and libraries using a referenced DLL instead of referenced web service calls. Previously, web services needed to be used to remotely interact with SharePoint lists and other features, or server-side code such as console applications or timer jobs would need to be written.

The new client object model enables the development of rich client applications based on the Microsoft .NET Framework providing for feature-rich web parts, console applications, Microsoft Silverlight applications, and ECMAScript (JavaScript, JScript) applications that run client-side or in a SharePoint Web Part. An added value of the new client object model is the inclusion of the familiar intellisense in Visual Studio that developers have grown used to. This allows developers to rapidly develop applications and utilities that remotely access SharePoint, and developers will quickly recognize the benefit of having the object-aware intellisense that allows for familiar interactions with SharePoint objects without having to learn the complicated web service endpoints included with SharePoint 2003 and SharePoint 2007. Furthermore, web service endpoints of SharePoint 2003 and SharePoint 2007 required more of a steady hand for dealing with failed events.

When using the client object model, applications can use CAML or LINQ to query content from SharePoint lists and libraries, create client objects, and persist those objects back to SharePoint. In addition, items may be deleted, updated, and checked in/out as needed. Lists, library sites, and even the farm can be queried for schema information, and many administrative tasks can be carried out using the object model.

SharePoint 2010 also supports a powerful feature that used to be reserved only for database applications: LINQ. LINQ enables developers to access SharePoint fields in lists and libraries as if they are strongly typed objects. An example later in the chapter demonstrates how to use LINQ to query data for a visual web part. In addition to the base features of the .NET Framework, SharePoint 2010 also leverages Windows Workflow Foundation, a powerful business process management engine seamlessly integrated into SharePoint for the development of advanced state applications. Visual Studio 2010 provides the project templates necessary to create sequential and state machine workflows and now supports their full development life cycle from development, to testing, to deployment, to packaging.

Note

A state machine workflow is a workflow associated with a SharePoint list item or document that can enter different states in any order. For example, a purchase order may have five states, such as Not Submitted, Submitted, Pending, Approved, and Completed. A state machine workflow, unlike a sequential workflow, enables the item to be routed and rerouted to each state as needed.

To make the development process more seamless and intuitive, Visual Studio 2010 now contains a variety of templates built in with no need to install the Visual Studio Extensions for SharePoint to start with SharePoint development. Some of the new templates include site definitions, business data connectivity models, event receivers, and modules. Coupled with the new deployment features, developers are provided with the entire framework and are simply required to produce the code for the desired solution.

REST (Representational State Transfer) APIs included in SharePoint 2010 are standard web service interfaces that enable the development of HTTP-based applications. REST is essentially a client-server request using HTTP to retrieve or send information and can be leveraged in Visual Studio projects.

Finally, because development servers are not always available and code often needs to be tested in a staging environment, SharePoint 2010 now supports sandboxed solutions. A sandboxed solution is deployed directly to SharePoint 2010 and trusted to run within the context of a web application without having to trust the assembly in the web.config. This has important implications for SharePoint customers whose SharePoint implementation is running in a hosted environment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset