Home     About PeterBlum.com     Policies     Download a Licensed Product     Newsletter

DES Dynamic Data
The Advantages of using ASP.NET Dynamic Data
Back

Dynamic Data is designed to solve a few specific problems:

  • Provide a separation of concerns between business logic and web forms. Database-tier objects are used to describe the attributes of a column, such as validation rules and column name. The web form no longer needs to determine the right data entry control or validators. Instead, smart web controls gather and format those controls for you. They also supply two-way databinding.
  • Provide a separation of concerns between the web form and the data oriented controls used to view and edit data. The web form declares a single control that identifies the column to show, and Dynamic Data swaps it for the correct controls to display or edit that column. For details, see “How Dynamic Data changes how you build web forms”.
  • Quickly create an application that can browse and edit your database by building “scaffolding” that reflects the columns on a table into controls like GridView and DetailsView.
  • Quickly setup a very feature rich GridView, DetailsView, ListView, and FormView. Even though its obvious for prototyping, ASP.NET Dynamic Data is intended for real-world applications.

Advantages

From this, you should be thinking “I can just drop a single smart control on the page, assign its column name and get a very rich data entry control with validation and two way databinding!”. Also consider these advantages:
  • You can create a standard user interface for any type of data (called "FieldTemplates"). For example, setup a DateTextBox as the editor for Dates. Dynamic Data will automatically use that DateTextBox user interface each time a Date is specified on the column. (This can be overridden.) In fact, you have create several different user interfaces for the same type of data. Perhaps you want a DateTextBox in some cases and a Calendar control in others.
  • You are assured that the validators exactly match the business requirements. If those requirements change, attributes are modified on the database-tier objects and are automatically reflected on the web form.
  • You can abandon using the BoundField element in a GridView or DetailsView. While it created a two-way databinding UI, you had no control over the features it offered, such as providing a DateTextBox for Date columns, or support of validators. Instead, you use Dynamic Data’s smart “DynamicField” element to get a feature-rich user interface.
  • Reduce or eliminate writing SQL code to interact with your tables. Most of this code is offloaded to specialized DataSource classes.
  • Separates all data access code from your web forms so that modifications to your database and business logic do not require edits to your web forms.
  • It supplies the tools to manipulate the data, such as filtering, sorting and paging interfaces.

Limitations

Dynamic Data cannot solve all data entry web form problems. In its first release, it has many limitations although by using DES, some of them have already been addressed. Here are the key limitations (taking into consideration DES’s enhancements):
  • Not every data entry scenario is covered. You need a DataSource object to interpret your data in a way that can be used by ASP.NET Dynamic Data. Microsoft provides a few database-tier objects: those generated by the LINQ to SQL and ADO.NET Entity Framework features found in ASP.NET 3.5.
    If you want to work with your own objects, you must use ASP.NET 4.0's DomainDataSource.
    Third parties, such as LLBLGen, may implement their own.
  • Your page must use a databinding oriented control, such as a GridView, DetailsView, ListView, FormView or third party grid, to hold Dynamic Data’s smart DynamicField or DynamicControl.
  • There are many other limitations which are solved by features found in DES Dynamic Data and described throughout this site.

Learn more


Back