Last post Sep 16, 2008 02:54 AM by scothu
Sep 13, 2008 11:57 PM|wld_one|LINK
Sorry if this has been addressed, I haven't been able to find it. I am starting a new project and would like to use DD but don't want to get stuck with new technology that roadblocks or deadends (or you can't get there from here) when I am half done. It's
a fairly large project and I will be on a tight schedule. My question relates to best practices in project and db design. If I start with a well designed/normalized db is Dynamic Data a reasonable approach or is it too soon to tell. The demo's w/northwind
are impressive, is anyone familiar with real life/live applicatons? Are there any gotcha's that I should be aware of or any specific design considerations regarding the website layout or db design that will make this approach more reasonable?
Guess it's not a very specific question, more like I need a warm fuzzy feeling before I tackle a daunting task.
Sep 14, 2008 05:38 AM|ArminStockner|LINK
I recommand to make a database design combined with linq. Because it is powerful, fast and easy to use. Also it makes your code smaller and so gives you a better overview. So I use 3-Tier-Architecture with UI, BLL, DAL with linq and I made pretty good experiences
with this combination
Sep 14, 2008 09:55 AM|sjnaughton|LINK
Linq to SQL as your Model has fewer drawbacks than Entity Framwork (see
Differences When Working with the ADO.NET Entity Framework to LINQ to SQL), The main issue I see is the lack of support for Many to Many relationships, that doesn't mean you can't get around the Many to Many issue there are some workarounds on this forum
if you search.
My warm fuzzy feeling is that once you dive in to DD you won't want to get back out, it makes doing data entry on the web easyer that doing it in MS Access.
I think you will like the MASIVE reduction in code you have to write.
[:D] hope this helps [:D]
Warm Fuzzy Feeling
Sep 14, 2008 11:50 PM|ricka6|LINK
The link is not working for me - but can be found in my signature.
The main issue I see is the lack of support for Many to Many relationships, that doesn't mean you can't get around the Many to Many issue there are some workarounds on this forum if you search.
But L2S doesn't support M:M at all - EF does, it's just that Dynamic Data doesn't take advantage of M:M navigation, but EF supports it. I'll clarify my blog this week.
Mike Pizzo's blog
What is the difference between LINQ to SQL and LINQ to Entities? might help you decide.
Sep 16, 2008 02:16 AM|ricka6|LINK
.. and would like to use DD but don't want to get stuck with new technology that roadblocks or deadends (or you can't get there from here) when I am half done. ..
I don't think that's a big risk if you view DD as a subset of ASP.Net - you can always drop down to custom pages, custom fields, etc for DD and if that fails good old fashioned ASP.Net. I also like the comment by
.. I recommend to make a database design combined with linq. ..
I've updated my blog to clear the confusion of M:M limitations.
Sep 16, 2008 02:54 AM|scothu|LINK
I would like to add one final answer to this thread. When you see demos of Dynamic Data they are typically based around scaffolding which you are welcome to use or not use. However Dynamic Data is really extensions to the existing data controls we had in
.NET before SP1. Lets say you have an existing web page and want to enable Dynamic Data on it all you have to do is add a DynamicDataManager to the page and register your data controls to it. At that point you receive the following features:
- Default required field validators for non-nullable columns.
- Automatic conversion of foreign key ids to their friendly names from the foreign key table in both read and edit.
- Default setting of the maximum number of characters based on the length of the field in the database.
- Some default type validation (we make sure if a field needs an integer etc)
- Full templated support in the controls with provided source code. Instead of having to manually template fields to control their appearance a default set of templates is provided which you can change to affect the default look and feel of the controls.
- Ability to change behavior and display by adding metadata to your data model instead of repeating it one each page.
All of these are included without even using the scaffolding. As others have pointed out Dynamic Data is just ASP.NET which means you can always fallback to regular ASP.NET coding. We tried very hard to never do a bunch of automatic stuff without giving
you control to override or change the behavior.