CAML.NET intellisense for SharePoint 2010

The CAML.NET IntelliSense extensions for Visual Studio 2010 is simply a must-have for SharePoint developers. It can help you tame that sometimes finicky, but ever-so-essential CAML language we all know and love.

You probably already know how to add the out-of-the-box SharePoint schemas to Visual Studio so you get IntelliSense when editing your CAML files.

This is a good first step, but CAML.NET Intellisense takes it even further by adding the following enhancements:

  • Extends the default schema files with detailed annotations imported directly from the SharePoint SDK documentation.
  • Adds a custom WPF IntelliSense Presenter to the Visual Studio environment for a greatly enhanced developer experience.
  • Automatically detects and downloads schema updates so you are always working with the most current information available.
  • Links directly to the online SDK documentation for the currently visible element, so you can “drill down” into the documentation with a single click.

Let’s face it – even with an up to date set of bookmarks, who wants to go searching all over the place for that missing tidbit that tells you just what that obscure attribute is for when you’re right in the middle of building the CAML for your spiffy new feature?

Annotated Schemas for Richer Intellisense

The main idea behind CAML.NET Intellisense is to extend the core WSS schemas in two ways:

  1. Add as much information as possible about each element and attribute using xs:annotation elements so that it pops up in context while editing; and
  2. Identify and replace xs:string types in the schema with enumerated types so that the valid values for each attribute also popup in context while editing.

For example, using the out-of-the-box WSS schema that ships with SharePoint 2010, you get a drop-down like the following when editing a Featureelement:

Rudimentary Intellisense for CAML editing

That’s better than nothing, of course, but it doesn’t say anything about what each Feature attribute is for, so unless you’re already familiar with it, you’d have to refer back to the SDK either online or in the CHM file. Kind of a drag, since you’ve got the list of valid attributes right in front of you. If you’re like most developers, this can be a real distraction because you tend to get lost in the details while searching for the information online when you should be busy coding your solution.

Instead, by using the annotated WSS schema provided by CAML.NET Intellisense, you can see the information you need in context. You only have to refer to the SDK documentation when you really need to learn more about the topic. Most of the time, you just need a hint, which is what Intellisense is all about, right?

New Enhanced IntelliSense Presenter

With all of the great new WPF-based enhancements that Microsoft has added to the Visual Studio 2010 user experience, why not take advantage of the improved extensibility layer and add a custom IntelliSense Presenter just for SharePoint? After all, some of the SDK descriptions of CAML elements are rather lengthy and get kind of hard to read in just a single line of text.

The CAML.NET Intellisense Presenter gives you a nifty way to get all that WPF goodness right where you need it most. Here’s an example of what you get while adding a FieldRef element to a ContentType:

Editing a FieldRef Element

Extending the Core Schemas with Enumerated Types

In addition to annotating the schemas with the corresponding SDK documentation for each element, we can go one step further and change the plain vanilla xs:string types to custom enumerated types so we get the list of valid choices for the attribute values. This comes in very handy and also helps to eliminate those nasty little typos that can be *really* hard to find (and the SharePoint CAML gets mighty snippy about).

There are lots of places in the SDK documentation where the expected attribute values are listed in the description, but are not enumerated in the schema. This again means that you’d have to go digging through the documentation to discover what SharePoint expects the attribute values to be. This can be an enormous waste of time – even if you have a pretty good idea of what the values are. Who can keep all that detail in their head?

So, CAML.NET Intellisense enumerates as many attribute values as possible so they are available at your fingertips when you need them. Each enumeration is also annotated, so you get contextual help for the available values.

Here’s another example that shows the enumeration of list template types when adding a ListInstance element to a Feature. This can be a huge time saver! How many times have you had to hunt down the table of available list template type identifiers?


Link Back to the SDK Whenever You Need To

Microsoft has invested heavily in new and improved online SDK documentation, so why not link back directly to the SDK so you can drill down whenever you need to? Sometimes you just need a little hint, but at other times, you need more detail. CAML.NET Intellisense gives you the best of both worlds. Simply click the magnifying glass in the top right corner. If there is an SDK topic for the current item, it is displayed in the Web Browser tool window. If not, then CAML.NET Intellisense executes a web search for more information about the item being displayed.

MSDN Search

Stay Up To Date on the Latest Best Practices

As we all know, things change fast in our industry.  There are always new ideas, new approaches to stay on top of, new techniques for dealing with the many issues that can arise unexpectedly.  With CAML.NET Intellisense installed, your customized SharePoint schema files are updated automatically, so you can stay up to date on the latest best practices for your SharePoint development.  We regularly scan the SharePoint SDK and online SharePoint community resources for any information that can help to clarify and add critical details for as many CAML tags and attributes as possible.  This makes it easier for you to find the information you need, literally right at your fingertips.

Professional Tools for Professional SharePoint Developers

Did I mention it’s FREE? Free as the desert sand! Free as the wind in your CAML’s hair as you ride swiftly into the night!

Download your copy today, and start coding faster. Code better.

Like a dromedary!


Tags: , , , ,

Leave a Reply

Please log in using one of these methods to post your comment: Logo

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: