OData
Create and consume RESTful APIs in a simple and standard way
Latest posts
Reference Data Caching Walkthrough
This walkthrough shows how a simple web application can be built using the reference data caching features in the “Microsoft WCF Data Services For .NET March 2011 Community Technical Preview with Reference Data Caching Extensions” aka “Reference Data Caching CTP”. The walkthrough isn’t intended for production use but should be of value in learning about the caching protocol additions to OData as well as to provide practical knowledge in how to build applications using the new protocol features. Walkthrough Sections The walkthrough contains five sections as follows: &...
Announcing datajs version 0.0.3
Today we are very excited to announce a new release of datajs. The latest release of datajs makes use of HTML5 storage capabilities to provide a caching component that makes your web application more interactive by reducing the impact of network latency. The library also comes with a pre-fetcher component that sits on top of the cache. The pre-fetcher detects application needs and brings in the data ahead of time; as a result the application user never experiences network delays. The pre-fetcher and the cache are fully configurable. The application developer can also specify which browser storage to use for data ...
Announcing WCF Data Services March 2011 CTP2 for .NET4 & SL4
Today we are releasing CTP2 of the next version of the WCF Data Services libraries. This release targets .NET 4 and Silverlight 4 and includes new client and server features in addition to those that shipped as part Oct 2010 CTP1. 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. Properties on derived types: The WCF Data Services framework is designed to make it possible to expose a model that has inheritance hierarchy for the entities in the model howeve...
Introduction to Derived Properties
What is a derived property? A derived property is a property that does not exist on the EntityType associated with the EntitySet; rather it exists on a type that derives from the base type of the entity set. This feature has been among our customers top asks since the lack of support makes exposing models with rich, well-defined inheritance hierarchies impossible to do. To enable such scenarios WCF Data Services now supports both exposing and consuming models which have properties (primitive, complex & navigation) defined on subtypes of the base type associated with the set How can I specify derived prope...
New JavaScript library for OData and beyond
Today we are announcing a new project called ‘datajs’, a cross-browser JavaScript library that enables web applications to do more with data. datajs leverages modern protocols such as JSON and OData as well as HTML5-enabled browser features. ‘datajs’ is an open source project, released under MIT. In this initial release, the library offers basic functionality to communicate with OData services. The library supports receiving data and submitting changes, using both the JSON and ATOM-based formats. The API can be made aware of metadata in cases where it's required, and operations can be batc...
Connecting to an OAuth 2.0 protected OData Service
This post creates a Windows Phone 7 client application for the OAuth 2.0 protected OData service we created in the last post. Prerequisites: To run this code you will need: Our application: Our application is a very basic Windows Phone 7 (WP7) application that allows you to browse favorites and if logged in create new favorites and see your personal favorites too. The key to enabling all this is authenticating our application against our OAuth 2.0 protected OData service, which means somehow acquiring a signed Simple Web Token (SWT) with the current user’s emailaddress in it. Our ap...
OData and OAuth – protecting an OData Service using OAuth 2.0
In this post you will learn how to create an OData service that is protected using OAuth 2.0, which is the OData team’s official recommendation in these scenarios: So if your scenarios is one of the above or some slight variation we recommend that you use OAuth 2.0 to protect your service, it provides the utmost flexibility and power. To explore this scenario we are going to walkthrough a real-world scenario, from end to end. The Scenario We’re going to create an OData service based on this Entity Framework model for managing a user’s Favorite Uris: As you can see this is...
Using ASP.NET output caching with Data Services
A lot of our customers have asked us how to cache results from their Data Service. Which is why I want to point you to this excellent post by Peter Qian (a developer on the Data Services team) that shows you how to setup ASP.NET output caching. It lays out what is required very clearly. Check it out. Alex James Program Manager Microsoft
Entity Set Resolver
Problem Statement: In previous versions, the WCF Data Services .NET and Silverlight client libraries always assumed that all collections (aka entity sets) had the same base URI. This assumption was in place because the library used the URI provided in the DataServiceContext constructor to generate collection URIs using the OData addressing conventions. For example: Base URI: http://localhost:1309/NorthwindDataService.svc/ Sample collection: Customers Collection URI by convention: http://localhost:1309/NorthwindDataService.svc/Customers This simple convention based approach works when...