Actions Come to WCF Data Services
There's a great tutorial already available on a new update that Microsoft is making to the Windows Communication Framework. WCF is getting support for "Actions":
The tutorial on this new feature, which is useful to you Windows Phone developers out there as well, will take you through, Using WCF Data Services to Invoke an Action, Setting up a WCF Data Service with Actions, and the features that are coming soon.
Source: http://blogs.msdn.com/b/astoriateam/archive/2011/10/17/actions-in-wcf-data-services.aspx
The October 2011 CTP of WCF Data Services adds powerful, but incomplete support for Actions. The motivation behind Actions stems from wanting to advertise in an OData entry an invocable ‘Action’ that has a side-effect on the OData service.
Actions will provide a way to inject behaviors into an otherwise data-centric model without confusing the data aspects of the model, while still staying true to the resource oriented underpinnings of OData.
--dpblogs, MSDN
The tutorial on this new feature, which is useful to you Windows Phone developers out there as well, will take you through, Using WCF Data Services to Invoke an Action, Setting up a WCF Data Service with Actions, and the features that are coming soon.
Source: http://blogs.msdn.com/b/astoriateam/archive/2011/10/17/actions-in-wcf-data-services.aspx
Tags:






Comments
Schlacter Adam replied on Sat, 2012/04/14 - 3:17am
The example '/GetMoviesbyGenre' is an RPC. So using actions in this way is not in the least bit RESTful. Actions can be RESTful, but only if they apply to a set of URIs as part of the uniform interface constraint. If a subset of your URIs are for resources that all support the same set of actions for their lifecycle, then actions could be used in a RESTful way. Unfortunately, the example you give is exactly the opposite. Instead of the RPC, a RESTful interface would use GET on /Movies?genre='comedy' which of course doesn't need actions.