Showing posts with label OData. Show all posts
Showing posts with label OData. Show all posts

Monday, January 12, 2015

Rest easy with RESTier - Building your Web API OData feeds faster with RESTier

OData Team - [Announcement] RESTier - A turn-key solution to build OData services

What is RESTier

RESTier is a RESTful API development framework for building standardized, OData V4 based REST services on .NET. It can be seen as a middle-ware on top of Web API OData.  RESTier is built with the inspiration of combining simplicity of WCF DS with the flexibility of Web API OData.

The main exciting features of RESTier are:

  • Help developer quickly build an OData service within minutes. You need just one controller, no more than 100 lines of code to easily bootstrap an OData service. 
  • Help developer easily add business logic into their services.

What about ASP.NET Web API OData?

As mentioned in the first part, RESTier is based on Web API OData. Web API OData will continuously be improved and RESTier will benefit from the improvements.

Getting started

The main getting started tutorials below show you how to user RESTier step by step.


Document and more samples

RESTier intends to be fully open-sourced, source code will be available on GitHub soon.

  • GitHub repository . We use GitHub to track issues. You can report bugs, provide improvement suggestion directly on GitHub
  • RESTier wiki . Detailed document and samples are available here.


Please be noted

  • RESTier is still at a preview stage.
  • RESTier currently only supports Entity Framework data provider. Other data providers will be added in the future.



Mostly I liked the title... lol.

That said, I like the concept behind making it easier to create, though we've all learned to take claims like this with a grain of salt. Will be keeping an eye on this to see if it has any legs...

Friday, April 12, 2013

What do Fiddler, LinqPad, Excel and SharePoint have in common? Testing and consuming OData of course!

.Net Curry - Testing and Consuming OData Services using Fiddler, LinqPad, Excel and SharePoint

Abstract: Consume and test OData Services by using different tools like Fiddler, LINQPAD, EXCEL, and SharePoint Server 2013 Excel Services OData.

In this article, we will take a closer look on the different tools we can use for Consuming and Testing OData Services. We will look at Fiddler, LINQPAD, EXCEL, and SharePoint Server 2013 Excel Services OData.

A couple of days ago, I demonstrated how to Perform CRUD Operations using OData Services in .NET. If you have not gone through the article, you can take a quick peek at it to understand how OData works. OData (Open Data Protocol) is a web protocol for performing CRUD operations which is built upon web technologies like HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to the data to various applications, services and stores. Today we’ll see how we can use some tools and products available to test and consume OData services.



I really liked the mix of things shown and used in this post. How can you go wrong with Fiddler and LinqPad in the same post! (Let alone with OData goodness...)

Thursday, January 24, 2013

O'TFService... Team Foundation Service now accessible via OData

Brian Keller - Bringing OData to Team Foundation Service

