Skip to content
February 24, 2009 / Steven Pousty

VSLive – Building ADO.NET Data Services Applications in .NET3.5

Alright – Andy Conrad giving the talk

Again presenter says to the use the entity framework rather than LINQ. Looks like a Data Service might be good for REST style endpoints. Dave B, would love to hear your thoughts on why this is not a good idea. It seems really easy and REST like from the get go.

Looks pretty darn easy to make an HTTP endpoint for data queries. If you update your tables then you need to update your service description.

Return type is AtomPub or JSON – nice job MS! The URIs are pretty REST like (there you go Sean, your opportunity to taunt me). They have pretty straight forward syntax for querying into the data, filtering, paging, and inline expansion.

Pretty cool that LINQ can talk to the data service – therefore you can use a .NET client and consume one of these services. Really nice, allows for code completion when talking to the service. I could really see using this as a way to allow my WPF fanboys to get what they want but allow me to hit the service with a jQuery HTML page or some actionscript.  Let’s hear it for loose coupling.

The AJAX on codeplex can also talk to these services.

Can I just say at this point that – 3 cheers for the death of WS* – I never liked you and I am glad you are going the way of the dodo.

Where can you put in business logic

  1. as part of DAL (data access layer)
  2. Query Interceptor – intercept the URI and then call the interceptor for queries
  3. Change Interceptor – intercept the URI and then call the interceptor for updates
  4. Service Operations -Basically create your own data objects but then the transactions are handled by the server

Project Azure uses this as well to expose their services.

There is an out of band release this year – CTP availble by end of next month

New features

  1. Count support
  2. Server Driven paging
  3. Enhanced blob support
  4. Friendly feeds – addresses some issues in atompub
  5. binding support – WPF and Silverlight
  6. more…

They are following transparent design and they are named project astoria. Go to their blog at and see what comes out of each meeting and give feedback

My Question – so which MS way to build a REST like service?

GOOD for existing sources where you don’t want to right a lot of code – not really service oriented. More for exposing data without the business logic. WCF is more for when you need a service on top of the data to do a bunch of business logic. WCF also doesn’t have client libraries for binding through linq.

There are still some pain-points that you have to work around – coming in part 2 of the talk

Interesting side note – most of the performance bottlenecks is the network, even if they tuned it up another 500x they are still basically limited transfering the data and making the connection.

Accept header is how you specify JSON versus AtomPub as the response or on the server in the config.

Overall this is really an intersting technology – nice way to go from DB to REST type service. I could see using this and I am also in Dave B’s critique of WCF and comparing it to a generic handler versus MVC.


Leave a Reply

Fill in your details below or click an icon to log in: 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: