Today we released the newest preview release of Dynamic Data. You can view the details and download this release from here: http://aspnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=27026.
The preview releases of Dynamic Data contain much of the new feature sets that will be available when we release .NET 4. The cool thing is you can start using a lot of the new features against .NET 3.5 SP1 now using these releases.
When we look back and see how people view Dynamic Data we regret that people immediately think of it as scaffolding of data. This is something that it does do, and I think it does a pretty good job at it. But Dynamic Data is a lot more then that, providing a new templating mechanism called Field Templates which allow the default markup for many of our built in data controls to be more easily customized. These field templates also support validation by default (something our rich data controls did not) which can be customized by adding metadata to data objects.
In the past to enable Dynamic Data functionality in a web application the application needed to follow a couple of rules:
– It had to have a data model such as Entity Framework or Linq to SQL
– The data model had to be registered at startup in Global.asax
– The DynamicData directory had to exist in the web application
One of the new features this new preview release supports is adding field templates and validation to any ASP.NET web page without having to meet these requirements. It is as simple as:
What does this do for you? Today a control like GridView supports all kinds of high level features such as paging, sorting, viewing, editing but it provides no validation of data at all. So if your database has an integer field the end user would be able to type any data they wanted and when saving the record an ASP.NET yellow screen of death screen would appear (on the development box) saying that the data could not be converted to an integer. By enabling Dynamic Data automatic validation will occur because validation is built into the field templates that would render the column and a nice error message will appear in the page saying “Field XYZ must be an integer”.
To see this in action download the preview release and try out the SimpleDynamicDataSample.