Dynamic Data in a Nutshell

 

What is ASP.NET Dynamic Data?

image

http://www.asp.net/dynamicdata/

Fundamentally, Dynamic data is new controls for DetailsView, FormView, GridView, or ListView controls along with a lot of meta-infrastructure classes to make it possible. The design uses convention over configuration in a number of places, and this marks, IMHO, the recognition of a simpler way to do things.

If you can point at one thing in Dynamic Data and say, “that’s it!”,  it’d be DynamicControl. it’s a control that takes metadata from your Database model (LINQ to SQL or LINQ to Entities in v1, other POCOs (Plain Old CLR Objects) or ORM’s possibly in v.Next) and selects from a FieldTemplateUserControl.

Here’s a comment from Peter Blum left on ScottGu’s Blog.

Dynamic Data introduces a new web control called DynamicControl. It can be used in FormView and ListView controls to provide a UI based on database-level schema. When using GridView and DetailsView, you add a DynamicField, which is a replacement for the BoundField that internally has a DynamicControl. (Thus has all of the features of a DynamicControl.)

This results in your Grids and data entry forms being built around tables and columns of your database with whatever smart data entry controls you like, such as the AJAX Control Toolkit’s MaskedTextBoxExtender on a textbox or your favorite third party controls. The database schema also determines the validators for this column. That avoids errors implementing the right validators or updating them when the database schema is modified. (No more “how do I validate a BoundField?” issues!)

To me, Dynamic Data is a major step forward in developing data entry oriented web applications for ASP.NET.

One of the demo’s that is often shown is Dynamic Data’s “scaffolding” feature. Basically, you point the wizard at a database and “poof” you’ve got a nice DataGrid Admin-like site. However, to dismiss it as a scaffolding tool is just the mistake I made when I first saw it.

How does it work?

Goto  Putting ASP.NET Dynamic Data into Context

Related Links

ASP.NET Dynamic Data

 

In a nutshell this enables you to really quickly build data driven web-sites that work against a LINQ to SQL (and in the future LINQ to Entities) object model – and optionally allows you to-do this without having to build any pages manually.

The best way to see this in action is to watch David Ebbo’s awesome 17 minute screen-cast:

Via New ASP.NET Dynamic Data Support – ScottGu’s Blog

ASP.NET Dynamic Data

 

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.
Dynamic Data is part of the .NET Framework version 3.5 SP1 release.

image

ASP.NET Dynamic Data