Sharepoint 2010 Data technologies

Sharepoint 2010 Data technologies
4 votes, 4.00 avg. rating (82% score)

Introduction

Eventually we can split SharePoint into two simplest layers, one data layer and another UI layer which displays the data.
We will have an overview of what are the technologies, we have with SharePoint 2010 to display data from the data layer.OfCourse, data layer of SharePoint is nothing but the SqlDatabase. But, remember its complex and not just writing a simple sql query for retrieving the data.
We will now see at highlevel what are the available technologies that SharePoint 2010 has to interact with actual data in it along with advantages and disadvantages of the underlying data technology.

I don’t want people get confused with various technical terms and where they are literally sitting in the framework. Hope, this overview gives what the technologies we have with data and no more confusion. Atleast we can know what best suits our purpose.

LINQ

The common way to get the SharePoint data is use CAML which is not strongly typed or is part of API where we can check the errors during compile time.
SharePoint 2010 introduces SharePoint LINQ (SPLINQ). LINQ help us to write queries gainst SharePoint in a strongly typed way with IntelliSense and compile-time checking. Internally,SharePoint LINQ provider translates LINQ query into a CAML query and executes it against the server.

One tool I have checked to work on LINQ queries generation is LinqPad. I hope, it will help you when working on LINQ.

Advantages

LINQ is Entity-based programming
Its a Strongly typed language
It Supports joins and projections
It will be part of API and supports IntelliSense

Dis Advantages

Ofcourse, it is used in Server-side only
As it is new API, we have to learn it as a new skill
We use SPMetal tool to generate preprocessed list object structure. If there is any change in the list, we have to do relevant code changes and deploy it again.


Server Object Model

Almost everyone are familiar with server object model usage. Its the first one that came up with SharePoint evolution to interact with the data and still its the best common way used by any.

Advantages

Its familiar API
We can do almost everything (ofcourse with having permission)

Dis Advantages

It is Server-side only


Client Object Model

If we consider SharePoint 2007, working on client side means working with webservice API.
Now, SharePoint 2010 came up with better API to work from client side. It has literally two object models.
One is Managed Object Model that can be used in server side(Ex: c#) and other is ECMAScript/JavaScript with JSON response
References:
Using client object model in server side
Using client object model in client side(ECMAScript)

Advantages

It can be used as server side programming
It is easier than web services API
It also works in Silverlight, JavaScript, and .NET
It is more than just list data

Dis Advantages

Of Course, it is new API and takes time to get familar
It is weakly typed


REST

With SharePoint 2010, we can program against SharePoint list data and Excel Services using Representational State Transfer (REST).SharePoint REST services are implemented using the ADO.NET Data Services.
REST provides URL-accessible functionality, so we can query, create, and delete lists and items using just the standard HTTP protocol.
Reference : Using REST interface

Advantages

It is has URL-based commands
It is strongly typed

Dis Advantages

It only works with SharePoint lists and Excel


Webservice API

We still have the webservice API to interact with SharePoint data. But, I always suggest taking advantage of latest technology. So, instead of using webservice API use client object model.


Coclusion

Hope we got good highlevel understanding on SharePoint 2010 data technologies

April 22, 2012 В· Adi В· 2 Comments
Tags: , , , ,  В· Posted in: Client Object Model, LINQ, REST Interface, Sharepoint 2010

2 Responses

  1. Khilitchandra Prajapati - April 22, 2012

    Good one adi. Keep it up :)

  2. Adi - April 22, 2012

    Thanks Khilit

Leave a Reply

What is 2 + 15 ?
Please leave these two fields as-is:
IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)