Jaap Vossers' SharePoint Blog

Just another WordPress.com site

Archive for October 2009

A developer’s thoughts on the Microsoft SharePoint Conference 2009 in Las Vegas

with 5 comments

After having attended the Microsoft SharePoint Conference in Las Vegas last week, I decided to write a blog post in which I will summarise my thoughts on SPC09 and SharePoint 2010 from a Developer point of view.

The majority of the sessions I attended were developer-oriented sessions.  There are so many new promising features that will greatly increase developer productivity.  I seriously can’t wait to start my first SharePoint 2010 project!

Let’s just walk through some of the new features that I think are most promising.

Client Object Model

The Client Object Model is a richer alternative to the already existing SharePoint web services. Before SharePoint 2010, anyone writing code that would run somewhere else then on the actual SharePoint server could not use the Server Object model but instead had to rely on using the SharePoint web services.  If you knew how to use the Server Object model, that didn’t necessarily mean you knew how to deal with the web services, since they are so different!

SharePoint 2010 Introduces the Client Object Model which comes in three flavours: Javascript, .NET CLR and Silverlight. It basically means that your code can call into the Client Object Model, which exposes a programming interface that is very similar to the Server Object model programming interface. The idea is that you can apply your knowledge of the Server Object Model to the Client Object Model.

I am particularly looking forward to using the Javascript Client Object Model, combined with jQuery. Any half-decent developer will now be able to build rich, AJAX-enabled UI’s in SharePoint 2010 without too much effort.

REST API

The REST API is another feature that will simplify the process of consuming data from client applications by exposing a very simple HTTP based interface. It basically allows you to fetch or update/insert/delete data in SharePoint. You can specify what data you want to work with by constructing a url that SharePoint understands. The url will include parameters for the web, the list and possibly a filter that SharePoint will use to scope the operation to. If you are simply performing a fetch of the data, the server will return XML or JSON (depending on what you asked for by adding the right HTTP header to your request) for you to consume in your client application.

Again something that will be very useful in a javascript client, with or without jQuery, as you can perform AJAX requests in the background to fetch or modify data. Fetched data returned as JSON can easily be converted into javascript objects for further consumption in your javascript code.

For .NET clients there is a thing called ADO.NET Data Services which allows you to create DataSources that point to a REST url, which can then be used as the DataSource for databound controls. One of the sessions at SPC09 demonstrated how easy it is to set up a grid with insert/update/delete support, simply by binding it to such a datasource. Amazing!

SPMetal + LINQ

Cool! Now you won’t have to write those pesky CAML queries anymore AND you won’t have to access SPListItem field values through an indexer that returns an object that isn’t strongly typed – which in turn means that you don’t have to perform any casting anymore. Querying is now done via LINQ, which I am sure you have heard of before. You can actually perform inner joins in LINQ allowing you to use only one query to return all Employee items where Employee.Company.CompanyName == “Microsoft”. In SharePoint 2007 you need to perform two separate queries to achieve this. I am curious how this works under the hood. My understanding is that your LINQ query is translated to a CAML query which is then executed. If that’s true then presumably they have extended the CAML query schema to support JOINs. Does anyone have an answer to this?

SPMetal is the commandline tool that generates the classes to support LINQ Querying and strongly typed access to properties of an SPListItem.

Business Connectivity Services

This is the replacement for Business Data Catalog. It allows you to write data access code which can be used to connect alternative data source to SharePoint lists. SharePoint users won’t even notice that the “list data” they are working with is in fact stored somewhere else.

I really hope my code can access this external data as if it was contained in a standard SharePoint list, for example by using the SPList and SPListItem classes or performing LINQ queries. Does anyone have an answer to this?

Developer Dashboard

The developer dashboard helps developers with identifying poorly performing code by having diagnostic information related to your current request printed on the page. It is similar to the ASP.NET trace information, but more SharePoint-specific. It prints processing time for Web Parts (allowing you to instantly spot which one is causing the page to be so slow) and even processing time for the underlying Stored Procedures that are executed by SharePoint!

PowerShell

PowerShell is the new STSADM for SharePoint. Microsoft has invested heavily in PowerShell support for SharePoint by providing hundreds new SharePoint-specific Cmdlets! Looks very promising. I have this PowerShell book somewhere – I think I will pick it up again soon!

Visual Studio integration

Visual Studio 2010 integration for SharePoint 2010 development has strongly improved. I must say that for some reason I had assumed Microsoft would provide this level of integration when MOSS 2007 came out a few years ago (wishful thinking), but unfortunately we’ve had to depend on third party tools like WSPBuilder to produce our deployment artifacts. I guess it was necessary for us to go through this pain in order for us to be able to appreciate what’s coming our way now!

Custom Service Applications

There is no such thing as an SSP in SharePoint 2010. Instead there is a collection of Services Applications, to which you can add your own custom Service Application. The main focus lies on scalability – it supports load balancing and you can decide which servers in the farm will run your custom Service Application.

It is very important to plan properly and decide whether a custom Service Application is the right solution to your problem. Developing custom Service Applications might well be the most complex subject within SharePoint Development.

Written by jvossers

October 30, 2009 at 1:09 pm