Wednesday, May 25, 2011

ASP.NET Dynamic Data - Part 1 - Introduction

ASP.NET Dynamic Data has been out for a while, but good tutorials about it, can be hard to find. In this and a couple of future post, I'll try to introduce you to some of the framework and how to use it.

Overview of ASP.NET Dynamic Data

ASP.NET Dynamic Data lets you create extensible data-driven Web applications by inferring at run time the appearance and behavior of data entities from the database schema and deriving UI behavior from it. - ASP.NET Dynamic Data Overview (Microsoft MSDN)
The quote above, quickly summarizes the purpose of Dynamic Data. As Dynamic Data supports scaffolding, to automatically generate Web Pages for the tables in a database, both for editing and viewing data. After this has been done, you can customize the elements or create new ones to change the default behavior, to suite you needs.
Of course this can also be done without using scaffolding, which makes it easy to use Dynamic Data in an existing Web Site.


Dynamic Data obtains data entities information from an underlying framework use to represent data entities as CLR types.

Presentaion layer elements

All the template types can be customize, new can be created, etc.

Page Templates

Are pages that render data from a table in the database. Templates for different data views are included in the framework. Among others listing a whole table, displaying master/detail tables, end editing data.

Entity Templates

Templates for a data entity, such as data row and table. Very useful for customizing a custom UI, as it is more flexible than customizing the individual field.

Field Templates

UI templates for the individual data fields. A lot of default templates exists, such as Boolean and text. Normally a different template for displaying and editing data are used.

Filter Templates

Templates for UI filtering, for example displaying tables rows based on another value. Default templates are Boolean, foreign-key and enumeration templates.

A more complete overview can be found the corresponding MSDN page, ASP.NET Dynamic Data Overview.

The next post will be how to create a new Dynamic Data Web Site from scratch using scaffolding.

No comments:

Post a Comment