dougherty distilled

Bryan Dougherty's thoughts on technology and software development.
in

New ASP.NET Dynamic Data Controls : Nifty, But Not Real World

Today at MIX, a new set of controls aimed at simplifying data binding in ASP.NET were announced as part of the ASP.NET Futures release.  The goal of these controls is to make the process of creating a data bound web site extremely easy.  The theme of the presentation seemed to be "Use these controls to rapidly develop a starting point that you can replace portions of over time."  While the controls do meet this goal, there is, in my opinion, only a very small set of real world projects that would ever use them.

Some of you roll your eyes when I voice my skepticism for the magical wizardry that Visual Studio and some controls (Web or Winform) offer to make data access and display too easy and impractical for real world enterprise applications.  I can usually support my position in a debate, though I many times I'm satisfied to say "it just doesn't feel right."  With these new Dynamic Data Controls, though, I think we'll all be able to agree: They're just not practical for most enterprise situations.

Let's review the offering before making a full judgement, though.

The story of the Dynamic Data Controls starts by adding a data source (currently only a SQL Server database) to the App_Data folder of your web site.  (You may also be able to simply select a connection string, but it wasn't clear.)  Then you create a web page, optionally using the pre-built Dynamic Data Web Form template.  Finally, you add one or more of the new Dynamic Data Controls and there you have it.  The magic behind the curtain recognizes the columns, data types, foreign key constraints and other info about your database and wires up a fully functional read/write data driven web site.  You can even skip adding the web page and with a simple tweak of the web config you can have the auto.axd mechanism create an entire site for your database.

The new release offers several new controls.  The DynamicList is essentially a grid with your typical edit, delete, and row select features.  DynamicDetails and DynamicInsert controls gives you a details view and the ability to insert a record.  The DynamicFilter is a drop down list or radio button (or maybe another control) that filters your data source.  The DynamicRSS control exposes your data as an RSS feed.  Finally, there is the big daddy DynamicAutoData control that is a composite of all of the above. 

All of the controls support the extender pattern of setting the ControlID property to the ID of the Control you want to use.  For example, if you want to make a DynamicFilter a DropDownList with so you can handle it's events, you would set the DynamicFilter's ControlID to the ID of the DropDownList.

<asp:DynamicFilter ID="dfOrderID" ControlID="ddlOrderID"/>
<asp:DropDownList ID="ddlOrderID" SelectedIndexChanged="ddlOrderID_SelectedIndexChanged"/>

So to review, with zero code, you created a data driven web site.  You can even customize some of the style and behavior.  But that's it.  You haven't built an enterprise LOB application.  And you really can't.  The meat is in the magic, and there is a little too much mystery meat for my taste.  Where's the security?  Where are the business rules? 

Unfortunately, there is no good answer, at least not yet.  The roadmap for the Dynamic Data Controls seems to revolve around the use of LINQ as the data layer and that is where you would wire up your business logic.  But integration with LINQ isn't ready. 

I credit the team that built the Dynamic Data Controls for creating a neat tool.  But unfortuantely (at least for now) outside of a purely internal or administrative web site, I don't see there being any enterprise-level value.  Oh, and the whole thing just doesn't feel right.

 

Posted: May 01 2007, 12:06 AM by bdougherty | with 2 comment(s)
Filed under:

Comments

Kevin Mao said:

Good Point that Dynamic Data Controls is not for Enterprise Application and there is no control on security and business rules to fill the enterprise requirements. Very easy example if I need to export the gridview to excel, how can I can with Dynamic Data Controls?

# May 4, 2007 9:31 PM

Jay Basch said:

I found your review interesting and am glad you commented on this particular MIX session. I was looking at this session as more or less a "Proof of Concept" than an answer-all. From an application developer perspective I see this as unique set of tools for RAD techniques. The current feature set of the dataset model is to burdensom for the developer in its current state. I must agree with you that code generators do not always save time, but in this respect I believe this presents an aspect of descoverability that will aid application development greatly. I am going to keep in tune to the developments of this technology on my radar to see what happens. Once this and LINQ mature I can see major benefits.
# May 7, 2007 10:42 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)