I am pleased to announce that starting today we are enabling OData access for Team Foundation Service. The goal of the Team Foundation Service OData API is to help developers build applications for multiple device types (such as smartphones and tablets) and operating systems which interact with projects on Team Foundation Service. OData ( provides a great solution for this goal, and has been embraced by numerous developers for building great device-specific applications. OData is accessible from any device and application stack which supports HTTP requests.

You can get started at which includes information on how to enable basic auth credentials for your Team Foundation Service account along with API documentation.

A sample Windows Store application is also available for download. This sample is licensed as MS-PL and we encourage you to learn from it and build upon it if you would like to build your own Windows Store application which works with Team Foundation Service.


As of today this service is a beta. We are looking for feedback from the development community as we continue to refine this service offering. Please email with your suggestions and bug reports. We know that performance for the service is an area we need to continue to invest in, especially for very large projects. If you have any specific feedback related to slow requests you are experiencing please provide us with details so that we can continue to make improvements here.

The Team Foundation Service OData API builds upon the work we have done to provide an OData Service which can be used with Team Foundation Server. If you are running Team Foundation Server on-premises and you would like to enable an OData endpoint for your server, please check out the OData Service for Team Foundation Server v2.  ...

TFS[ervice] is really pretty cool and gets you in the TFS door pretty cheaply and easily without having to be "open" (i.e. CodePlex). If you've not checked out Team Foundation Service you should, it's pretty awesome. And now you get OData'ness added too!


Related Past Post XRef:
Oh TFS... OData Service for TFS v2 beta released (with a companion Windows 8 app too)
OData Service for Team Foundation Server 2010 v1.0 RTW!
Opening TFS to the world via supported "web" API - OData For TFS (Beta) (Oh and you can use OData with CodePlex now too!)

Wednesday, January 09, 2013

Oh TFS... OData Service for TFS v2 beta released (with a companion Windows 8 app too)

Brian Keller - OData Service for Team Foundation Server v2

Today we are releasing the beta of the OData Service for Team Foundation Server v2 along with a sample Windows Store application

The purpose of this service is to help developers work with data from Team Foundation Server on multiple device types (such as smartphones and tablets) and operating systems. OData provides a great solution for this goal, and has been embraced by numerous developers for building great device-specific applications. OData is accessible from any device and application stack which supports HTTP requests.

The OData service interacts directly with the TFS client object model, and will work with CodePlex, Team Foundation Server 2010 and Team Foundation Server 2012.

TFS Dashboard for Windows Store
My colleague Nisha Singh built a Windows Store application – TFS Dashboard – using this OData Service. All of the source code is available for the application which can be downloaded alongside the OData Service. This is a sample which you can extend and customize yourself to learn more about how to consume the OData Service in your own applications. Nisha has more information about this application on her blog where she will be sharing additional information soon about how she implemented the Live tiles, Search and Share features supported by WinRT APIs.



I should make it clear that this is not an official release from the TFS engineering team. The TFS engineering team has reviewed the service and approved of the approach we are taking, but there is no official support for this service. That said, all of the source code is provided for you, the license permits you to use it in production and extend it for your own purposes, and we are interested in (but not committed to) continuing to add capabilities over time.

Will this work with Team Foundation Service?
Not currently, although we are very excited about this possibility in the future. We are working on a release which work with Team Foundation Service but I do not have a timeline to share at the moment. More details will be posted as an update to this blog post when it is available.


Microsoft Downloads - OData Service for Team Foundation Server v2 Beta

This sample allows you to expose an OData service for Team Foundation Server (2010 and 2012). This service can make it easier to build applications for a multitude of devices which consume or manipulate data stored in Team Foundation Server.

Version: 2.0 Beta
Date published: 1/7/2013

Language: English

ODataForTFS.V2.Beta.exe, 25.3 MB

TFSDashboardBeta.exe, 1.4 MB

The purpose of this project is to help developers work with data from Team Foundation Server (2010 and 2012) on multiple device types (such as smartphones and tablets) and operating systems. OData provides a great solution for this goal, and has been embraced by numerous developers for building great device-specific applications. OData is accessible from any device and application stack which supports HTTP requests. This OData service interacts directly with the TFS client object model. To get information about the OData service, please visit Brian Keller's blog.

The download also includes a Windows 8 Store App sample. TFS Dashboard is a sample Windows 8 Store App that connects to Team Foundation Server. The TFS Dashboard App currently implements the Live tiles, Search and Share features supported by WinRT APIs. This App is primarily built to get users thinking towards building great Windows 8 App Store Apps, and to provide as an example for how to consume the OData Service for Team Foundation Server. Please visit Nisha Singh's blog for more information about the App.

Can't wait to see this go RTW (and have TFService support... )

Things on the OData front have been pretty quite, so it's good to see continued support and usage...


Related Past Post XRef:
OData Service for Team Foundation Server 2010 v1.0 RTW!
Opening TFS to the world via supported "web" API - OData For TFS (Beta) (Oh and you can use OData with CodePlex now too!)

Sunday, December 23, 2012

"Understanding OData v3 and WCF Data Services 5.x"

CodeProject - Understanding OData v3 and WCF Data Services 5.x

Table of Contents

What is this Article About?

This is not your typical “expose an entity framework model as a WCF Data Service” kind of article; in fact I deliberately omitted Entity Framework from this discussion. Now don’t get me wrong, I have nothing against EF, but you will find a lot of great articles on how to set up a WCF Data Service using EF as data source. 

The discussion is around OData v3 and WCF Data Services 5.0 and 5.2. Of course there is no way I cover all new features or every API available, nor do I need so; I will point you to the resources where you can get all information you need. Instead my aim in this article is to discuss some of the topics that usually remain oblivious to the typical WCF Data Services developer.

What are OData, Atom, and AtomPub?

The Open Data Protocol (OData) is a protocol which standardizes the exposure and consumption of data. In times where data is being exposed at high rates and where consumers connect to more and more data endpoints, it’s important for clients to access these endpoints in a common way.

OData builds on web standards such as Http, Atom, and JSON to provide REST-based access to these endpoints. Data is exposed as entities where each entity can be treated as an Http resource which makes it subject to CRUD (create, read, update, delete) operations.

So how is OData related to Atom and AtomPub?

Atom is way to expose feeds much the same way RSS does. If you are wondering what are the differences between Atom and RSS you can check this site (

Atom by itself allows only feed exposure. If you want to publish data, AtomPub (Atom publishing) provides this ability. AtomPub uses Http verbs GET, POST, PUT, and DELETE to enable data publishing.

OData adds a set of extensions on top of AtomPub to enable more advanced and smart operations such as data retrieval filtration and typed values definition. For example, below are two queries that are made possible through the power of OData:

  • http://server/service.svc/entity/$count
  • http://server/service.svc/entity?$filter=(entityID add 4) eq 8

REST vs. SOAP: The Design Decisions



This is an awesome 20 page article about OData and WCF Data Services. If you need an intro to these two, you need to read this article.

Thursday, December 06, 2012

Providing data to your Windows 8 App? See Den's Data Services Series...

Devhammer's Den - Building Back-end Data and Services for Windows 8 Apps: ASP.NET Web API

In this series, I'm exploring a variety of ways to build back-end data storage and services for Windows 8 apps (many of which, BTW, can also be used for other mobile and web apps as well). Here are the posts so far:


In this post, I'm going to show you how I can implement the same leaderboard service using a relatively new member of the ASP.NET stack, Web API. Web API is designed specifically for building services that are accessed via HTTP, and is a lightweight, yet highly customizable way of building RESTful services, and even supports OData as well. I'll also show you how easy it is to host services built using ASP.NET Web API using the new Windows Azure Web Sites feature.

For the sake of simplicity, I'm going to leverage the same database schema that I created in part 1 of the WCF Data Services-based solution, and will also leverage Entity Framework for modeling the data. If you have not already, you should read through the sections entitled "Creating the Database" and "Creating the Schema" in that post, before moving on. I'll wait.


This is a series I've been following for a while and thought it was about time I blog about it. So here I am, blogging about it... ;)

Tuesday, October 30, 2012

Oh Add Reference... OData. OData Client Tools for Windows Phone 8 now available (And a VB.Net for WinRT OData article thrown in as a bonus!)

WCF Data Services Blog - OData Client Tools for Windows Phone Apps Now Available

Windows Phone 8 and Windows Phone SDK 8.0 were just announced and we are pleased to announce that OData Client Tools for Windows Phone 8 is also now available from the download center.

OData Client Tools for Windows Phone 8 brings OData V3 support to the Windows Phone platform. This release enables you to consume OData V3 services in your Windows Phone application. More specifically, this exciting release extends the Add Service Reference experience with client-side OData support for developing Windows Phone 7 and Windows Phone 8 applications using Windows Phone SDK 8.0. The tooling adds references that are capable of consuming OData services up to v3.

How can I get the installer?

You can download the installer for OData Client Tools for Windows Phone 8 from the download center. This release is not included with Windows Phone SDK 8.0 and needs to be installed separately. This release model will enable us to make release updates and fixes for the client tools and runtime components in a more efficient way.

If you don’t install the client tools and start using Add Service Reference to consume an OData service you will be prompted with a message such as the below:


What is in this release?

As mentioned at the beginning, this release brings OData V3 support to Windows Phone platform. You can now write Windows Phone 7.1 and Windows Phone 8 applications using Windows Phone SDK 8.0 and take advantage of exciting OData v3 features like:

  • Spatial: You can now take advantage of the spatial support in OData v3 to create location aware OData enabled phone apps
  • Actions: You can now invoke actions defined on an OData V3 service.
  • Any/All Queries: You can now express queries like “are there any customers which have no orders”
  • Vocabularies: You can now consume vocabularies for creating richer experiences on Windows Phone applications
  • Properties Defined on Subtypes: You can now have better inheritance support by consuming models which have properties (primitive, complex and navigation) defined on subtypes of the base type associated with the set.
  • ODataLib/EdmLib: You can now use these lower level libraries on Windows Phone.


Microsoft Downloads - OData Client Tools for Windows Phone Apps

The OData Client Tools for Windows Phone Apps installer brings OData v3 support for Windows Phone apps and extends the Add Service Reference experience with client-side OData support for developing Windows Phone 7 and Windows Phone 8 applications using Windows Phone SDK 8.0.

Version: 1
Date published: 10/29/2012

Language: English

WcfDataServicesWindowsPhone.exe, 7.9 MB

The OData Client Tools for Windows Phone Apps installer extends the Add Service Reference experience with client-side OData support for developing Windows Phone 7 and Windows Phone 8 applications using Windows Phone SDK 8.0. The tooling will add references capable of consuming OData services up to v3.

Supported operating systems: Windows 8

  • Prerequisite:
  • Other Requirements:
    • Microsoft .NET Framework 4.5
    • Microsoft Visual Studio 2012 with Windows Phone SDK 8.0 or Microsoft Visual Studio Express 2012 for Windows Phone 8


.NET, VB.NET, Windows 8, Windows Store App - Accessing and OData Feed in WinRT App using Visual Basic.NET

"As I’ve been searching the internet to try and find ways of accessing OData Feeds in visual basic .net and not finding much help I thought I’d put together a small example to help others.

This will use a demo OData feed to pull customer records from an example banking application. The feed is located in an Azure Cloud Service and is accessed by the following URL

(This feed may be removed in the future)

The first thing to do is create a Visual Basic Blank Windows Store XAML application.

Also add a basic page called CustomerPage.


We've got some C#, VB.Net and OData! What more could you want? (okay, okay... I know. It's been a long day... ;). But seriously, this tool will make consuming OData much easier. As for the VB post, VB needs some post love too...

Wednesday, October 24, 2012

Oh IE where's my OData?

PC#Henry - Are you getting into OData but getting STUCK in IE?

"If you’re just getting into OData, like I am now, no, I mean REALLY getting into OData, like making an app consuming OData, then chances are you’re probably trying out a few OData links in  your browser.  If you’re like me you’re using IE…ok, ok, hold off on the judgmental banter, it’s just a browser.  Anyways, if you’re like me, and you try it in the default configuration of IE, you’re probably going to get a whole lot of NOTHING.  At least nothing useful IMHO.  There IS one glimmer of hope those, that Displaying 38 of 38 is a ray of light!


HHHMMMMMM…I think I should be seeing 38 rows OF SOMETHING, but what?  Where is the data?

Well, MANY thanks to Jean-Rene Roy, lucky for the Ottawa area, a local SQL Server MVP, had the TRICK for me, well, US!  The “trick” is to turn off RSS reading in IE.  Hey, if you’re reading RSS Feeds, chances are you’re using your own specialized program, this shouldn’t be a big deal.

In IE, goto the Tools menu, select Internet Options, then on the Content tab click the Settings button.


I've run into this before and didn't even think to disable the IE RSS reading feature... sigh.

Tuesday, October 09, 2012

A "don't be blue, OData overview"

Open Data for Open Science - OData Overview and Sample

Andy Conrad of Microsoft SQL recently did wonderful presentations on OData at the recent Microsoft Research ODOS workshops. Andy's presentation deck is in the attached. Please email if you'd like a copy of the sample code in this presentation.

..." [GD: Click through for the PDF download link]

I thought this 28 page deck/PDF a nice, level 100'ish, intro to OData, a deck that could provide an easy start on the OData learning curve.image

Tuesday, September 04, 2012

Windows Management Framework 3.0 (aka PowerShell, WMI, WinRM & Management OData IIS Extensions) RTM now available for download (i.e. RTW)

Microsoft Downloads - Windows Management Framework 3.0

Version: 3.0
Date published: 9/4/2012

Language: English

Windows6.0-KB2506146-x64.msu, 14.4 MB

Windows6.0-KB2506146-x86.msu, 10.5 MB

Windows6.1-KB2506143-x64.msu,15.8 MB

Windows6.1-KB2506143-x86.msu, 11.7 MB

Windows Management Framework 3.0 makes some updated management functionality available to be installed on Windows 7 SP1, Windows Server 2008 R2 SP1 & Windows Server 2008 SP2. Windows Management Framework 3.0 contains Windows PowerShell 3.0, WMI & WinRM.

Windows PowerShell 3.0
Some of the new features in Windows PowerShell 3.0 include:

  • Workflow
    Windows PowerShell Workflow lets IT Pros and developers apply the benefits of workflows to the automation capabilities of Windows PowerShell. Workflows allow administrators to run long-running tasks (which can be made repeatable, frequent, parallelizable, interruptible, or restart-able) that can affect multiple managed computers or devices at the same time.
  • Disconnected Sessions
    PowerShell sessions can be disconnected from the remote computer and reconnected later from the same computer or a different computer without losing state or causing running commands to fail.
  • Robust Session Connectivity
    Remote sessions are resilient to network failures and will attempt to reconnect for several minutes. If connectivity cannot be reestablished, the session will automatically disconnect itself so that it can be reconnected when network connectivity is restored.
  • Scheduled Jobs
    Scheduled jobs that run regularly or in response to an event.
  • Delegated Administration
    Commands that can be executed with a delegated set of credentials so users with limited permissions can run critical jobs
  • Simplified Language Syntax
    Simplified language syntax that make commands and scripts look a lot less like code and a lot more like natural language.
  • Cmdlet Discovery
    Improved cmdlet discovery and automatic module loading that make it easier to find and run any of the cmdlets installed on your computer.
  • Show-Command
    Show-Command, a cmdlet and ISE Add-On that helps users find the right cmdlet, view its parameters in a dialog box, and run it.

WMI in Windows Management Framework 3.0 introduces:
  • A new provider development model
    This new model brings down the cost of provider development and removes the dependency on COM.
  • A new MI Client API to perform standard CIM operations.
    The API can be used to interact with any standard WsMan + CIMOM implementation, allowing management applications on Windows to manage non-Windows computers.
  • The ability to write Windows PowerShell cmdlets in native code
    The new WMI Provider APIs supports an extended Windows PowerShell semantics API allowing you to provide rich Windows PowerShell semantics. e.g., Verbose, Error, Warning, WhatIf, Confirm, Progress

With Windows Management Framework 3.0:
  • Connections are more robust
    Remote connections communicating over WinRM are more robust to transient network failures such as a flaky WAN connection. In the case of a complete network failure, connections are gracefully disconnected and can be reconnected when network connectivity is restored.
  • Remoting is more Standards-compliant
    Standard WS-Management operations, including Create and Delete, can be performed over WMI. Remoting for cmdlets written in native code using the new WMI provider development model uses WS-Management instead of DCOM.
  • Multiple PowerShell sessions can be shared in the same process
    PowerShell sessions from the same user to the same session configuration (WinRM plug-in) can run in a single shared process instead of separate processes. This improves scalability and performance by allowing multiple sessions to share memory and other server resources.

Management OData IIS Extensions
Management OData IIS Extension enables an administrator to expose a set of PowerShell cmdlets as a RESTful web endpoint accessible via the Open Data Protocol (OData). This enables Windows and non-Windows clients to discover and invoke PowerShell cmdlets remotely over standard web protocols and interfaces.

Server Manager CIM Provider
The Server Manager CIM Provider packaged with Windows Management Framework 3.0 allows you to manage your Windows Server 2008 R2 SP1 and Windows Server 2008 SP2 servers from Server Manager in Windows Server 2012 or Remote Server Administration Tools for Windows 8

With the RTW of Windows Server 2012 today, WMF 3 (PowerShell 3, etc) is now also available as RTM RTW. Now's the time to get your PS 3'ness going!


Related Past Post XRef:
Windows Management Framework 3.0 CTP2 available (with Getting Started with PowerShell Workflows guide too)
Win7 SP1/Win2008 R2 SP1 get some PowerShell 3 CTP love... Or PS gets WF

Thursday, June 28, 2012

WCF Data Services/OData Code Sample - One app, one click, lots of samples....

Microsoft Developer Network - Samples - WCF Data Service (OData) Client Library One Click Code Samples

This code sample is intended to demonstrate most of the common operations (Such as CRUD,Batch Async Query etc) of WCF Data Service Client Library. Code sample are designed in one click falchion that means you can just double click and UI will take you directly in to Debugger (If attached) and then you can walk through the code step by step


One thing I thought a great source was the Debugger.Break feature. It's a little thing, but a really nice touch. Having that in a sample app like this makes a heck of allot of sense in hindsight...

Friday, May 18, 2012

LightSwitch joins VS11 as a baked-in core component (i.e. no longer a separate product). VS11 Professional, Premium and Ultimate are all getting LightSwitched

Visual Studio LightSwitch Team Blog - Visual Studio 11 Product Line-up Announced

"Today the Visual Studio 11 product line-up was announced on the Visual Studio Team blog. Part of this announcement was information on what editions will support LightSwitch development.

Launched last year as an out-of-band release, I’m excited to announce that LightSwitch is now a core part of the Visual Studio product line! LightSwitch will be available through Visual Studio 11 Professional, Premium and Ultimate [GD: Emphasis added]. With this integration, Visual Studio now provides a comprehensive solution for developers of all skill levels to build line-of-business applications and data services quickly and easily for the desktop and cloud.

I am particularly excited about the additional tools for data application development that will be available to you. In addition, with the new data services (OData) support in LightSwitch, you will be able to build additional clients using the broad set of project templates now included in these editions including Windows 8 Metro style apps.

LightSwitch will be retired from sale as a standalone product with the release of Visual Studio 11. If you acquire Visual Studio Professional, Premium, or Ultimate you will also get the LightSwitch development experience included in the box. We previously announced a price reduction for Visual Studio 2010 Professional to align it with the planned pricing for Visual Studio 11 making this an even more exciting offer. For more information on Visual Studio pricing please see:


That's great news for the LightSwitch team. This is an interesting product but hasn't had much exposure. Hopefully this move, and it's cool VS11 features, will help.


Related Past Post XRef:
More Visual Studio 11 details emerge - Product Lineup news (VS 11 Express for WinPhone, no plans for Language Express editions), System Requirements and more...

Saturday, May 12, 2012

Marrying up PowerShell, JSON and OData to provide server management as Management OData

Adam Driscoll's Blog - Management OData and PowerShell

"There is a new feature of Windows Server 8 that will allow for access to PowerShell cmdlets and objects via OData served through ASP.NET. Doug Finke wrote a blog post for PowerShell Magazine on the topic. The article gives a good overview of what the Management OData feature is and how to configure it. In this blog post I will be showing off some of the steps involved in getting the service configured and what it looks like to consume the OData in PowerShell.


What Management OData Does

In simple terms (read Doug’s post for more info), the Management OData service provides RESTful endpoints that server up PowerShell objects. The schema designer is used to map cmdlets and their resulting objects to OData objects. These can then be served as JSON back through the endpoint to the client. The Management OData Schema Designer is used to take existing modules, cmdlets and objects and map them to XML files that can then be consumed by the Management OData system and served to clients. Included with the examples are PowerShell scripts used to install the OData endpoints once they have been compiled.



This is a Windows Server 2012 feature I'd not heard of and sounds both awesome and scary at the same time. The good news is that it seems this isn't some auto-magic thing that once installed, everything is exposed. If I understand it right, there's a bit of setup/config required to expose specific powershell cmdlets, which is good. And I wonder about the security story, but still the thought of being able to interact with remote powershell cmdlets via OData and JSON sounds exciting. I'll be keeping an eye on this now going forward...

Wednesday, May 02, 2012

Lighting up the CommuterAPI with LightSwitch

Heavily Caffeinated - OData Apps in LightSwitch, Part 3

"Welcome back! In this post we are going to wrap up the OData application we started back in Part 1 and continued in Part 2.

To refresh everyone on how we got here, we started with the idea that we would use some new features in LightSwitch for Visual Studio 11 (Beta) that would allow us to attach to an OData service. Specifically we are attaching to the Commuter API OData service.

We wanted to solve 4 basic problems:

  1. Where is my stop? (we solved this in Part 1 and 2 with a Bing maps extension)
  2. When is my train arriving? (we solved this in Part 1)
  3. How do I get there? (we solved this in Part 1 and 2 with Route information and maps)
  4. How many escalators will be broken today? (we saved this problem for Part 3)

To find a solution to this last problem we are going to pull in data from the “Incidents” entity in the OData service. This entity contains all the information regarding broken escalators and things of that nature.



I had blogged about the Commuter API here, OData your Transit (Think CommuterAPI OData'ified), so this caught my eye. Also I've been watch the LightSwitch OData news and have to say that that might be its killer feature. Being able to easily knock out a nice, usable front end to an OData source (and/or to mashup an number of them) looks pretty neat.

Now what I'd like to see is if LightSwitch can grow beyond a desktop app (well in 11 there's a server side, but that's not what I mean), to provide Metro/WP7 UI's. Given the separation of concerns that's the bedrock of LightSwitch, I believe it might be possible (not easy, but I think still possible). We'll see. It's SilverLight story is at its last chapter, in vNext (12) I wonder what we'll see for the UI side, assuming it lives that long...


Related Past Post XRef:
OData your Transit (Think CommuterAPI OData'ified)

Friday, April 06, 2012

Lighting up Android App Inventor with LightSwitch (yes, that LightSwitch)

LightSwitch Help Website - Communicating With LightSwitch Using Android App Inventor

Visual Studio LightSwitch Beta in Visual Studio 2011, allows you to create applications that can communicate with LightSwitch using OData. This allows you to create applications, such an Android mobile application, that communicate with the LightSwitch business layer. This provides access to the LightSwitch security and business rules.

In this example, when a user uses the application and calls LightSwitch, they will only see their own Orders (unless they are in the administrator role, then they will be able to see all Orders).


For this example we will start with the LightSwitch application in the article Calling LightSwitch 2011 OData Using Server Side Code. We will build an Android application using App Inventor that will communicate with the LightSwitch application.

We will use App Inventor because it creates applications that run on most Android devices, and is easy to learn, and fun to use.

While it is possible to create mobile applications using the method described in Calling LightSwitch 2011 OData Using Server Side Code, the performance of applications for the end user will not be as fast and as smooth as the performance of a ‘native’ application such as the one described here




I had never thought of LightSwitch and Android/App Inventor this way (or even in the same sentence). This is a cool tutorial series on them both, together...

Thursday, April 05, 2012

OData your Transit (Think CommuterAPI OData'ified)

Public Transit Data Community (

Public Transit Data Community has a goal to combine all the disparate transit data feeds from the agencies around the United State into normalized format and expose them as OData Service API to allow developers to build any type of applications around the data.
This community benefits:

  • Transit Authority Agencies helping them expose their transit data to the public to facilitate the development of new cool mobile, web and desktop applications for their riders
  • Developers to build applications on a top of the OData API that works for any agency within the community
  • Riders who will have an access to applications which enrich the public transportation experience

The Microsoft Azure Cloud is the platform for this community and provides us scalability and 24/7 availability. The data is stored in a SQL Azure database.

In the first release we have the following features set:

  • Data Feeds (see details)
    • WMATA static and real-time data
    • ART - static data
    • DC Circulator - static data and real-time data
  • Public Transit Data Community API v1.0
    • Bus and Train Arrival Predictions
    • Stops and Stations
    • Entrances
    • Routes and Train Lines
    • Incidents
    • Intelligent Routing



For Developers


This looks like a pretty cool idea and start. If you're in one of the listed metro serviced areas then it might even be cooler. I dig the idea of a central clearing house for transit data, and being OData makes it rock. Being OData means you pretty easily query and build apps, mobile, desktop, WinOS or not.

(via Heavily Caffeinated - OData Apps In LightSwitch, Part 2)

Tuesday, March 27, 2012

LightSwitching to StackOverflow's OData data

Alessandro Del Sole's Blog - LightSwitch: reading threads from StackOverflow with OData

"As you might know, one of the most important new features in the next version of Visual Studio LightSwitch, currently in beta, is the support for OData.

You can read some post from Beth Massi about this topic, today I'm just showing a different usage.

OData is an open protocol based on WCF Data Services and allows managing data sets through services. If you visit the Ecosystem page of the OData portal, you can find a list of public services from 3rd party producers, including the well-known StackOverflow web site, which offers a very popular forum platform.

Imagine you want to read your favorite threads from StackOverflow inside a LightSwitch application. After creating the project, the first thing you want to do is connecting to an external data source such as OData:




That's got me thinking I really need to take another look at the latest version of LightSwitch...

Wednesday, January 25, 2012

"New and Improved T4 Template for OData Client and Local Database" for Windows Phone 7.1(5)

Writing...Data Services - New and Improved T4 Template for OData Client and Local Database

"If you recall from my previous post Sync’ing OData to Local Storage in Windows Phone (Part 1), I had written a T4 template for my Windows Phone 7.5 (“Mango”) project to generate a proxy client needed to access both an OData service and local database on the device. My template was based on an existing T4 template,which was published in a blog post by Alexey Zakharov on Silverlight Show, that generated a generic OData proxy client. I had promised to publish my first stab a T4 template to generate this hybrid proxy. However, because my original template was based on Alexey’s OSS sample, it was taking a long time to get the go ahead to post it.

A New T4 Template for OData Clients

Fortunately, the other day I heard about a new T4 template written by the OData team to generate an OData client proxy to access an OData v3 data service.


With this new Microsoft-developed template, I have been able to port my previous LINQ-to-SQL additions into a new template without too much work. And, I have now updated my previously published project Using Local Storage with OData on Windows Phone To Reduce Network Bandwidth to now include the actual T4 template. To use this project on your computer, follow the instructions in the main page.

Considerations for My New Hybrid T4 Template


Installing The Hybrid T4 Template into a New Project

In case you want to try out my T4 template in your own Windows Phone project, here’s how you would do it:



One of the key phrases is "...the other day I heard about a new T4 template written by the OData team to generate an OData client proxy to access an OData v3 data service...". This doesn't appear to be out yet, but I'll be keeping an eye open for it.

Friday, December 30, 2011

Visual Studio 2010 and .NET Framework 4 Training Kit December 2011 Release (Think "MVC3 VB and OData HOL Love" version)

Microsoft Downloads - Visual Studio 2010 and .NET Framework 4 Training Kit December 2011 Release

Version: 2.2
Date Published: 12/30/2011

Language: English

VS2010TrainingKitDecember2011.Setup.exe, 497.7 MB

The Visual Studio 2010 and .NET Framework 4 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including:

  • C# 4
  • Visual Basic 10
  • F#
  • Parallel Extensions
  • Windows Communication Foundation
  • Windows Workflow
  • Windows Presentation Foundation
  • Silverlight 4
  • ASP.NET 4
  • Windows 7
  • Entity Framework
  • ADO.NET Data Services
  • Managed Extensibility Framework
  • Application Lifecycle Management
  • Windows Azure
This version of the Training Kit works with Visual Studio 2010 and .NET Framework 4.


Updates in this release;

  • [New] Visual Basic versions of all MVC3 hands on labs
  • [New] Building Applications and Services Using Open Data Protocol hands-on lab
  • [Removed] Introduction to ADO.NET Data Services hands-on lab 


And a full span of the page;


And my usual WinDirStat snap (showing the VB love in the Kit :)



Related Past Post XRef:
June 2011 release of the Visual Studio 2010 and .NET Framework 4 Training Kit (aka v2.0... or double the download size from the Feb 2010 release, or now 1.8GB of offline training, labs, information, goodness)
Visual Studio 2010 and .NET Framework 4 Training Kit – February Release (aka the VS2010 RC Compatible release) – We’re talking 602MB of VS/.Net training stuff here…
Visual Studio 2010 and .NET Framework 4 Training Kit - October Preview (aka VS2010 B2 version) released
A little VS2010/.Net 4 Training Kit with your Beta 1?

Monday, November 28, 2011

OData, RSS, for your Nuget's

Matt Wrock's Software Development Blog - Track Nuget Downloads using OData, RSS and

"In this post I am going to show you how you can be notified of new downloads of any Nuget package via email from a service that will poll Nuget every 15 minutes. If email sounds overly intrusive, there are other options. So If this sounds interesting, read on.


Switch from a Pull to a Push model

What I found myself craving was a way to let all of this information come to me and announce to me that there is new data rather than me having to spend time pinging several sources for what is likely to be no new information. In my case, I really wanted my phone to beep or vibrate when I get a new download, follower or mention. For me, this would not be a nuisance given the small amount of data. If you owned jQuery, you may want a more unobtrusive notification. Fortunately the solution I am about to propose can channel notifications through a variety of mediums.

Enter If-this-then-that

A few months ago I noticed a new referring link on my blog from a domain called I visited the link and perused the site and discovered that it provided a way of creating sort of mash ups of various social media. ifttt stands for If This Then That. And the site simply allows you to create rules of If something occurs (new tweet, RSS feed item, DropBox item, etc.) Then some other thing should be triggered such as an email sent or a tweet or facebook update, etc. I have to admit my initial impression was “That’s dumb.” Then about a week later Scott Hanselman blogged about this service having been duly impressed by its offerings. I still didn’t really get it.


But Nuget Has no RSS Feed with items representing downloads

Currently Nuget provides no RSS feed or any notification option for subscribing to download stats beyond what is displayed on the project search results and individual project details pages. I don’t know if there are plans to implement this by the Nuget team in the near future, but I wanted something up and running soon that didn’t need to be polished.

All Nuget data is available from the website is exposed through an OData feed

I knew that the data I was interested in was available via OData. There are a few posts out there that talk about this. I found that David Ebbo’s post had the detail I deeded to get started. With the name of any Nuget package Id, you can get its total download count via the public Nuget OData endpoint at


Currently as far as I can tell, there is no facility built into ifttt to consume this OData format. Yes, you can expose OData as an ATOM feed but given the Nuget schema, this would only be useful if you wanted to be notified of new versions. Essentially each version is a child entity of the master Packages entity. DownloadCount is simply a property associated with each version. Note that a version has both a VersionDownloadCount and a DownloadCount. The first is simply the count for a single version and the latter is the aggregate count of all combined versions released in a single package.

At first I tried playing with Yahoo Pipes and some other online RSS builder apps but none of these was going to work. At least not simply. I didn’t want to spend a lot of time on this since what I wanted was really quite simple and could be coded up fairly trivially. So I ended up just writing my own feed generator and I took the opportunity to create my first Azure application. I plan to blog more specifically on the azure specific details later and how they differed from my work with an AppHarhor application.

Here is the RSS Generator code:


Consuming the feed from an Recipe

Beyond the creation of “one off” tasks. ifttt provides a means of encapsulating common task logic into a reusable “Recipe.” These are handy if you find yourself creating the same task again and again with the only difference being a single variable. In my case here, I wanted to create three tasks. One for each of my Nuget projects. It also seemed reasonable that others may want to make use of this as well. So I created a recipe that anyone can use in order to create their own Nuget Download Notification task. Simply create an ifttt account (Super fast and easy to do) and go here ..."

I liked this alternate approach for keeping up with Nuget packages and consuming the Nuget OData feeds...


Related Past Post XRef:
OData Feed Fun Or There's no Atom/RSS Feed, but there is OData, so there IS an Atom feed (that you can customize to your liking too)