How can I do rapid application development with ASP.NET MVC? [closed] - asp.net-mvc

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I've been given a short amount of time (~80 hours to start with) to replace an existing Access database with a full-blown SQL + Web system, and I'm enumerating my options. I would like to use ASP.NET MVC, but I'm unsure of how to use it effectively with my short timetable.
For the database backend I'll be using Linq to SQL as it's a product I already know and can get something working with it quickly.
Does anyone have any experience with using ASP.NET MVC in this way and can share some insight?
Edit: The reason I've been interested in ASP.NET MVC is because I know (100% confirmed) that there will be more work to do after this first round, and I'd like my maintenance work to be as easy as possible. In my experience Webforms applications tend to break down over repeated maintenance, despite discipline.
Maybe there's a middle ground? How difficult would it to be for me to, say, build the app with Webforms, then migrate it to MVC later when I have more time budgeted to the project?
Edit 2: Further background: the Access application I'm replacing is used in some capacity by everyone in the building, and since it was upgraded from Access 98 to 2003 it's been crashing daily, causing hours of lost productivity as people have to re-enter data since the last backup. This is the reason for the short amount of time - this is a critical business function, and they can't afford to keep re-entering data on a daily basis.

There really are no good answers.
I'd be very surprised if you could recreate a non-trivial business application in a new format (web) in any 'short' amount of time (unless you measure 'short' to be 6 months).
ASP.NET MVC provides (hands down) the most convention available with any beginning web project.
ASP.NET lets you drag-and-drop to get things working, but it breaks maintenance horribly for non-trivial applications.
If it were me, I'd do three things:
Ask my boss if he wants me to recreate an entire business application across a completely different platform.
Tell him he can either have it more quickly now (ASP.NET), or more quickly later (ASP.NET MVC).
Let him make the call.
Personal Addendum: I've used both ASP.NET and ASP.NET MVC for web applications. MVC is just better. Not faster, but better. It made web development 'fun' again for me.

MVC isn't really a RAD development framework.
You'll be writing much more infrastructure code than the RAD Webforms alternative of dragging a datagrid and a datasource onto a .aspx page. I love MVC but if you're under the gun go with Webforms. MVC can be faster, but only if you have infrastructure pre-built.
MVC 2 alleviates some of this by including Model based HTML helpers like Model.EditorFor() but it's not good enough yet. No quick grid code. Paging? You're rolling your own pager. Ajax? Write your own JQuery.
Sure, there are 3rd party and open source libraries available for all this stuff but in my experience smushing them all together and making sure they play nice is also time consuming.

Simple web application + tight schedule = ASP.NET webforms.
Complex web application + tight schedule = ASP.NET MVC.
I've found that as the complexity of a web app increases linearly the complexity of a webforms app increases exponentially. Once you start writing your own server controls (NOT user controls, as those are still relatively simple), which can be necessary for more complex UI, you need to have an intimate knowledge of the whole page lifecycle, how the viewstate works, and other obscure parts of webforms that the framework abstracts from you.
MVC, while it requires you know HTML well, does great on the tail end of complexity. No matter how complex the application is, you're still dealing with POCOs and methods in your controller. Once you get over the initial hurdles, its smooth sailing. Development difficulty increases at the same pace as website difficulty.
Personal experience: I converted a relatively complex website using custom server controls to ASP.NET MVC and cut the codebase in half. I also drastically reduced the complexity of the code as well.
The only caveat I have is that ajax is easier to do using ASP.NET AJAX. So if you're going to develop a web app that relies heavily on ajax then webforms may just beat MVC.
Migrating from ASP.NET to MVC isn't always the easiest. You have to move from a codebehind-based application to one where your controllers are unaware of your UI. Also, MVC relies heavily on the URL to determine the intent of the user, whereas ASP.NET relies on event handlers.
Personally, if I felt an application was destined to be MVC, I wouldn't waste time developing it in ASP.NET. But then, I've had the benefit of getting past the initial learning curve. Which wasn't all that bad IMHO. I had more trouble learning all the HTML and HTML forms that ASP.NET kept me from learning.

