I've been working with web for over 7 yrs and I've upgraded from html->ASP->ASP.Net and now the new flavors of ASP.Net itself. I was to begin with MVC last year but due to deadline and the complexity involved in MVC I couldn't. Now, once again there's a new upgrade - I've begun with the ASP.Net DD (Dynamic Data) Templates (the latest one which scaffolds the DB tables and gives a list, details, edit & delete wizard).
As I dig in I get to know that its based on MVC and so I'm going to be using MVC (via DD) to built my web-apps. I've reviewed many articles and comparison videos between MVC & Web-Forms. There're a lot of topics even on SO, my abstract links are in the below reference section. Indeed MVC proves to be a more 'controlled' and 'extensible' web-development pattern however, as some say Web Forms still resides beside it (like for building a heavy data-driven apps, etc.. i.e. Sharepoint)
My web solutions are for supply-chain (user has to login to proced) and so I don't need the features of SEO or other things useful for a typical web. To simplify, I do some inventory maintenance (view, add/edit, delete & link) screens and a few complex screens like parent-child Grids & some tabular layouts. The goal remains to keep things simple yet appealing and @ the core we've performance & usability (most work with least clicks)
So, here're few of my doubts as a newbie MVCian:
- Web forms is event driven where as MVC will do this via Actions defined in Controllers
- It doesn't matter whether I use L2S or EF, my business logic goes in model (also extended by partial classes)
- URL-Routing will extend my power beyond the traditional Querystring approach
- I'll be able to render my cascaded complex tabular layouts & Grids by using multiple views (i.e. partial views & user-controls)
- Things like sub-total, Grand-total, etc.. kind of calculations will be possible in views (hope views can share / pass data mutually)
- Some funky GUI features like Frozen Grid-header/footer, scrolling rows, tab-view, etc.. won't lead me to a messy view (or atleast this is feasible in a clean/organized fashion)
- I won't really have a 'Viewstate' - in that case where to store temp data? like current pageindex, sort order, etc..
- I'm afraid MVC might lead to a complex\lenghty system where the flow is lengthy. Will I get lost? Is it scalable if I organize well?
Actually, theres more but I hope based on the above Qs you experts can figure out the kind of web-apps I work and so I just want to start investing in something better. Can't afford to change the architecture/approach every 6 months!
Does DD make MVC implicit? Then how can it use web-form controls? Sorry if I'm confusing, in that case please correct me!(most work with least clicks)
Finally, Can this be a solution: http://www.hanselman.com/blog/PlugInHybridsASPNETWebFormsAndASPMVCAndASPNETDynamicDataSideBySide.aspx
Also see the EDIT section.
Reference urls: (hope this helps others like me)
S*ome good refs about MVC over web-froms* & comparison -
http://forums.asp.net/t/1459417.aspx (benefits of MVC over a well designed web forms application) http://www.matthidinger.com/archive/2010/02/17/why-i-love-asp.net-mvc.aspx
Fire in the hole :-) http://codebetter.com/blogs/karlseguin/archive/2010/03/11/webforms-vs-mvc-again.aspx http://www.codethinked.com/post/2010/0 http://www.codethinked.com/post/2010/01/22/Controls-Do-Not-Make-You-More-Productive.aspx
Some more views on this debate:
v.good article: http://msdn.microsoft.com/en-us/magazine/dd942833.aspx
Summary of above: http://mvark.blogspot.com/2009/08/aspnet-mvc-vs-web-forms.html
http://www.asp.net/mvc/tutorials/asp-net-mvc-overview--cs http://weblogs.asp.net/shijuvarghese/archive/2008/07/09/asp-net-mvc-vs-asp-net-web-form.aspx http://codebetter.com/blogs/karlseguin/archive/2010/03/11/webforms-vs-mvc-again.aspx
From SO:
http://stackoverflow.com/questions/30067/
http://stackoverflow.com/questions/361620/asp-net-mvc-vs-webforms-for-first-page-load-speed-for-big-projects/
http://stackoverflow.com/questions/712220/whats-your-choice-for-your-next-asp-net-project-webforms-or-mvc/
http://stackoverflow.com/questions/661181/asp-net-mvc-vs-webforms/
http://stackoverflow.com/questions/1035642/asp-net-mvc-vs-webforms-speed-and-architecture-comparison/
http://stackoverflow.com/questions/837831/mvc-versus-webforms/
EDIT #1:
Thanks for expert comments and review. I'd like to share some of my screens - if anyone is interested to let you know the kind of GUI features and Grid-cascading I've been using -
Plz do not confuse me witha newbie web-dvpr. I'm experienced I just need to know (like when I say "Will I be lost") whether achieving a feature rich GUI is achievable and how was your experience in doing such things .. hope that helps :-)