Partilhar via


Announcing WCF Data Services Oct 2011 CTP for .NET 4 and Silverlight 4

 

 

I’m very excited to announce the release of the October 2011 CTP of the next version of WCF Data Services libraries. This release includes libraries for .NET 4 and Silverlight 4 with new client and server features in addition to those included in our last October 2010, March 2011 and June 2011 CTPs.

Below is a brief summary of the features available in this CTP. Subsequent blog posts will discuss each feature in more detail and provide examples of how to use each.

Actions:

The inability to kick-off a (non-CRUD) related server process via an OData hypermedia action was an omission somewhat mitigated by low-fidelity workarounds, such as modeling hypermedia actions as entities. Actions will provide an ROA-underpinned means to inject behaviors into an otherwise data-centric model without obfuscating its data aspects, and (like navigation properties) will be advertised in the payload.

This CTP supports invoking ServiceOperation via handcrafted URL parameters, and also enables invoking parameterless actions that can return void, a single object, or a collection of objects in JSON or ATOM format.

Though this release contains the lower layers of Actions support, which enables custom OData providers to use them, it doesn’t yet enable Actions over EF-Provider out-of-box; a refresh of WCF Data Services succeeding the release of the next Entity/.NET Framework will enable this natively.

Spatial:

The ubiquity of location-aware devices demands a data type suited to communicating geospatial data, so this CTP delivers 16 new spatial OData primitives and some corresponding operations which data consumers can perform on spatial values in filter, select, and orderby clauses.

Spatial primitives follow the OGC’s Simple Features standard, but unlike other primitives, the associated operation set is extensible, which allows some servers to expose deep algorithms for powerful functionality while other servers expose only basic operations. Since the server advertises these advanced capabilities via the Actions feature, they’re discoverable by generic clients.

This CTP allows addition of spatial type properties to models via both Reflection and Custom Service Providers (EF-based services don’t yet support spatial properties), and read/write support (in ATOM or JSON formats) for all spatial types supported by SQL Server 2008 R2. The release also enables querying for all entities ordered/filtered by distance to a location, with all code running server-side; i.e. find all coffee shops near me.

Though this release contains the lower layers of Spatial support, which enables custom OData providers to use them, it doesn’t yet enable Spatial properties over EF-based Services out-of-box; a refresh of WCF Data Services succeeding the release of the next Entity/.NET Framework will enable this natively.

Vocabularies:

Those from the Linked Data and RDF worlds will feel at home with Vocabularies, but for those unfamiliar with the idea, a Vocabulary is a collection of terms sharing a namespace, and a term is a metadata extension with an optional value expression that’s applicable to arbitrary Entity Data Models (EDMs). Terms allow data producers to specify how data consumers can richly interpret and handle data. A simple vocabulary might indicate a property’s acceptable value range, whereas a complex vocabulary might specify how to convert an OData person entity into a vCard entity.

This CTP allows data service authors to configure the service for annotation through annotation files and serve a $metadata endpoint enriched with terms.

ODataLib:

The ODataLib .NET client and server libraries allow flexible low-level serialization/deserialization according to the OData Protocol Specifications.

With the exception of $batch, ODataLib now supports deserialization of all OData constructs in addition to the last CTP’s serialization support. Furthermore, ODataLib now ships with EdmLib, a new in-memory metadata system that makes it easy to build an EDM Model of a service for OData serialization/deserialization.

Frequently Asked Questions

Q1: What are the prerequisites?

A1: See the download center page for a list of prerequisites, supported operating systems, etc.

Q2: Does this CTP install side-by-side with previously released CTPs (March & June) that are currently on my development machine?

A2: No, Installation of this CTP will result in setup automatically uninstalling previously installed CTPs, if any are, installed on the machine.

Q3: Does this CTP install side-by-side with the .NET 4 and Silverlight 4 versions that are currently on my development machine?

A3: By in large this install is side-by-side with existing .NET4 and SL4 bits; however, that was not possible in all cases so some VS files will be modified by the CTP installer to enable the Add Service Reference gesture in Visual Studio 2010 to make use of the new features in this CTP. The files should be replaced to their original state during uninstall of this CTP.

Q4: Does this CTP include support for Windows Phone 7?

