VS 2008 SP1 has many new features. One of these is ASP.NET Dynamic Data.
Scott Hanselman has created a number of really good screencasts that show the basics of Dynamic Data. I watched most of these during lunch today and I am very impressed with the technology. They did some really nice work to make simple apps really easy to build.
To quote the site:
"ASP.NET Dynamic Data provides a framework that enables you to quickly build a functional data-driven application, based on a LINQ to SQL or Entity Framework data model. It also adds great flexibility and functionality to the DetailsView, FormView, GridView, and ListView controls in the form of smart validation and the ability to easily change the display of these controls using templates."
The way they did this is really great. (It's also eerily similar to SharePoint, though I don't think that they two are all that related.)
The framework uses a couple key concepts:
- URL Routing
- Rich data models
The templates are completely generic. They are not based on any sort of code-gen either. Instead, they dynamically inspect the data model and then render the data accordingly. The templates can be customized as needed. Out of the box, they include simple CRUD type UI scenarios like a grid for listing records, a ListDetails for doing inline editing in a grid, and a formview for doing inserts and edits.
The URL routing is used to send the user to the correct view based on the data that they are editing. If you wan to edit a product, then you can configure the system to use the default template, or you can configure a custom template page just for products. Regardless, the URL stays the same. This is a little foreign at first, but it makes things really nice in the end.
The data models are kind of the key to making this work. In the current release, the framework supports LINQ to SQL or the Entity Framework for the data model. I'm guessing that they'll be able to support other frameworks in the future.
The framework is the place where the dev can put attributes on the classes and entities to indicate how the UI should render a field. You can specify the datatype, validation, custom business logic, and the specific control to use when rendering that field on the UI.
The great thing about this framework is that it makes it super easy for us to build those really simple UIs that we always need for managing administrative data, etc. This framework almost eliminates the need for us to use SQL Management Studio for supporting apps. We cannot use the excuse that we don't have time to build an admin app any more.
I think that the framework has a lot of promise for mid-level apps too. It provides a really nice layer of abstraction for pushing data in and out of a UI. With a little work, the templates could be customized the the point that we might be able to use it for things like the Concerto forms.