Mike Taulty's Blog
Bits and Bytes from Microsoft UK
WCF DataServices & the Processing Pipeline?

Blogs

Mike Taulty's Blog

Elsewhere

I spent quite a lot of time with WCF Data Services (‘Astoria’/’ADO.NET Data Services’ as it was) in its first iteration.

It’s a framework that I really like so I’m feeling a little guilty that I haven’t found time to completely revisit it as it becomes part of a ‘much bigger thing’ (i.e. OData) and as it got rev’d in .NET 4.0 and (from a client perspective) Silverlight 4.

I have been doing some of that revisiting in a piecemeal fashion though and there’s good material out there. For instance I came across articles such as Elisa’s and the main MSDN library page which give you enhancements such as;

  • the DataServiceCollection<T> type on the client side to do a tonne of binding goodness and auto-change tracking
  • server driven paging
  • obtaining a total row count for an entity set either with the data or on its own as a separate piece of data
  • client side projections (i.e. selecting just the columns of data that you want)
  • more flexibility around how you plug in your server side data in order so that you can expose;
    • Entity Framework (EDM) models
    • Reflection based models for LINQ to SQL and any other custom model where you know the “shape” of the model at compile time and can apply attributes to the codebase for the Reflection provider
    • Non-reflection based models including dynamic models via the new interfaces
  • improvements around BLOB support

But I realised that I missed something today when I was casting my eye over this great series of posts;

and I spotted something that I didn’t know about.

I had previously seen that you could hook into the Data Services client side pipeline – that is that the DataServiceContext supports a SendingRequest event that you could use to plug in to ( e.g. the article plugs in and adds an authorization header ).

But what I hadn’t previously seen that you could hook into the Data Services service side pipeline – that the DataService<T> has a property on it called ProcessingPipeline of type ProcessingPipeline with events for [Processing/Processed]Request and [Processing/Processed]Changeset.

I knew that you could write Query and Change interceptors but I had hoped for something more generic and I’d written back in 2008 that I was having trouble because;

“So far, I've not found any place to centralise this code and hook into the dispatch mechanism that Data Services is using”

Well – it looks like that centralised place is there in Data Services in .NET 4.0 and there’s a place to plug in code to the pipeline on the server – very glad to see it Smile

Now…back to that set of articles…


Posted Tue, Jul 20 2010 12:30 AM by mtaulty

Comments

Matt Phillips wrote re: WCF DataServices & the Processing Pipeline?
on Thu, Jul 22 2010 3:46 PM

Those OData posts are /not/ great:

- Don't make it clear what version they are talking about

- Are buried in a blog and not in MSDN proper

- They just briefle list technical stuff. They don't tell you wnat to /do/. Why doesn't MS tell us once instead of thousands of us having to wotk it out. For example, I have a WPF OData 3.5 SP1 client. What do I /do/ to implement SSO?

Matt

mtaulty wrote re: WCF DataServices & the Processing Pipeline?
on Fri, Jul 23 2010 11:48 PM

Matt,

In terms of versions - I've just been looking at the posts and they seem fairly clear when they are talking about the full .NET framework verses Silverlight 3 and 4.

I agree though that with the full .NET framework versions they're not very explicit whether 4.0 is required or not.

In terms of blogs/MSDN - yes, understand although that particular blog is no doubt linked to from the MSDN centre for data developers anyway and blogs are pretty searchable.

Can you be more specific about what you want when you say "I want to implement SSO?"

Mike.

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?