Monday, December 10, 2007

ASP.NET 3.5 Extensions Preview Released

Updated 2/13/2008: See the "Data Services (Astoria Project)" topic.

Scott Guthrie announced Sunday night in his ASP.NET 3.5 Extensions CTP Preview Released post that the extensions finally were available for download as a compact 3.64 MB ASPNetExt.exe file.

Installation took a minute or two on my "real" Windows vista test machine but about three minutes on a virtual Vista instance. This is the first time I've encountered an "Installation is taking longer than expected" message from an installer.

Update 12/11/2007: Setup adds Microsoft.Data.Web.dll, Microsoft.Data.Web.Design.dll, Microsoft.Data.WebClient.dll, System.Web.Extensions.dll, and System.Web.Extensions.Design.dll to the /Program Files/Reference Assemblies/Microsoft/Framework/ASP.NET 3.5 Extensions folder.

Dynamic Data Support samples and the Microsoft AJAX Library install to a new \Program Files\Microsoft ASP.NET 3.5 Extensions folder.

Here are links to the online Readme.htm file and QuickStart documentation.

As mentioned in yesterday's update to the "Scott Guthrie: ASP.NET 3.5 Extensions Due on Sunday" topic of LINQ and Entity Framework Posts for 12/3/2007+, all five pieces of the preview are included in the installation:

  • ASP.NET Model-View-Controller (MVC) Add-in
  • ASP.NET AJAX Improvements
  • ASP.NET Dynamic Data Support
  • ASP.NET Silverlight Support
  • ADO.NET Data Services (Astoria) without the Silverlight client

Dynamic Data Support

Dynamic Data scaffolding uses LINQ to SQL as its object/relational mapper (O/RM), LinqDataSource v3.6 as the site's data source and new DynamicGridView and DynamicDetailsView controls.

David Ebbo's Introducing the new Dynamic Data post gives a synopsis of the process for generating and customizing Dynamic Data pages.

Here's a screen capture of the very subdued page for the Northwind Products table:

Click above capture for a full-size (1024 x 768) image.

The scaffolding enables creating a standardized set of Web forms with built-in navigation that's similar to the earlier (and now discontinued) Blinq project. Using LINQ to SQL as the O/RM limits v1.0 Dynamic Data sites to SQL Server as the RDBMS. David Ebbo says that support for LINQ to Entities will arrive in the future.

The question here is: "What happened to the SubSonic-based "convention-driven" scaffolding?"

Update 12/11/2007: The answer from Rob Conerly is in this comment to this post:

>>The question here is: "What happened to the SubSonic-based "convention-driven" scaffolding?"<<

It's coming :). Just need a week or 2 here.

Model-View-Controller (MVC) Add-in

Rob Conery, SubSonic's architect and primary developer, who's been working on the MVC UI Helpers (MVC Toolkit) for the last month, has posted two very detailed posts about MVC:

ASP.NET MVC: Using RESTful Architecture of December 6, 2007 shows you how to "architect your MVC application using a RESTful approach, and also how you can partition out your 'logical bits' so you DRY (don’t repeat yourself)."

ASP.NET MVC Preview: Using The MVC UI Helpers of December 5, 2007 explains how these helper methods "encapsulate UI code in the same way that Server Controls do with Web Forms."

Note: The MVC Toolkit is a separate download that includes Dynamic Data for MVC projects and the code for Rob's MVC UI Helpers post. Get the toolkit here as an MVCToolkit.zip archive.

Data Services (Project Astoria)

The ADO.NET team's Mike Flasko lists the new and upgraded ASP.NET Data Services features in his ADO.NET Data Services ("Project Astoria") CTP is Released post.

The Creating ADO.NET Data Services QuickStart instructions for ASP.NET Data Services show you how to get an Entity Framework-based data service up and running.

Note: There is a typo and an error in the QuickStart instructions for the "Create the Data Service" topic.

  • In "When the Add New Item window appears, select SimpleDataService," replace SimpleDataService with ADO.NET Data Service.
  • The following instruction doesn't work for VB services. "In this example, the database was called Northwind so the namespace is NorthwindModel," you must replace NorthwindModel with SimpleDataService.NorthwindModel in the Imports statement to make NorthwindModel visible.
  • The VB version then fails with an "The member with identity 'NorthwindModel.Categories' does not exist in the MetadataCollection" error message written to Default.aspx.

Update 2/13/2008: See the Fix for "Known Bug" when Creating ADO.NET Data Services with Visual Basic and a Web Application post for the workaroud to the last problem. There are a few other VB-specific problems under submission to the ADO.NET Data Services (Pre-Release) Forum.

Following is the default Atom 1.0 list of tables from the C# version of the QuickStart example:

And here's a capture of the first item of the Products collection:

Click above capture for a full-size image.

Notice that many:1 related entities have a type=entry and 1:many child collections have a type=feed. Services that return type=feed trigger IE 7's Feed template; you can read query output by a Page | View Source command.

Update 12/12/2007: Alternatively, open IE's Tools | Internet Options | Content tab, click Settings in the Feeds section and uncheck the Turn on Feed Reading View option.

Here's the source for the first two members of the Order_Details collections:

Update 12/11/2007: Andy Conrad, Astoria technical lead, shows you in his LINQ to REST post how to create a data service with LINQ to SQL as the data source and query it with LINQ query expressions translated to URI syntax.

Stay tuned for more about ASP.NET Data Services.

1 comments:

Rob said...

>>The question here is: "What happened to the SubSonic-based "convention-driven" scaffolding?"<<

It's coming :). Just need a week or 2 here.