With this deadline i think it's more convenient to use the ASP.Net Webform. After this first phase with more time/budget you can start to develop new parts of your application using the MVC since they can coexist.
Also be aware of the Ajax and grid code. In MVC they usually take longer to develop but also at least for me they appear to be more robust because you really have to know what you're doing.
This question is from 2009, would be nice if the author give some feedback of his decision.
EDIT: Take a look into http://mvcscaffolding.codeplex.com/ if you still need a RAD using asp.net MVC.

Once you get running with MVC, it's pretty quick, but it takes a while a) to learn and b) to build up a suite of useful bits of code.
If your UI is not going to be complicated, it can be very easy to set up a quick data entry interface.
If your UI is to be really, really simple, you might like to look at ASP.net dynamic data.

You can also look the Entity Framework to bind to your database, this will create your models to be used with MVC. But Like jfar said, under short deathline pressure, go for what you know best!

ASP.Net MVC is good, but ....
If you haven't developed a system using ASP.Net MVC before, then using it on a project with a short deadline is a risk.
If your application is a "simple" CRUD application then I would go with Dynamic Data: http://www.asp.net/dynamicdata/
(Paddy just beat me to that one)
If your system is really big you could consider SharePoint Access Services http://blogs.msdn.com/access/archive/2009/10/21/net-developer-blogs-about-access-2010.aspx

Evolutionary Software Development
From experience I vouch for it - it's how I program, it works regardless of technology.
In short: do what your gut-feel tells you (code something), modify as you find errors/omissions, and when it works, you're done (but for the documentation).

Another option is to use Alpha Five v10 --
It recently received a thumbs up from Infoworld
check out http://blog.alphasoftware.com/search/label/Press%20coverage

Both frameworks contribute enough in delivering a solution, but WebForms automate some of tasks involved in UI functionality, like data paging, sorting, state persistence or custom data persistence and more, BUT... if you really sit down and say, ok what do i need to do? ... design, navigate, modelize, present and then figure out how to show layout, how to connect to data, how to bring data, how to bind them with UI, how to paginate, sort and finally edit, really put your mind down and compare techinques in each framework that accomplishes all that, you will know that MVC is more natural and team oriented. You need tools like EF Code First, a CSS framework like Bootstrap and jQuery, apply techniques like IoC, SoC, Layering etc and use for example Automapper for doing the boring stuf, but no matter how many things you will have to consider, it will always be match more easy, natural and direct than having to know all the various configuration of the numerous controls and managers that WebForms require. Except if your project is an ERP with CMS capabilities where ... you know :-)
Anyway, modern skils require to adapt in today's trends and MVC is just a good host to help you use them without suprises.
I ve written tons of WebForms code but i am not touching it again.
So, final point is that in 2014 with all those tools and frameworks out there, MVC is not slower but rather the opposite, but requires an initial, small to me, efford to gather some resources and lock a few methodologies.

Related