A: No, you can download the Windows Phone 7 SDK, which includes the OData client, from here. The Windows Phone 7 client does not yet support new features (Spatial, Actions etc.)

Known Issues, Limitations, and Workarounds

Incorrect reference to Data Services assembly in a project after adding WCF Data Services item template in Visual Studio Express:

After adding a WCF Data Services item template to a Data Services server project, the project will have a reference to System.Data.Services.dll from .NET Framework 4. You will need to remove that reference and replace it with a reference to Microsoft.Data.Services.dll from the bin\.NETFramework directory in the Data Services June October CTP installation directory (by default, it is at %programfiles%\Microsoft Data Services June 2011 CTP) and add references to Microsoft.Data.OData.dll and System.Spatial.dll.


Using add service reference in an website project results in .NET Framework 4 client-side code being generated instead of the expected October CTP 2011 code generation:

Add service reference for website projects is not supported for this CTP. This issue should be resolved by next public release.


Custom element annotation support in OData Library:

There is no support for custom element annotations in the OData Library for this CTP. This issue should be resolved by next public release.


A service using the Entity Framework provider, POCO classes with proxy and a model that has decimal keys will result in an InvalidProgramException:

This is a known issue and will be resolved in the next release of Entity Framework.


Spatial and non-standard coordinate systems:

Geospatial values in Atom only support the default coordinate system, JSON has full coordinate system support.


Support for Windows Phone 7:
The OData Windows Phone 7 client is included in the Windows Phone 7.1 SDK . The Windows Phone 7 client only supports features shipped as part of the .NET Framework 4 and does not support any OData V3 features included in this release.


Support for Datajs client library:
The OData Datajs library 7 client only supports features shipped as part of the .NET Framework 4 and does not support any OData V3 features included in this release.

Giving Feedback

The following forum can be used to provide feedback on this CTP:

https://social.msdn.microsoft.com/Forums/en-US/adodotnetdataservices/threads

We look forward to hearing your thoughts on the release!

Abhiram Chivukula
Program Manager
WCF Data Services

Comments

  • Anonymous
    October 13, 2011
    NEED THIS PROGRAME BECOUSE I LIKE IT

  • Anonymous
    October 14, 2011
    Apologies if I'm just missing an existing post, but could someone familiar with both "WCF Data Services" and "WCF RIA Services" these days (for instance, this CTP for WCF Data Services, and 1.0 SP2 for WCF RIA Services) do a compare/contrast?  I ask because RIA is venturing outside of Silverlight with the RIA/JS work, and the RIA service creation includes a checkbox for also exposing via OData, but I don't really know enough about either (WCF Data Services in particular) to know when a project would want to use one vs. the other and what the trade-offs are. Again, please feel free to just post a link if there's a good place that already covers this, but all I could find was from almost 2 years ago on the endpoint blog, and it only seems to get across (AFAICT) the "RIA for Silverlight, Data for REST", and I wasn't sure if there was more to the story or if things were different with more recent bits. blogs.msdn.com/.../wcf-data-services-ria-services-alignment-questions-and-answers.aspx Thanks!

  • Anonymous
    October 18, 2011
    I am totally lost in the big gap between permanent WCF updates and outdated books about REST and I can't find anybody that understands it either. All I want is a singleton (!) object, reachable at the same time both through SOAP/XML and REST/JSON from Android platform, iPhone/iPad and Windows PC. There is only one object on the Windows server as it drives real mission-critical hardware.

  • Anonymous
    November 25, 2011
    The comment has been removed

  • Anonymous
    December 29, 2011
    When is the expect final release for the next version of WCF Data Services? I need the enhancements made to derived types and navigation properties for a project that I am working on. I would rather not deploy a CTP to production in order to get the functionality I need. Thanks

  • Anonymous
    January 25, 2012
    Any clue yet as to when this might be going to a full release? The any/all functionality would be phenomenally valuable! Thanks.

  • Anonymous
    March 20, 2012
    Thanks for the info.  I have to say though that reading through the blog posts to find the latest release, the phrase is "by AND large", not "by IN large".  :)

  • Anonymous
    January 11, 2014
    hay:my friend your project of CTP DATA service is the beast services,I have read your company contents.I am worker in your co. Thank you CTPDATA SERVICE