共用方式為


Viewing public government data with Windows Azure and PHP: a cloud interoperability scenario using REST

 

This week Microsoft is participating in the first Gov 2.0 Summit produced by O'Reilly Media, Inc. and TechWeb in Washington D.C., to explore how technology can enable transparency, collaboration and efficiency in government. Today, we're pleased to present a cloud interoperability scenario which takes advantage of the recently announced Toolkit for PHP with ADO.NET Data Services to view public government data with Windows Azure and PHP.

As you may recall, few weeks ago, Microsoft announced the Toolkit for PHP with ADO.NET Data Services, a new bridge enabling PHP developers to connect to .NET using a RESTful architecture. Today, we've published a cloud interoperability scenario where a Windows Azure application exposes data in a standard way (XML / Atom) and how you can simply “consume” this data from a PHP web application. This scenario takes advantage of the Open Government Data Initiative (OGDI), another piece of Microsoft's Open Government effort, built on the foundation of transparency, choice and interoperability.

A few words about OGDI

The Open Government Data Initiative (OGDI) is a project launched in May by our colleagues from the Microsoft Public Sector Developer Platform Evangelism team

In a nutshell, Open Government Data Initiative (OGDI) is a cloud-based collection of software assets that enables publicly available government data to be easily accessible. Using open standards and application programming interfaces (API), developers and government agencies can retrieve the data programmatically for use in new and innovative online applications, or mashups.

Data and Platform Interoperability scenario in the cloud

Publicly available government data sets have been loaded into Windows Azure Storage, and the OGDI team built a data service that exposes the data through REST web services, returning data by default in the Atom Publishing Protocol format. The OGDI application uses ADO.NET Data Services to expose the data. On the diagram below you see the list of available data sets: http://ogdi.cloudapp.net/v1/dc.

This list is then accessed by the data browser web application built in PHP. To build the PHP applications the Toolkit for PHP with ADO.NET Data Services was used by simply generating the PHP proxy classes that would match the data sets exposed through REST at this URI: http://ogdi.cloudapp.net/v1/dc.

OGDI-PHP-ADO-NET-SAMPLE-ARCHITECTURE

Trying out the sample application

The PHP Data browser sample application is deployed on Windows Azure. Although it is not required and it could be deployed on any PHP compatible hosting environment, this sample application showcases a PHP application running on Azure. You can view or download the source of this sample from the demo site: http://ogdiphpsample.cloudapp.net/

The OGDI Service demonstrates some of the possibilities of the Azure platform and you can try the OGDI interactive SDK http://ogdisdk.cloudapp.net to understand how it works, as it features a similar data browser developed in .NET.

Moving forward

This sample application illustrates how you can simply create applications leveraging data and platform interoperability (PHP & .NET). The Toolkit for PHP with ADO.NET Data Services makes it easier for PHP developers to interoperate with .NET, including Azure which supports multiple internet protocols, including HTTP, REST, SOAP, and XML.  This scenario is just one among many we are working on using RESTful architectures.
Stay tuned, more to come soon!

Finally, here’s a recap of related resources:

For more information on Microsoft's Open Government efforts and participation at the Government 2.0 Summit, check out: FutureFed , the voice of Microsoft's Federal division.

Jean-Christophe Cimetiere - Sr. Technical Evangelist

Comments

  • Anonymous
    October 07, 2009
    Dear Jean-christophe, i have read this article with interest & am writing to request your permission to quote this work in an interoperability chapter I am working with for a chapter to be published in Springer on cloud computing in collabroation with Fabrizio Gagliardi, EMEA director at Microsoft Research. thank you best wishes silvana muscella

  • Anonymous
    October 07, 2009
    @silvana: Sure feel free to quote & reuse this work. Thanks for your interest