Is MVC easy for a Classic ASP guy to learn [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've pretty much worked with Classic ASP for ever since it was released almost.. But i am having trouble adapting to the ASP.NET platform.
I have been suggested by many to move to PHP, since it's spaghetti code (I LIKE SPAGHETTI CODE), and it's just like classic asp.. But learning Apache servers and securing them i heard was another big project to learn by yourself.. And since i know more about MS servers, i prefer to stay with MS.
But, I really want to learn another platform, and i was looking at MVC framework and that MVC 1, 2 or 3 is like spaghetti code? Maybe i'm wrong. I assume MVC3 is the best now?
Anyway, From Classic ASP, which would be the easiest and most difficult to grasp you think? ASP.NET with all the compiling and using visual studio, reminds me of when i used to make apps in Visual Basic, but i really like spaghetti code more than compiling stuff..
If there is anyone who has done this switch over from classic asp before, what did you do and why, how easy was it to grasp the new platform? (Preferrably MVC)
Well, MVC is more like classic asp than webforms is. However, it uses structure and frameworks to reduce spaghetti code and make it more maintainable. You have to apply a lot of new concepts to not fight the framework.
For example, a strong seperation of view, model, and controller. This is not something you would do in classic asp, or even generic php (you can do mvc in php, but it requires more discipline and using frameworks as well).
Bottom line is, spaghetti will always bite you in the long run.
Asp.net supports a mode where you don't have to compile anything, you just edit the files on the server and it compiles them at runtime automatically. This is the so called "Web site" model. However, MVC does not work that way and requires the "Web application" model that does compiling (although you only have to compile code, not markup).
I'm currently smack in the middle of my first large ASP.NET MVC project after (and while still) programming in classic ASP for years. I have also programmed in ColdFusion and I have tried Python as an alternative to ASP.NET MVC.
If you want to stick to Microsoft technology MVC is the closest you will come to classic ASP. Webforms is really Microsofts way to make web-applications similar to application development. Microsoft has tried to abstract away the fact that the web is a stateless medium. However, this results in pretty ugly things such as the viewstate (a hidden form field that tries to keep the state of all form fields) and controls that generate HTML over which you have absolutely no control.
MVC gives you more control, and leaves you to handle the statelessness like classic ASP does.
I have still found there is a steep learning curve though; you will have to learn a lot of new things, if all you ever did was program vbscript/ASP:
C# or VB.Net Syntax
Object oriented programming in general (inheritance, dynamic versus static, etc.)
Concepts such as lambda expressions, delegates etc.
The MVC pattern
Most likely also a data-access technology like LINQ or Entity Framework
I'm still struggling with some of these, but I'm getting there. It does take a lot of work though, and perseverance. Not everything is better or easier than in classic ASP. Especially for me, as I have been using WSC's in classic ASP for years, which enables n-tier applications in classic ASP, and eliminates spaghetti code completely.
As I mentioned, I also looked into Python as an alternative; Although at the company I work for we now switched to ASP.NET MVC, I actually found the transition to Python a lot easier. The only reason we went with MVC is the fact that it seemed easier to get new developers when using C#/MVC. (In retrospect this wasn't actually true, we are having an incredible hard time finding a suitable C# programmer around where we are located)
Mind you, in Python you will still have to learn basic Object Oriented programming, but the implementation is much simpler to use than .NETs and the Python language is (IMHO) more like vbscript than VB.NET is.
Also I liked the fact that I don't have to define the type of every variable/function/parameter. This sometimes drives me crazy in C#; if the type of a function changes, it could affect a lot of other functions and variables, which all have to be changed. Also, the syntax is easier to pick up because the language is simple and there aren't a hundred ways to do the same thing.
You can choose between different frameworks, MVC or non-MVC and you can use Python in a lot of other fields as well (application programming, scripting-for example XBMC).
There are also ORM solutions available like Entity Framework for .NET and I found the one I looked into (SQLalchemy) a lot more powerful, and easier to pick up than EF.
So at work I'm currently learning ASP.NET MVC, at home I'm slowly picking up Python. I suggest you try a very simple project in different technologies, and pick the one you find easiest to get started with.
Hope this helps.
If you like your spaghetti served by Microsoft, try any Windows version that supports IIS7. PHP works perfectly and it's really easy to setup with Web Platform Installer.
With that in mind, there is no real reason you should choose any one web technology over the other. You can mix and match as needed, even within a single app.
If you want to get into MVC, forget about 1 and 2 and go straight to 3. MVC is much closer to the metal than ASP.NET WebForms. With your background in classic ASP, you'll probably like it once you get the hang of it.
Update:
If you're serious about learning either MVC, PHP, Ruby or whatever web platform you like. Get a good book. Sit down, read it and follow along with the sample code. I usually decide what book to buy based on the reviews at amazon.
Then, if you need more info on specific topics, go read authorative blogs on the subject. For ASP.NET MVC you'll probably want to look at blogs from Brad Wilsons and Phil Haack.
I started using Classic ASP back in the days but then moved to WebForms now using/learning MVC 4.
Here are my thoughts.
For me Classic ASP was fun and easy to learn as it was simple and did not have a large learning curve, data CRUDS were not difficult either and it did the job in a fairly efficient but messy manner.
WebForms required a higher learning curve but helped with a lot of 'plumbing' code with drag and drop controls, however these were sometimes difficult to modify and customise.
With MVC I have found it requires a larger learning curve than the other two, this is mainly due to it being driven by HTML5 and client frameworks like Knockout etc. To gain a good understanding also requires one to learn OO patterns, Entity Framework, LINQ, WebApi and initially these I did not find simple to digest.
What is easy for you? What part do you find difficult? Read up about a stateless nature of HTTP and find comparisons between web forms and MVC - this should make few things clear.
Do some reading about MVC pattern in general. MVC is a general term which appeared first time over 30 years ago. MVC in .NET 4 is a variation of this pattern, but we are all used to calling it MVC. Make sure you OO knowledge is up to scratch, as well as knowledge of basic design patterns, mainly SoC (Seperation of Concerns) and SRP (Single Responsibility Principle).
if you want to learn / start with the mvc framework I could recommend you do the Contoso University tutorial or the NerdDinner one ( http://www.asp.net/mvc/tutorials#NerdDinner )

Asp.net MVC: Is it wrong to expect the same (or better) productivity rate from MVC compared to older aspx forms?

I am trying to explain why it's important to use MVC views over Form views within an MVC application. Some of the developers "expedite" work completion by adding form.aspx to the MVC project, technically using MVC but completely avoiding it. I think this is wrong because there isn't a way I know of to do the following things:
Have a route target an older aspx form
Have a controller assemble a model and send it to an older aspx form
Is it wrong to expect the same productivity rate from MVC over older aspx forms?
I would think that a developer that knows both ways of development very well, that the time to create the same solution would be the same (or better) with Asp.net MVC.
Background: We develop website applications used by corporate entities to maintain weekly published data, which could be "yet another customer control panel" to add or change software features about once a month (for each customer, lots of customers, lots of applications, extremely similar patterns).
The time to create an MVC site correctly is in my opinion and experience always going to exceed the time it takes to create one incorrectly. The time advantage to using MVC correctly (or any design pattern for that matter) is not always seen in the initial implementation, it's in the maintainability of the project, whether by the original developer or those who follow. Following good programming practices will result in long term time savings.
In terms of whether a pure MVC project is faster then a pure ASP.net project in terms of time to implement, it seems to me that the expectation could go either way, based on the developers experience, and on the applicability of the project itself to that framework.
I have personally found that for a sizable application that needs much of the 'plumbing' that an MVC app will demand anyway, I am at least as productive with MVC than WebForms.
But there is a learning curve, and a temptation for some 'simple page' to want to just 'throw up' a quick WebForm and be done with it.
I think the biggest gain with MVC, though, is in maintaining the application over time. It should be obvious how much easier it will be to do so with a strict MVC app, than a WebForms one. And adding WebForms into a 'mix' like that just, IMO, makes things even more difficult.
Once you are familiar with the MVC way of development, Its really very useful, scalable & lightweight.
Only initially it takes more time for development compared to Web Forms.
But advantages out number the Web Forms.
Just one of its example:
Its best suited for high traffic sites. In web forms control retains there states, we have view state and all.. During the page post back the whole data is sent back and results retrieved (High load on server). Whereas in Asp.Net MVC the controls are stateless. While posting back the Load on server is less.
like this has many more advantages..
And as it is based on Design Pattern its always good for starters. Who does not have much experience in Developing Applications previously.
With WebForms you can get away with using pre-canned solutions for a lot of things (grids, etc.). With MVC you have to roll your own or use a pre-canned javascript solution which can end up taking more time when compared to WebForms.
So to answer your question: it depends

Why to move to Asp.NET MVC - why not to move

Simple as it is :
Why to move to Asp.NET MVC & why not to move ( if there is any reason ) ?
Added
Is it a necessity to move ?
Can we say the future belongs to asp.net mvc ?
How many years do you think it can stays on top ?
MVC is much more well constructed, allowes for much better code seperation and control over markup, and is much lighter on the server, that IMHO the only reason not to move is if you have a legacy .NET application (or other) that is working flawlessly, and you're not expected to perform serious adjustments / fixes on it in the near future.
If you do decide to move, you should know that you'll be able to reuse very little of your webforms GUI and user controls, since MVS is built a bit differently. You class libraries you could reuse, if they're written well. In any case, writing stuff in MVC is much faster than in WebForms, even if done from scratch.
also looking at moving at the moment.
the main bonus for me is the complete control over layout. i'm also looking into implementing a restful API which the MVC model works very nicely with because of the path structure.
Josh
If we move for MVC we can add or edit any module so easyly.
So we can add any new module just like a plugin
I patrially disagree with the accepted answer. I have built large applications in both WebForms and MVC and here is my opinion:
ASP.Net Web Forms and ASP.Net MVC are both great frameworks that allow the C#/VB Net developer to build enterprise level applications. Choosing which one to use for your app depends on a few factors. The MVC model has been around for many years, it is well suited if you need more fine-tuned control over the page cycle process and it is also superior when it comes to unit testing etc, because it supports true separation of business logic and presentation layers.
However, do not dismiss Web Forms, the reality is you can continue to use the web forms framework and still have tight control over your page elements be simply moving away from pre-built server controls and integrating HTML5 standard controls. You can take advantage of new JavaScript frameworks like jQuery, you can improve search engine friendliness by using techniques like URL Re-Write, and you can reduce or eliminate post-backs by taking advantage of asynchronous frameworks like jQuery AJAX and SignalR.
The main reason I disagree with the accepted answer is the statement "writing stuff in MVC is much faster than in WebForms" is completely inaccurate. As any developer who has actually built MVC apps will tell you, it's actually much fast to build WebForms apps. The reason is not just learning curve, but the fact that while MVC gives you the benefit of "under-the-hood" access to the page cycle and more direct access to HTML output, is also the reason it takes longer to build MVC apps. Trust me, you will find yourself doing much more "plumbing" work than you ever did with "drag-and-drop" WebForms development.
The fact is, there was a lot of hype when ASP.Net MVC first came out and too many developers assumed it was a replacement for Web Forms. It hasn't. As I stated in the beginningm both frameworks are great, they both have their pros and cons. I would guess that 90% of developers are still building new apps in WebForms.
That's my 2c.

ASP.Net MVC issues, meant for advanced developers only?

Just a random question. I've been in internship and then working as a software designer for almost a year now, mainly with SQL Server 2005 / 2008, and Visual Studio 2008 with ASP.Net VB / C#, web software development. We recently started a project with ASP.Net MVC, and I just don't get this stuff.
The concept of Views, Controllers, Models etc is clear. I'm still a bit confused with some of the syntax, but it doesn't seem impossible to get. My problem however, is with all the basic controls and functions you had with basic ASP.Net. Want a dropdownlist? Go browse through 15 tutorials one of which may actually work. How about a gridview with editable rows? Manually build the tables or helper classes with loads and loads of code also built from several different tutorials. What about panels or multiview indexes to easily control the visible user-interface on a page? Well, go learn another tutorial about how to do it all from scratch. Etc..
I do not argue the idea that MVC is worth it. It has to be, with so many people smarter and more experienced than I am saying so. But I've now fought with this beast for over a month and am getting increasingly frustrated at having to use hours to days of time to do the most basic tasks that were easy even when I was barely beginning with the whole programming thing almost a year ago.
So my question. Are there others out there like me? Are there perhaps nice blogs or articles opening all this up to people like myself? Is ASP.Net MVC just something that is so hardcore advanced that you NEED to have extensive experience and talent to actually master it?
Thanks for your time.
It's not for advanced developers. It is for good developers.
Most ASP.NET WebForms developers have made it somehow through years without having a slightest idea of HTML, CSS, JavaScript or HTTP. Drag and drop some control, set up some properties and here you go. It is not the way of a professional. You need to know the basics. It is only a matter of time until some situation arrives where a standard control cannot help and you need to work around the postback mechanism, viewstate etc.
I agree that it is definitely more work trying to implement an editable data grid, add persistance for controls, add some nice Ajax effects instead of relying on UpdatePanels, yes. But you really need to know this stuff if you wish to be working as web developer.
What you are experiencing is being overwhelmed at once by all those things you should have learned already but have managed to postpone thanks to very well done abstraction mechanism of WebForms. The best course of action is to start learning these things now, step by step. It will likely take you at least 6 months of intensive studies to feel more or less confident with doing stuff manually. But when you have done this, you will be looking back at your start and feeling glad you did it.
I was trying to work out what the problem was with MVC until I grasped the essential difference between the person asking the question and me - it would be this, I first laid hands to keyboard in 1979 whereas Zan has been "working as a software designer for almost a year now".
When I started one more or less had to do everything (at least in terms of presenting a UI) from scratch - or at least using far more limited toolkits than is the case today. The notion of constructing a drop down list by running a loop to create the options is in some respects considerably less alien to me than binding a datasource to a control and having the result appear as if by magic (notwithstanding 9 years of VB.OLD and over 6 years of .NET and C#)
And that is the core difference between Forms and MVC as it currently stands - the way you produce the presentation code and consequently the fact that you need to understand HTML and do seemingly more work to achieve similar results (and this is one of the reasons that people keep emphasising, quite rightly, that MVC is NOT an appropriate solution for every project). In terms of the structure of an application - MVC encourages a better (more testable) style but its not the only means to achieve that end - the majority of the techniques are as applicable using forms and alternative patterns.
And again this raises the challenge of contemporary frameworks and tools - they do a huge amount of work for you (go look at Dynamic Data for example) but they also hide so much from you that we lose track of the fundamentals and of an understanding of the basic building blocks from which our complex applications are constructed. In this case the problem sounds like one I've had which is learning about the nuts and bolts how a web page is actually constructed (HTML, CSS, Javascript) and how it interacts with the server as opposed to just having the whole client experience automagically generated for you.
MVC is no more a tool for "good developers" than Forms is - rather its a good tool for developers that wish to achieve a particular result albeit one that comes with a price just as forms is also a good tool but with different outcomes because you're accepting a different set of compromises.
A good developer is one that can adapt - can learn the new techniques necessary to work on a different platform, to target new environments, to use appropriate solutions for a particular task and ultimately that can apply solid patterns and methodologies to their work in so far as is possible whatever the dev environment...
i also spend one year on mvc what i learn till now is u can rely on client side as much as u can but in classic asp.net most of time u used server side controls like gridview. In asp.net mvc u can replace it with jquery controls like jQgrid and jquery datatable. you must have to spend some time to learn asp.net mvc the it might looks u better then asp.net classic.
for reference read asp.net mvc pro book
MVC is not a new concept; in fact other languages have this kind of framework long before Microsoft got it. Think about Ruby On Rails, Zend Framework, Symfony etc.
If you say that MVC is for the hardcore and the alpha geeks, then by your logic other language developers are much more advanced than .Net developers. I don't think this is true.
Your problem with MVC stems from your webform background; ASP.Net and ASP.NET MVC greatly differ in terms of concepts and approach. So some unfamiliarity is expected for those who are moving from one framework into another. Me, on the other hand, who has no webform experience ( although I do have winform experience), don't find MVC hard to grasp.
And I don't think I am smarter than anyone else.
All i can suggest is that you need to do more of it! The more you practise, the more it will become clear. That's how it was for me. I was fundamentally stumped by the MVC concept to start with but after much frustration i just decided i would need to force myself to start using it or i'd never get it.
I'd recommend actually completing one or two of the tutorials found on the asp.net/mvc site from start to finish. I can personally recommend the NerdDinner (and the book from which this example was birthed - Pro ASP.NET MVC 1.0) and Storefront tutorials.
ASP.NET MVC is built on top of bunch of old concepts - HTTP, HTML, CSS, JavaScript. And so on. The whole point is to bring their power directly to your hands. If you can't handle this power - for example, you're not familiar with HTTP statelesness, or how to build rich pages with HTML/CSS/JS - you can't do much with ASP.NET MVC.
If you say that you're in programming for only one year then you're most probably not familiar with those concepts and that's the problem, not in the MVC itself.
Maybe you take ASP.NET MVC as a refinement of ASP.NET. That's wrong. They're VERY different. Imagine yourself doing web development with only HTML, CSS, and jQuery [1]... can you? If you can't then you will have troubles doing MVC.
I personally worked with ASP.NET for couple of years, and ASP.NET MVC was a breath of fresh air. It's just so much simpler and cleaner.
[1] This can be done, for example with data fed via web services.
MVC is great but the argument that it makes you happy by finally giving you the power of HTML, CSS and Javascript is real crap. The same logic would say: code in pure SQL and forget nHibernate or Linq. Why is abstraction bad? I like MVC but please don't use such arguments. MVC needs something to be able to build complex rich user interfaces (which are browser compatible).
Finally, on HTML, CSS and Javascript. The fact that MVC forces you to go back to the basics does in now way mean that the developers do it right. Whether you use web forms or MVC, a bad JS developer stays a bad JS developer (and same for HTML or CSS).
Sometimes it is better to not give too much power to the weaker developers in a team.

ASP.NET MVC suitable to complex web application?

Last week , my boss ask my team to evaluate ASP.NET MVC, for next project.
all of us working with webform since .NET 1.1, we have no MVC experience before ,but all of my colleagues are interested in ASP.NET MVC ,But no luck , our finally answer is NO.
Because:
We believe although you are ASP.NET Guru, you can build a complex application in short amount of time. But if you change to ASP.NET MVC, the development time will take longer, every things need to using html helper, no web control, and many question ,keep opening the Firefox Tab with ASP.NET forum for ask How-To question.
We had see many times people say MVC provide better project management , but if it is a complex web site, I can imagine there are hundred <%=%> TAGs in one page, and keep open controller to see what to return, and keep opening model to see the logic.
I can say , MVC is not bad, but Webform is strong enough to handle the job.
It will take several weeks to change over to a new technology, or a "way of thinking".
With MVC, you have to get away from old ASP.NET Forms way of thinking "complex web application" in that "how many pages we have, over 300 pages! that would be huge!". You change the view of your entire application. You shift from old thinking of "what page need to create next" to the MVC way of thinking of "what function do we need to implement next".
For example, I myself took control of a project that has over 3300 files in the 'web' project alone (plus the 11 supporting assemblies). One thing that I am architecting is how MVC will drastically cut down the number of physical files down to around 310 or so. How? Because I am moving away from "here's one page. Here's another page." to a "here's the function I want to implement" way of thinking.
By looking at pages as the function you are trying to accomplish, you instead start abstracting pieces of that page out into common functionality.
MVC can greatly scale with this way-of-thinking because now you have a template for the way you want it to look, you just need to implement another "function" to change the look of that View (html) you want to render. No 2nd page, no additional controls, etc.
Now, as for "no web controls" as you mentioned: again, this calls for a different way of thinking. There is the HtmlHelper that is used for basic rendering and encoding. I use the same concept with an abstracted class called MyProjectHelper that renders my "functions" onto the page (functions=code).
For example, I always created a Server Control for my DisplayNames in the past. This allowed me to control the way that DisplayName was shown, especially with a switch to Facebook Connect and other things. With MVC, I no longer use a "server control", but a "function" on a ViewModel to render that text: CollegeProjectViewModel.RenderDisplayName(). Since this is only part of the UI layer, this will render the Anchor as needed with any options I wish (of course, the abstract is inherited by the CollegeProjectViewModel that picks up on the "basic" text rendering).
MVC's power lies in the ability to no longer require a "webpage", but instead "functions" or methods of what you want to do with your site. By changing to this way of thinking, you really can scale with as many method you create on your Controllers. It really speeds things up on a mass scale IMO.
I worked on a MVC project at my last company for 6 months (we were using the CTP builds and eventually the beta builds). Initially, it was fun and exciting and it felt like we were really on to something. Like a lot of .NET developers out there, we were tired of the leaky abstractions of Web Forms.
However, as time progressed, we started to question our decision. The UI development was taking like 80% + of our time. We had to build all our UI from the ground up. Half the time it felt like we were reinventing the wheel. Most of our Rich UI came from JQuery combined with Custom HTML Helpers, which were fun to design, but time consuming.
There were other problems we were encountering, like the necessity of DTO-like objects to map from our business objects (fetched from a repository backed by NHibernate) to the Views. And our controllers, which were apparently supposed to be lightweight and easy to maintain, were becoming increasingly cluttered and we were constantly arguing about the proper way to implement controller inheritance.
In retrospect, I feel all the problems we were facing were due to our lack of experience and understanding of MVC. We all liked the idea of MVC, but just didn't have the practical experience and know-how to use it effectively on what I consider to be a very complex (imagine something along the lines of Sales Force, but with better reporting) application.
-- UPDATE --
Been using it the last month to work on a very small project and so far things are going smoothly. It's much easier to work with than the CTP versions I was using a year ago. I am currently looking at my own personal solution for complex "grid views", and then I might switch over completely for most projects. However, Dynamic Data has been treating me proper and I am sort of torn between the 2.
-- UPDATE 2011 --
After several various sized MVC projects over the past year or so, I have become somewhat of a convert. All the real issues I had with it have mostly been resolved in the latest versions (2 & 3), particularly the ones dealing with model validation and binding to and from views.
One thing though: it still can be a bit tedious to create highly interactive data grids, something that is still somewhat easier in WebForm. However, there are 3rd party offering that provide useful MVC extensions making this less of a concern. Personally, I use Telerik's offerings to great ends.
Among many benefits to using MVC is the removal of the viewstate hog.
If your Webform app is really large and uses a lot of server-side items that bloat your line with viewstate, then MVC may actually help you, even though it may take longer to develop.
On the flip side of that, be on the lookout for .NET v4.0 which will allow you to control viewstate on the control level instead of just on the page level. That will make MVC even less palatable overall.
I think you're right that it will take your team time to adapt to the new technology, and this will take extra time in the short term.
I wouldn't start using MVC in production until are some decent books out and the team has had a chance to read the books and play with the technology. Otherwise it seems your dev team will spend a lot of time watching screencasts and fishing for documentation.
I came from webform development (just like you), from 1.0 up until 3.5. When I discovered MVC (CTP), it took me about 6 months to convince my peers (and my boss) that it is the way to go.
Some of the highlights of my arguments:
Full control of HTML
TRUE AJAX (instead of update panel)
Possibility of using jQuery exponentially increased
No VIEWSTATE
Separation of concern
.. and .. (drum roll) ... faster development
Although #6 is a little bit subjective, but I did try to prove it by building prototypes. For my prototype, I built a simple dashboard web app, using both webform and asp.net mvc. I showed my peers and my boss the result, as well as the complexity of building and maintaining each one. In the end, we migrate our main methodology from webform to MVC.
It is true that it takes a while to "unlearn" some webform paradigm. But once you get it, MVC is so much easier to pick up and you can run with it.
In webform, yes it is powerful, but often in large projects, we spend a lot of our time trying to "customizing" or "coercing" a server control to behave and perform like the way we want it - and as complexity of the system goes up, the complexity of this customization also goes up exponentially.
TRUE AJAX is also quite difficult in webform. UpdatePanel has its role, but nested update panels has its own share of problems as well.
For me and my peers, it boils down to the ability to control our HTML/code/AJAX - instead of automatically generated 90% by the framework but we have to spend a lot of time and effort to get the rest 10%.
ASP.NET MVC, combined with jQuery, and your prefered biz tier framework or ORM, is extremely powerful. So far to date, we have released 3 production releases with ASP.NET MVC and they all perform well - heck take a look at stackoverflow.com (it uses MVC btw).

Resources