Databases Reference
In-Depth Information
of the dynamic templates work equally well with both LINQ to SQL and Entity
Framework, allowing developers to reuse the templates between different web applications
or change the data access framework without rewriting the presentation logic.
In addition to the data entry controls, Dynamic Data also takes advantage of the URL
routing to generate entire websites based on the metadata exposed by the data model and
the page templates defined by the developer. Out of the box, Dynamic Data web applica-
tions already support common operations such as creating a new entity, displaying a list
of entities based on search criteria, or changing or deleting an existing entity. These pages
are fully functional and integrated in the application; they can handle different column
types and include validation and error handling logic.
Dynamic Data is backward compatible with non-LINQ-based data access frameworks, such
as the traditional ADO.NET with DataSets, as well as custom business objects. With very
little effort, developers can extend existing WebForms applications to take advantage of
the rich field templating capabilities. Unfortunately, page templating and dynamic search
capabilities are currently supported only with LINQ-based frameworks and discussion of
Dynamic Data without them would not be complete.
NOTE
Although it shares many common elements with the ASP.NET MVC framework, including
LINQ-based data models and data annotation attributes, Dynamic Data has several
distinct advantages. It works with existing WebForms applications and does not require
web developers to introduce a completely new presentation framework. Unlike MVC, it
supports dynamic rendering of UI elements not only at the field level, but also at the
entity and page levels, which can significantly reduce the amount of code developers
have to write and maintain. Moreover, Dynamic Data's ability to generate complex LINQ
queries at runtime, based on the search criteria entered by the user, has no direct
equivalent in MVC.
Dynamic Data is ideal for implementing maintenance and administration pages in web
applications as it supports most of the functionality they require out of the box. However,
the biggest advantage Dynamic Data offers is a higher degree of code reuse. The resulting
consistency of user interface across different screens and entities is especially important in
customer-facing pages of web applications.
Creating a New Dynamic Data Application
Visual Studio 2010 includes two different flavors of project templates for Dynamic Data:
.
ASP.NET Dynamic Data Entities
.
ASP.NET Dynamic Data LINQ to SQL
 
 
Search WWH ::




Custom Search