Databases Reference
In-Depth Information
CHAPTER 11
IN THIS CHAPTER
. Basic Form Layout
Building Dynamic Forms
. Configuring Appearance of
Labels
. Configuring Field Templates
. Configuring Appearance of
Values
T he biggest advantage Dynamic Data offers is the
dramatic reduction in the amount of code in your applica-
tion. Consider the number of ASPX files a web application
would need to have for the Northwind Traders sample data-
base. If you were using WebForms, you could manually
create two ASPX files per entity—one multipurpose “form”
page for inserting, editing, displaying, and deleting single
rows, plus another “list” page for searching for and brows-
ing through all rows. With 11 distinct entity types in the
Northwind database, this means that 22 separate ASPX
pages would have to be created. With ASP.NET MVC, you
typically have separate single-purpose views, requiring five
ASPX files per entity, increasing the total number of ASPX
files to to 55 , more than doubling the number of hand-
written ASPX pages with WebForms. With Dynamic Data,
which generates code at run time , the application can be
built with only four ASPX files (page templates), regardless
of the number of entity types.
. Enum Properties and
Enumeration Templates
. Custom Data Types and UI
Hints
. Specifying Field Template
Parameters
. Field Template Interaction in
Dynamic Forms
. Creating Additional Dynamic
Entity Templates
Dynamic Data gives you a working application as soon as
the initial version of the entity/data model is available. You
can immediately begin sharing it with the business and
collecting feedback on functioning web pages as opposed to
UML diagrams or screen mockups. With a good set of
dynamic templates, you can refine the entity model and
solicit additional feedback in rapid successive iterations
without the penalty of maintaining the presentation logic.
If a particular entity requires a custom user interface that
cannot be generated dynamically, you can hand-code it
using either the WebForms or the MVC framework, when
the entity model is stable.
By helping to postpone the hand-coding of the user inter-
face and making the application size smaller, Dynamic Data
 
Search WWH ::




Custom Search