Thursday, September 20, 2012

Disadvantages of CAML over LINQ in SharePoint 2010

In this article we will discuss disadvantages of CAML over LINQ in SharePoint 2010.
Disadvantages of CAML:

- Since CAML query is text based, If you are joining two lists accross a lookup field there may be various problems.

you do not know until run time if the query is written correctly. If the query is not correct, then it will simply fail at run time.

- It has no IntelliSense support at design time.

When writing the query, you have no idea what CAML elements are legal in the syntax without having a reference open.

- The query is difficult to read. You cannot determine easily what the query is doing and what lists are being joined.

- The data returned from the query is placed in a SPListItem collection, which does not provide strongly typed business entities.

No comments:

Post a Comment