<p>I just listened to the StackOverflow team's 17th podcast, and they talked so highly of <a href="http://www.asp.net/mvc/" rel="noreferrer">ASP.NET MVC</a> that I decided to check it out.</p>

<p>But first, I want to be sure it's worth it. I already created a base web application (for other developers to build on) for a project that's starting in a few days and wanted to know, based on your experience, if I should take the time to learn the basics of MVC and re-create the base web application with this model.</p>

<p>Are there really big pros that'd make it worthwhile?</p>

<p>EDIT: It's not an existing project, it's a project about to start, so if I'm going to do it it should be now...</p>

<hr>

<p>I just found this</p>

<blockquote>
  <p>It does not, however, use the existing post-back model for interactions back to the server.  Instead, you'll route all end-user interactions to a Controller class instead - which helps ensure clean separation of concerns and testability (<strong>it also means no viewstate or page lifecycle with MVC based views</strong>).</p>
</blockquote>

<p>How would that work? No viewstate? No events?</p>

[{'answer_id': 30078, 'author': 'Booji Boy', 'author_id': 1433, 'author_profile': 'https://Stackoverflow.com/users/1433', 'pm_score': 2, 'selected': False, 'text': "<p>Unless the developers you are working with are familiar with MVC pattern I wouldn't. At a minimum I'd talk with them first before making such a big change.  </p>\n"}, {'answer_id': 30084, 'author': 'Thomas Owens', 'author_id': 572, 'author_profile': 'https://Stackoverflow.com/users/572', 'pm_score': 1, 'selected': False, 'text': '<p>I wouldn\'t recommend just making the switch on an existing project. Perhaps start a small "demo" project that the team can use to experiment with the technology and (if necessary) learn what they need to and demonstrate to management that it is worthwhile to make the switch. In the end, even the dev team might realize they aren\'t ready or it\'s not worth it.</p>\n\n<p>Whatever you do, be sure to document it. Perhaps if you use a demo project, write a postmortem for future reference.</p>\n'}, {'answer_id': 30097, 'author': 'JamesSugrue', 'author_id': 1075, 'author_profile': 'https://Stackoverflow.com/users/1075', 'pm_score': 3, 'selected': False, 'text': "<p>I would create a test site first, and see what the team thinks, but for me I wouldn't go back to WebForms after using MVC.</p>\n\n<p>Some people don't like code mixed with HTML, and I can understand that, but I far prefer the flexibility over things like Page Lifecycle, rendering HTML and biggy for me - no viewstate cruft embedded in the page source.</p>\n\n<p>Some people prefer MVC for better testibility, but personally most of my code is in the middle layer and easily tested anyway...</p>\n"}, {'answer_id': 30116, 'author': 'Ivan Bosnic', 'author_id': 3221, 'author_profile': 'https://Stackoverflow.com/users/3221', 'pm_score': 1, 'selected': False, 'text': '<p>I dont´t know ASP.NET MVC, but I am very familiar with MVC pattern. I don´t see another way to build professional applications without MVC. And it has to be MVC model 2, like Spring or Struts. By the way, how you people were building web applications without MVC? When you have a situation that some kind of validation is necessary on every request, as validating if user is authenticated, what is your solution? Some kind of include(validate.aspx) in every page?</p>\n'}, {'answer_id': 30134, 'author': 'Zack Peterson', 'author_id': 83, 'author_profile': 'https://Stackoverflow.com/users/83', 'pm_score': 2, 'selected': False, 'text': '<p>I\'m trying to make that same decision about ASP.NET MVC, <a href="https://stackoverflow.com/users/1782/juan-manuel">Juan Manuel</a>.  I\'m now waiting for the right bite-sized project to come along with which I can experiment.  If the experiment goes well--my gut says it will--then I\'m going to architect my new large projects around the framework.</p>\n\n<p>With ASP.NET MVC you lose the viewstate/postback model of ASP.NET Web Forms.  Without that abstraction, you work much more closely with the HTML and the HTTP POST and GET commands.  I believe the UI programming is somewhat in the direction of classic ASP.</p>\n\n<p>With that inconvenience, comes a greater degree of control.  I\'ve very often found myself fighting the psuedo-session garbage of ASP.NET and the prospect of regaining complete control of the output HTML seems very refreshing.</p>\n\n<p>It\'s perhaps either the best--or the worst--of both worlds.</p>\n'}, {'answer_id': 30147, 'author': 'ryw', 'author_id': 2477, 'author_profile': 'https://Stackoverflow.com/users/2477', 'pm_score': 1, 'selected': False, 'text': "<p>No, you shouldn't. Feel free to try it out on a new project, but a lot of people familiar with ASP.NET webforms aren't loving it yet, due to having to muck around with raw HTML + lots of different concepts + pretty slim pickings on documentation/tutorials. </p>\n"}, {'answer_id': 30181, 'author': 'Ian Patrick Hughes', 'author_id': 2213, 'author_profile': 'https://Stackoverflow.com/users/2213', 'pm_score': 3, 'selected': False, 'text': '<p>@Juan Manuel Did you ever work in classic ASP? When you had to program all of your own events and "viewstatish" items (like a dropdown recalling its selected value after form submission)?</p>\n\n<p>If so, then ASP.NET MVC will not feel that awkward off the bat. I would check out Rob Conery\'s Awesome Series "<a href="http://blog.wekeroad.com/mvc-storefront/" rel="nofollow noreferrer">MVC Storefront</a>" where he has been walking through the framework and building each expected component for a storefront site. It\'s really impressive and easy to follow along (catching up is tough because Rob has been reall active and posted A LOT in that series).</p>\n\n<p>Personally, and quite contrary to Jeff Atwood\'s <a href="https://stackoverflow.fogbugz.com/default.asp?W24212" rel="nofollow noreferrer">feelings on the topic</a>, I rather liked the webform model. It was totally different than the vbscript/classic ASP days for sure but keeping viewstate in check and writing your own CSS friendly controls was enjoyable, actually.</p>\n\n<p>Then again, note that I said "liked". ASP.NET MVC is really awesome and more alike other web technologies out there. It certainly is easier to shift from ASP.NET MVC to RAILS if you like to or need to work on multiple platforms. And while, yes, it is very stable obviously (this very site), if your company disallows "beta" software of any color; implementing it into production at the this time might be an issue.</p>\n'}, {'answer_id': 30260, 'author': 'Matthew Ruston', 'author_id': 506, 'author_profile': 'https://Stackoverflow.com/users/506', 'pm_score': 0, 'selected': False, 'text': "<p>Is the fact that ASP.net MVC is only in 'Preview 5' be a cause for concern when looking into it? </p>\n\n<p>I know that StackOverflow was created using it, but is there a chance that Microsoft could implement significant changes to the framework before it is officially out of beta/alpha/preview release?</p>\n"}, {'answer_id': 30284, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 2, 'selected': False, 'text': '<blockquote>\n  <p>I dont´t know ASP.NET MVC, but I am very familiar with MVC pattern. I don´t see another way to build professional applications without MVC. And it has to be MVC model 2, like Spring or Struts. By the way, how you people were building web applications without MVC? When you have a situation that some kind of validation is necessary on every request, as validating if user is authenticated, what is your solution? Some kind of include(validate.aspx) in every page?</p>\n</blockquote>\n\n<p>Have you never heard of N-Tier development?</p>\n'}, {'answer_id': 30294, 'author': 'FlySwat', 'author_id': 1965, 'author_profile': 'https://Stackoverflow.com/users/1965', 'pm_score': 4, 'selected': False, 'text': '<p>I have used ASP.NET MVC (I even wrote a HTTPModule that lets you define the routes in web.config), and I still get a bitter taste in my mouth about it.</p>\n\n<p>It seems like a giant step backwards in organization and productivity. Maybe its not for some, but I\'ve got webforms figured out, and they present no challenge to me as far as making them maintainable.</p>\n\n<p>That, and I don\'t endorse the current "TEST EVERYTHING" fad...</p>\n'}, {'answer_id': 30496, 'author': 'Ian Patrick Hughes', 'author_id': 2213, 'author_profile': 'https://Stackoverflow.com/users/2213', 'pm_score': 3, 'selected': False, 'text': '<p>@Jonathan Holland I saw that you were voted down, but that is a VERY VALID point. I have been reading some posts around the intertubes where people seem to be confusing ASP.NET MVC <em><a href="http://www.asp.net/mvc/" rel="noreferrer">the framework</a></em> and MVC <em><a href="http://en.wikipedia.org/wiki/Model-view-controller" rel="noreferrer">the pattern</a></em>.</p>\n\n<p>MVC in of itself is a <strong>DESIGN PATTERN</strong>. If all you are looking for is a "separation of concerns" then you can certainly achieve that with webforms. Personally, I am a big fan of the <a href="http://msdn.microsoft.com/en-us/magazine/cc188690.aspx" rel="noreferrer">MVP pattern</a> in a standard n-tier environment.</p>\n\n<p>If you really want TOTAL control of your mark-up in the ASP.NET world, then MVC the ramework is for you.</p>\n'}, {'answer_id': 30656, 'author': 'Rex M', 'author_id': 67, 'author_profile': 'https://Stackoverflow.com/users/67', 'pm_score': 5, 'selected': False, 'text': '<p>It\'s important to keep in mind that MVC and WebForms are not competing, and one is not better than the other. They are simply different tools. Most people seem to approach MVC vs WebForms as "one must be a better hammer than the other". That is wrong. One is a hammer, the other is a screwdriver. Both are used in the process of putting things together, but have different strengths and weaknesses.</p>\n\n<p>If one left you with a bad taste, you were probably trying to use a screwdriver to pound a nail. Certain problems are cumbersome with WebForms that become elegant and simple with MVC, and vice-versa.</p>\n'}, {'answer_id': 52876, 'author': 'azamsharp', 'author_id': 3797, 'author_profile': 'https://Stackoverflow.com/users/3797', 'pm_score': 4, 'selected': False, 'text': '<p>ASP.NET MVC basically allows you to separate the responsibility of different sections of the code. This enable you to test your application. You can test your Views, Routes etc. It also does speed up the application since now there is no ViewState or Postback. </p>\n\n<p>BUT, there are also disadvantages. Since, you are no using WebForms you cannot use any ASP.NET control. It means if you want to create a GridView you will be running a for loop and create the table manually. If you want to use the ASP.NET Wizard in MVC then you will have to create on your own. </p>\n\n<p>It is a nice framework if you are sick and tired of ASP.NET webform and want to perform everything on your own. But you need to keep in mind that would you benefit from creating all the stuff again or not? </p>\n\n<p>In general I prefer Webforms framework due to the rich suite of controls and the automatic plumbing. </p>\n'}, {'answer_id': 52893, 'author': 'Ben Scheirman', 'author_id': 3381, 'author_profile': 'https://Stackoverflow.com/users/3381', 'pm_score': 7, 'selected': True, 'text': "<p>If you are quite happy with WebForms today, then maybe ASP.NET MVC isn't for you.</p>\n\n<p>I have been frustrated with WebForms for a really long time.  I'm definitely not alone here.  The smart-client, stateful abstraction over the web breaks down severely in complex scenarios.  I happen to love HTML, Javascript, and CSS.  WebForms tries to hide that from me.  It also has some really complex solutions to problems that are really not that complex.  Webforms is also inherently difficult to test, and while you can use MVP, it's not a great solution for a web environment...(compared to MVC).</p>\n\n<p>MVC will appeal to you if...\n- you want more control over your HTML\n- want a seamless ajax experience like every other platform has\n- want testability through-and-through\n- want meaningful URLs\n- HATE dealing with postback &amp; viewstate issues</p>\n\n<p>And as for the framework being Preview 5, it is quite stable, the design is mostly there, and upgrading is not difficult.  I started an app on Preview 1 and have upgraded within a few hours of the newest preview being available.</p>\n"}, {'answer_id': 315728, 'author': 'rodbv', 'author_id': 79101, 'author_profile': 'https://Stackoverflow.com/users/79101', 'pm_score': 3, 'selected': False, 'text': '<p>If you are a professional ASP.NET developer, and have some time to spare on learning new stuff, I would certainly recommend that you spend some time trying out ASP.NET MVC. It may not be the solution to all your problems, and there are lots of projects that may benefit more from a traditional webform implementation, but while trying to figure out MVC you will certainly learn a lot, and it might bring up lots of ideas that you can apply on your job.</p>\n\n<p>One good thing that I noticed while going through many blog posts and video tutorials while trying to develop a MVC pet-project is that most of them follow the current best practices (TDD, IoC, Dependency Injection, and to a lower extent POCO), plus a lot of JQuery to make the experience more interesting for the user, and that is stuff that I can apply on my current webform apps, and that I wasn\'t exposed in such depth before.</p>\n\n<p>The ASP.NET MVC way of doing things is so different from webforms that it will shake up a bit your mind, and that for a developer is very good! </p>\n\n<p>OTOH for a total beginner to web development I think MVC is definitely a better start because it offers a good design pattern out of the box and is closer to the way that the web really works (HTML is stateless, after all). On MVC you decide on every byte that goes back and forth on the wire (at least while you don\'t go crazy on html helpers). Once the guy gets that, he or she will be better equipped to move to the "artificial" facilities provided by ASP.NET webforms and server controls.</p>\n'}, {'answer_id': 317224, 'author': 'Thomas Hansen', 'author_id': 29746, 'author_profile': 'https://Stackoverflow.com/users/29746', 'pm_score': 0, 'selected': False, 'text': "<p>If you are dead set on using an MVC framework, then I would rather set out to use Castle project's one...</p>\n\n<p>When that's said I personally think WebControls have a lot of advantages, like for instance being able to create event driven applications which have a stateful client and so on. Most of the arguments against WebControls are constructed because of lack of understanding the WebControl model etc. And not because they actually are truly bad...</p>\n\n<p>MVC is not a Silver Bullet, especially not Microsoft MVC...</p>\n"}, {'answer_id': 554556, 'author': 'Abdu', 'author_id': 5232, 'author_profile': 'https://Stackoverflow.com/users/5232', 'pm_score': 3, 'selected': False, 'text': "<p>If you like to use server controls which do a lot of work for you, you will NOT like MVC because you will need to do a lot of hand coding in MVC. If you like the GridView, expect to write one yourself or use someone else's.</p>\n\n<p>MVC is not for everyone, specially if you're not into unit testing the GUI part. If you're comfortable with web forms, stay with it. Web Forms 4.0 will fix some of the current shortcomings like the ID's which are automatically assigned by ASP.NET. You will have control of these in the next version.</p>\n"}, {'answer_id': 596824, 'author': 'Otpi', 'author_id': 72029, 'author_profile': 'https://Stackoverflow.com/users/72029', 'pm_score': 0, 'selected': False, 'text': "<p>I have seen some implementation of MVC framework where for the sake of testability, someone rendered the whole HTML in code. In this case the view is also a testable code. But I said, my friend, putting HTML in code is a maintenance nightmare and he said well I like everything compiled and tested. I didn't argue, but later found that he did put this HTML into resource files and the craziness continued...</p>\n\n<p>Little did he realized that the whole idea of separating View also solved the maintenance part. It  outweighs the testability in some applications. We do not need to test the HTML design if we are using WYSWYG tool. WebForms are good for that reason.</p>\n\n<p>I have often seen people abusing postback and viewstate and blaming it on the ASP .NET model. </p>\n\n<p>Remember the best webpages are still the .HTMLs and that's where is the Power of ASP .NET MVC.</p>\n"}, {'answer_id': 725397, 'author': 'Konstantin Tarkus', 'author_id': 82686, 'author_profile': 'https://Stackoverflow.com/users/82686', 'pm_score': 2, 'selected': False, 'text': '<h2><a href="http://weblogs.asp.net/dwahlin/archive/2009/04/06/5-reasons-you-should-take-a-closer-look-at-asp-net-mvc.aspx" rel="nofollow noreferrer">5 Reasons You Should Take a Closer Look at ASP.NET MVC</a></h2>\n'}, {'answer_id': 982618, 'author': 'Vjeran', 'author_id': 121113, 'author_profile': 'https://Stackoverflow.com/users/121113', 'pm_score': 2, 'selected': False, 'text': '<p>Ajax, RAD (webforms with ajax are anti-RAD very often), COMPLETE CONTROL (without developing whole bunch of code and cycles). webforms are good only to bind some grid and such and not for anything else, and one more really important thing - performance. when u get stuck into the web forms hell u will switch on MVC sooner or later.</p>\n'}]
['https://Stackoverflow.com/questions/30067', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1782/']