Introducing the new Dynamic Data
Today, we released the ASP.NET 3.5 Extensions Preview, which includes the exciting Dynamic Data feature.
A lot has happened since we released an early version of Dynamic Data Controls in the May ASP.NET Futures release. While it was already an exciting feature, it was not very customizable and was limited to a small set of scenarios.
While this new version preserves the essence of the original, it is also completely different. Not only it addresses the limited customization, but it also brings a lot of new things.
Since most of you are likely new to Dynamic Data, let me start with a quick introduction of what it is about. The core purpose is to make it easy to write powerful and extensible data driven web application. Here are some of the steps involved (not all of them are necessary):
- Define your model: this step is not specific to Dynamic Data, but this is where it all starts. You have a database, and you create a model for it. Currently, this is done using Linq to SQL. In the future Linq to Entities will be supported as well.
- Test a scaffolded version of your app: with no additional effort, Dynamic Data lets you run a scaffolded web application on top of your schema. Although this scaffold has a 'standard' UI, it lets you try all CRUD operations on your tables. Furthermore, it has full support for relationships. For instance (assuming Northwind), the Products page would let you navigate to a product's category info, and editing a Product's category would show you a rich drop down with category names (instead of IDs).
- Customize the shared page views: you then get to make changes to the page templates that are used to display the scaffolded views. That, you can make changes that will affect the view of all the tables.
- Customize the specific pages: the next step is to define some custom UI for specific pages. e.g. you could write one of Products and another for Categories. The nice thing is that while you do this, you still get the standard scaffolded view for all the other tables. This lets you create specfic pages at your own pace, while keeping a functional application at every point.
- Annotate your model: you can add attributes to your model to add extra knowledge about certain fields. e.g. you could set a Range on the product's UnitsInStock field so it only allows values between 0 and 50. The UI would then automatically pick this up and validate inputs accordingly. The great thing is that you are keeping this information on your model, and don't need to 'pollute' your pages with it.
- Create custom field templates: all fields in Dynamic Data are rendered via field templates, which are basically user controls. You can also create custom templates, which can be very powerful. e.g. in the above case, you could create a field template that renders a range as a slider control instead of a textbox. Again, your page would pick that up without you having to add this custom UI directly in the aspx file.
Well, this should be enough for a quick introduction. I'll try to have a screencast available tomorrow, which will run through some of the basic scanerios. I'll then follow up with more specific posts and screencasts that go deeper into specific areas.
To ask questions or report issues about this feature, please use this ASP.NET forum .
Comments
Anonymous
December 09, 2007
PingBack from http://www.absolutely-people-search.info/?p=5060Anonymous
December 10, 2007
La ASP.NET 3.5 Extensions Preview est disponible sur le site asp.net. Téléchargez-la vite. ConsultezAnonymous
December 11, 2007
The comment has been removedAnonymous
December 11, 2007
Hi Dan, We have set up a forum for this feature, so this is the best place to report issues. Here is the link: http://forums.asp.net/1145.aspx. Could you repost it here and we'll follow up there? Quick question for the follow up: what is the list of columns in the foreign key's table? I think this bug would happen if there are no string columns at all. Good find! DavidAnonymous
December 11, 2007
I posted over there with a bit more information, but yes, you hit it perfectly. There were no string columns in the FK table. Indeed, that is the workaround, to just add a simple unused varchar to that table. Thanks for your look into this! DanAnonymous
December 12, 2007
Dynamic Data es uno de los features de las ASP.NET 3.5 Extensions (aún en Preview ) que me llamóAnonymous
December 13, 2007
Dynamic data is a very cool feature of the ASP.NET 3.5 Extensions that allows you to trivially easy build,Anonymous
December 14, 2007
Now that ScottGu blogged about it , we have received a number of great feedback and questions. Anonymous
December 18, 2007
Dynamic data is a very cool feature of the ASP.NET 3.5 Extensions that allows you to trivially easy buildAnonymous
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 、LINQAnonymous
August 21, 2008
ASP.NET里的支架:DynamicDataSupport 作者HartmutWilms译者张海龙发布于2007年12月23日下午10时44分 社区 .NET 主题 ...