RDN Directions

ASP.NET 3.5 Extensions

New and genuinely useful features and keep the pain of upgrading to an absolute minimum in ASP.NET.

Sometimes Microsoft announces new products or updates that generate lots of buzz in the press, only to end up disappointing users and critics alike. But there are also teams at Microsoft that go about the hard task of shipping version after version that add genuinely useful features and keep the pain of upgrading to an absolute minimum. Since its inception, ASP.NET has been one of those products, and some new extensions being previewed continue the trend.

Gateway to .NET
ASP.NET is an important product for many reasons: It's a popular platform for building Web sites and apps, and it's the foundation for other Microsoft products, such as SharePoint and Team Foundation Server, just to name two. But it's also important to Microsoft's overall .NET efforts, because ASP.NET is like a "gateway drug": for many .NET developers, their first exposure to the .NET Framework and languages like C# is through ASP.NET. If they have a good experience, Microsoft has a chance to get them to try Silverlight or Windows Presentation Foundation, but a bad trip could send them off to Linux, Apache and Java, never to be heard from again.


It's All About the Data
Microsoft clearly understands that, for many corporate apps, it's all about the data. The reason most corporate apps exist is to present business data to users, let them update the data or enter new data and help them make business decisions based on that data. That's why Redmond invests so heavily in building technologies -- such as LINQ -- into its C# and VB programming languages.

With ASP.NET 3.5 Extensions, Microsoft's adding several important data features to ASP.NET, including one that helps developers use ASP.NET to expose SQL Server data directly to clients, and one that makes it possible for developers to generate data-driven Web pages with no coding whatsoever.

ADO.NET Data Services, previously code-named "Astoria," have the potential to be huge because they make it easy for developers to build a data-access layer based on the increasingly popular REST application architecture. So-called RESTful Web services are gaining traction as an alternative to the complicated and heavyweight Web services standards initially developed by Microsoft, IBM, BEA and others, and are known collectively as WS-*.

In essence, ADO.NET Data Services allow a developer to publish a database over the Internet in a way that fits in naturally with the way the Web works. Data is retrieved using standard HTTP GET operations, new records are added through HTTP POST, existing records are changed with HTTP PUT and records are removed with HTTP DELETE. In addition, the data is surfaced through a consistent set of Uniform Resource Identifiers (URIs) and is returned in JavaScript Object Notation (JSON), making it very easy to access data from AJAX clients.

New Capabilities
To help developers get a taste of how cool this is, Microsoft has made its Northwind sample database available via Data Services. Log on to http://astoria.sandbox.live.com/northwind/northwind.rse/Customers, and you'll see the list of customers in the database. To see all orders for customers in Mexico, enter http://astoria.sandbox.live.com/northwind/northwind.rse/Customers [Country%20eq%20'Mexico']/Orders.

Nothing installed on the client, no complicated WS-* protocols, no incomprehensible URIs. Although this kind of simplification is generally useful, the combo of regular URIs for data access and JSON data has specific application in AJAX apps, because they use JavaScript in the browser to retrieve data without having to refresh the entire page.

Another new data capability in ASP.NET is called Dynamic Data. In essence, it tries to recreate for the Web something that VB has had for more than a decade: the ability to identify a database you want to display and have the actual form generated for you. But unlike VB, which uses some smarts in the dev tool to figure out what kinds of data are being displayed and choose the right kinds of forms and controls, Dynamic Data does it in a runtime. And the resulting Web pages are surprisingly capable, with all the typical features you'd expect: breaking large blocks of data into pages and adding navigation controls, adding filtering and sorting controls to the top of each page, allowing the user to edit the data without having to navigate to a separate page. Their appearance can also be customized through the usual techniques (CSS, ASP.NET master pages, etc.).

Dynamic Data pages aren't works of art, but for developers looking to provide quick access to key data without spending a bunch of time writing code, they could fill a gap in the product.

About the Author

Greg DeMichillie analyzes and writes about Microsoft's development platform and tools for Directions on Microsoft, a research firm dedicated to tracking Microsoft. He was previously the group program manager at Microsoft responsible for the overall design and feature set for Visual C# and C++. A founding member of the C# language team, DeMichillie was a key contributor to the initial design and development of .NET.

Reader Comments:

Add Your Comment:

Your Name:(optional)
Your Email:(optional)
Your Location:(optional)
Comment:
Please type the letters/numbers you see above