For dynamically created forms, is ASP.NET MVC 2 worth the learning curve?
I have to create a web application that allows you to create specific XML documents. To generate a document, the user must be able to ...
- fill out fields that will be the XML content, using dropdown lists, text input fields, calendar controls ... Some fields will be validated.
- use some开发者_高级运维 default values (text, new GUID, current date ...)
- add or remove sub nodes. The minimum an maximum number of nodes will be validated.
All fields, relations and validations should be configurable by using config files.
I have an idea of how to implement this in a homebrew MVP or MVVM pattern way. Now I wonder if MVC 2 can help me enough to justify the learning curve. (MVC 3 is not an option, as my client still uses VS2008.) In two weeks I should have a working application. It is for internal "power user" use, so it doesn't have to look too fancy, but the main concept and functionality should be waterproof.
My background: I have many years of experience with Win Forms developement and basic knowledge of ASP.NET (did some smaller apps with it).
ASP.NET MVC is very different from ASP.NET WebForms.
ASP.NET WebForms is aimed for rapid, "drag-and-drop" development. In some way, it tries to recreate the way you develop Windows Forms applications. This can be cool, but sometimes beginners get trapped by that similarity and forget that they are developing a web server application, trying to make things in a way which is improper in that context, finally realising that they have to learn a lot about and to deal with WebForms-specific intrinsics like page life cycles, PostBacks, ViewStates, etc. (let those who didn't struggle with one of those cast the first downvote).
On the other hand, ASP.NET MVC is a much more flexible framework, and as such requires from you more discipline to get it right. it also requires from you to have a good understanding of engineering principles like REST and Model-View-Controller. The good thing is that there are (almost) no surprises because you are in control of (almost) everything.
Personally speaking, I developed WebForms applications for several years, and it took some time to master it. As for ASP.NET MVC, it took me about 2 days to learn about the core concepts, watch the great NerdDinner tutorial, test and play with code, until I felt completely comfortable with that technology.
Honestly if you have only a basic knowledge of ASP.NET, learning ASP.NET MVC in two weeks and developing an application according to those requirements could be a challenging task. Of course that's only my personal point of view and it is subjective.
精彩评论