Now that ScottGu blogged about it, we have received a number of great feedback and questions. I'll try to answer some them here.
Will this work with MVC?
In this initial Preview, Dynamic Data is mostly targeting 'standard' ASP.NET pages, but we are absolutely planning to support Dynamic Data for MVC. And the good news is that you can actually try this today! To do this:
- Download the MVC Toolkit from http://asp.net/downloads/3.5-extensions/
- This has a VS solution which contains a sample Blog project that uses Dynamic Data with MVC.
This was completely unadvertised, so most folks probably didn't see it, but it's in there for you to play with! Start by just running it, and then look through the source code, which is all part of the solution. Of course, it's all very preliminary, and far from feature complete, but it should give you an idea of where we're heading. If there is enough interest, I'll try to make a screen cast that shows it.
Will it support databases other than SQL Server?
Yes, this is a key requirement for us. In the Preview build, Dynamic Data runs on top of Linq To Sql, which only supports SQL Server. But in the near future, it will also support Linq To Entities, which supports other databases like Oracle.
Will it support Many to Many relationships?
Yes, this will be fully supported with Linq To Entities. Linq To Sql does not directly support Many to Many relationships, though it can be achieved with some extra steps (see for example this post). But with Entities, it will work with much less effort.
Is this feature for prototyping, or for real applications?
The answer is that it really is for both. By using the initial scaffolding, you instantly get a working app. For some admin scenarios, it may actually be good enough as is, but for most other scenarios that need to be more polished, you can deeply customize it, while preserving many of the benefits.
The customization of a Dynamic Data app happens at many level, which I briefly described my my previous post. Again, I'll try to go deeper into the various scenarios in future posts.
Can I use it with an existing app?
If you have an existing ASP.NET application that already uses Linq To Sql, then you should be able to add some Dynamic Data goodness in there, simply by using some of the new controls in your pages. e.g. A DynamicControl contains the logic that drives the rendering of a field via the Field Template mechanism.
There are some aspects that are a little trickier, like getting your existing pages to automatically link to each other (e.g. for traveling foreign key relationships). That's not as easy as it could be today, but we are working on improving this support.
Can I use multiple Data Contexts in my application?
With the Preview bits, you can only use one, but future builds will remove this restriction. You will be able to register multiple contexts with the Dynamic Data engine, and it will work with all of them.
Why is Dynamic Data using a sort of routing section in web.config, while the new MVC does routing in global.asax?
Well, we basically didn't have time to make those two things come together in the Preview, but future builds will make Dynamic Data use the exact same routing mechanism as MVC. To be clear that means both the MVC and the non-MVC (aka WebForms) flavors of Dynamic Data will rely on this routing mechanism. As a result, most of what we have in web.config today will disappear.
I have seen some mentions of 'Oryx'. How does it relate to Dynamic Data?
'Oryx' is the internal code name for Dynamic Data, although the name has been used a few times publicly. In any case they refer to exactly the same thing. As for the name 'Dynamic Data', we may or may not stick with it as the official name when this is released. If you have a great naming suggestion, send it my way! 🙂