Open source project makes ADO.NET data accessible with PHP

By Scott M. Fulton, III | Published August 25, 2009, 3:47 PM

Microsoft's most recent Web-driven database technology is ADO.NET, although only the first three letters of its name have been a throwback to its predecessor: There's nothing "ActiveX" about ADO.NET whatsoever. Up to now, its purpose has been to expose data through HTTP Web services that can be utilized by JavaScript clients (read: common Web pages) as well as by .NET applications including Silverlight.

But that fact has kept the pairings of ADO.NET with ASP.NET, and PHP with MySQL, separate and distinct from one another.

So with PHP being the more popular language, known to and practiced by an estimated 9.4% of the world's developers -- making it the #4 language in the world behind Java, C, and C++, according to standards group TIOBE -- that pairing works against Microsoft, and keeps MySQL in the driver's seat for as long as Oracle wants to keep it there.

This time around, Microsoft has decided its way out of that tangle is to let others solve the problem, and then to endorse (and, when warranted, to fund) the result. An independent, Pune, India-based firm called Persistent Systems, Ltd. Has spearheaded an open-source project to develop a kind of command-line re-interpreter, whose purpose is to make ADO.NET data accessible through PHP. It's called PHP Toolkit for ADO.NET Data Services, and its setup is deceptively simple. ADO.NET already generates XML code in Atom format that specifies the formats of Web-addressable resources.

At design time, the PHP Toolkit re-interprets this schema and produces a series of proxy classes, which the Web developers then explicitly includes in his PHP code. The classes behave like objects, with members pointed to like columns in tables.

In Expression Web 3, a developer includes the proxy classes generated by PHP Toolkit for ASP.NET Data Services.

So for instance, in classic fashion, you can create a loop clause that iterates through each member of a table, and then prints (or, more accurately, echo-es) the contents of members of that table into slots in the PHP code. The XHTML produced for the client contains those contents. It's all done with very minimal adjustments in the way PHP would normally handle tables; all it really needs is to include the proxy classes generated by the Toolkit, using the keywords require_once and define.

ADO.NET Data Services is supported by Service Pack 1 of Microsoft Visual Studio 2008 as well as by the latest Expression Web 3, and will be a key component of Visual Studio 2010.

Comments

View comments by with a score of at least

Quote, under fair use:
"This time around, Microsoft has decided its way out of that tangle is to let others solve the problem, and then to endorse (and, when warranted, to fund) the result."

What are you talking about? MS hasn't done anything actually.
MS just has noticed the effort/project and will try to assimilate it!
If it can't MS will just say they have done it and let it live.

Score: 0

|

cjackson27, this is talking about ADO.NET Data Services which exposes ADO.NET Entity Framework or LINQ to SQL as a web service that can be called from a separate application. I do agree though keeping ADO.NET in the name is a bit confusing since by itself it does refer to the old technology that you were mentioning.

Score: 0

|

Kind of late to the game as ASP.NET developers are actively moving away from ADO.NET to things such as LINQ to SQL and Entity Framework.

Score: 0

|

PDC 2009: What have we learned this week?

There was the freebie that no one will forget, the heebie-jeebies courtesy of Scott Guthrie, and a teensy bit clearer picture of how this cloud thingie should work.

Live report: Will Google Chrome OS change Linux?

The mysteries of just what Chrome OS is, and how much of an operating system it truly is, may be resolved today.

PDC 2009: Microsoft cares about Web browser performance

The effort to give users of the world's dominant Web browser the impression of quality, is a personal one for the man who leads that battle.

Nokia re-affirms its commitment to Symbian, sort of

Maemo won't necessarily be replacing Symbian in the Nokia N-Series, but that's definitely a place where it will be found.

E-book readers will be in short supply this holiday season

E-readers are hot this year, and a lot of compelling new products have been released, but are there enough electrophoretic displays to go around?

Sony looks to finally open a single storefront for downloads

Sony has had many different download portals for movies, music, e-books, and games, and now it's looking to make a single shop for all of it.

Tuning out the tablet: Time to give the endless speculation a rest

Wide Angle Zoom: Wishing and hoping and thinking and praying....won't put an iTablet on the market.

Five improvements for IT managers in 2010

If businesses are to improve their efficiency for next year, they need to stop and reassess the basic tenets of their job.

AOL's spinoff from Time Warner to shed 2,500 jobs

As AOL moves toward become an independent company again, it will cut nearly a third of its workforce.

Gartner: SMS-based money transfer will be bigger than mobile browsing, search

Gartner issues its predictions for the 10 things our phones will be doing in 2012.

Don't forget to upgrade to Firefox 3.6 beta 3 today

Mozilla has released the latest beta its Firefox 3.6 browser software, just over one week after beta 2.