Sdílet prostřednictvím


Breakdown of Dynamic Data Features

I thought I would write a post that describes all of the things that Dynamic Data provides to developers. Dynamic Data provides a scaffolding mechanism through templates but scaffolding is just a MINOR subset of the feature set we provide. I’m not trying to downplay the power of scaffolding but the real power is that every Dynamic Data feature that you see do not depend on scaffolding.

Dynamic Data Features (with/without scaffolding):

  • Look at data model metadata to determine right controls and settings:
    • If a string field has a length we honor that in the UI and limit input to that length
    • If a field accepts a certain type we validate the input is the correct type (can not type a string into a integer field)
    • If a field is nullable we enforce that the field is required in the UI
    • If a field is a foreign key we will lookup and display the text version of it from the foreign key table automatically and provide a dropdownlist edit functionality in edit scenarios
    • Provide automatic ability to hyperlink to the foreign key table from  a foreign key column
    • Provide filtering controls that provide automatic filtering based on foreign key and bool fields in a table
  • Provide data model meta data to change the validation, field formatting and display:
    • Validation
      • Required
      • Regex
      • Range
    • Formating
      • DisplayFormat
      • DisplayColumn
    • Display
      • RenderHint
  • Provide the ability to easily replace the controls that the built in ASP.NET data driven controls use to data in a column
    • FieldTemplate Controls
    • Provide default set of controls plus source code to make easy to change
    • Extensible  via user created controls or replacing existing controls
  • Much nicer pager  control for GridView with source code
  • DynamicGridView, DynamicFormView, DynamicListView and DynamicDetailsView can be used in standalone pages

You get all of these features whether you use full scaffolding, partial scaffolding or no scaffolding. Here is what provide via scaffolding:

Dynamic Data Feature (scaffolding):

  • Instant creation of fully functional website
    • Developer can choose inline editing (GridView/DetailsView on same page) or separate editing (click item move to details page)
    • Global templates affect entire scaffold and are just regular ASP.NET pages that can be edited
  • Uses same routing engine as MVC (in future CTP/Beta)
    • URL and routing can be customized
  • Template can be overridden for any table/action
    • If developer wants to customize the scaffold a regular ASP.NET page can be created for the table/action. By default with a copy of the global template and then customized as much as needed using regular ASP.NET programming logic plus Dynamic Data controls

Our goal here was to make as much of the power of Dynamic Data available both inside and outside the scaffold. And at the same time try and make a very flexible scaffold that can overridden at the global level, metadata level and the page level. So you can use the scaffold as a starting point and override as you go but it is not required to utilize all the power Dynamic Data has to offer. Plus all of this same feature stack will be available inside the MVC framework as well. So you can choose Web Forms or MVC and have the same level of support.

Comments

  • Anonymous
    December 21, 2007
    PingBack from http://lostintangent.com/2007/12/22/aspnet-dynamic-data-breakdown/

  • Anonymous
    December 28, 2007
    Link Listing - December 28, 2007

  • Anonymous
    December 28, 2007
    Announcements Secret Server 4.0 has shipped! [Via: thycotic ] Christmas present - BlogEngine.NET 1.3...

  • Anonymous
    January 19, 2008
    Visual Studio 2008 和 .NET Framework 3.5 多了不少新玩意兒,例如:multi-targeting、更強的 Web UI designer、C# 3.0、VB 9.0、單步除錯時可直接 step into .NET Framework 原始碼、JavaScript Intellisense 、LINQ

  • Anonymous
    July 02, 2008
    Dynamic Data websites use a flexible template-based architecture that makes working with data driven