Home > Best Practices, Development, SharePoint Server 2010 > Approaches to Access SharePoint Data Programmatically (Part 1)

Approaches to Access SharePoint Data Programmatically (Part 1)

Microsoft SharePoint Server 2010 introduces several new approaches to interact with SharePoint Data . LINQ to SharePoint feature allow to build complex query with user friendly LINQ syntax , also both CAML and LINQ to SharePoint support join predictae in queries.one of major evolutions in SharePoint 2010 is the blurring of the distinction, between internal and external data.we can use many of the same techniques to query extenal data.

Key Approaches to Data Access

SharePoint 2010 introduces 3 key approaches to query data :CAML queries, LINQ to SharePoint, and BCS object model.

1- CAML queries

SPQuery and SPSiteDataQuery classes support submitting queries in CAML syntacs, in SharePoint 2010 CAML support JOIN predicate in queries ,also SPQuery class is using to query external list and the result are non-type items.

2- LINQ to SharePoint

SharePoint 2010 allows you to use LINQ queries to perform data operations on SharePoint Data. LINQ to SharePoint works against strongly typed entities . There is a command-line tool in SharePoint 2010 called SPMETAL that we can use to generate thses entities. internally , the LINQ to SharePoint provider generates the underlying CAML queries that perform data operations.

3-Business Connectivity services (BCS) object model

BCS object model enable us to ineract with external data .

In Next Part (Part 2), i’ll explain Query Classes (SPSiteDataQuery and SPQuery classes ) in details and what are the best practices of using these classes .

 

the following screenshot is taken from MSDN , this screenshot illustrate the usage of using each of Queries classes , LINQ to SharePoint , and BCS Object Model

references :-

http://msdn.microsoft.com/en-us/library/ff798432

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: