ASP.NET MVC RC Released!

The new version of ASP.NET is very, very close.  Scott Guthri just announced that the RC was publicly available.  I'm pumped about this release not only because of my book, but also because this new release makes delivering with ASP.NET sooooooooooooo much easier than WebForms.  One piece of functionality that is not spoken about so much is the ability for a partial view to use a layout (Master Page).  That's right, folks.  You can have a partial that only displays a snippet of a shopping cart, and that partial can use a master page.  Then, the resulting markup is within the main view, which may also be using a master page.  All in all, we just use ".aspx" views.  We don't even bother with ".ascx" views since they don't provide any additional advantage, and they don't work with master pages.

Great job to the ASP.NET MVC team. 

Prediction:  ASP.NET MVC will supersede WebForms for new project development within 2 years time.  Web Forms isn't going away by any stretch, but for new projects, I think MVC is going to edge it out, even if just 51% to 49% of new ASP.NET projects.


Trackbacks

ASP.net MVC RC1 Released!!! Posted on 1.28.2009 at 11:09 AM

ASP.net MVC RC1 Released!!!

ASP.net MVC RC1 Released!!! Posted on 1.28.2009 at 11:14 AM

ASP.net MVC RC1 Released!!!

ASP.NET MVC RC Released! : Jeffrey Palermo (.com) Posted on 1.28.2009 at 7:14 PM

Pingback from ASP.NET MVC RC Released! : Jeffrey Palermo (.com)

ASP.NET MVC 2.0 and VS 2010 plan now public Posted on 6.09.2009 at 10:21 PM

Subscribe to my feed here: feeds.jeffreypalermo.com/.../jeffreypalermo Phil Haack   has shared some of the plans in the works for ASP.NET MVC 2.0  After the initial release, the team didn’t slow down at all.  They have a great line-up

Comments

Eric said on 1.28.2009 at 10:49 AM

re: Prediction

We'll see...

I remember originally a lot of people involved in the MVC project said that it wasn't for "enterprise applications" and that you'd want to use "classic" Web Forms with all their datagrid-goodness. That was puzzling to me because in the end all you are doing is slinging around HTML text. You could write a web app in a compiled C++ app using a CGI library, and in fact many of us did (ah... those were the days).

I too am somewhat excited about ASP.NET MVC, but I have my reservations. I guess my problem is that there are a lot of things about web development that still irk me (compared to Windows Forms, WPF, and even VB6/MFC). I know it will probably never happen, but I'd be happier if something like Silverlight (or heck... Java apps were here 10+ years ago) took to the forefront.

Looking forward to the completion of your Manning book. I've been a part of the MEAP program for quite some time in anticipation. Manning has so many great titles coming down the pipe. I think I have like 6 or 7 MEAP books purchased (they usually send me coupon codes for discounts on the purchase price via their monthly newsletter).

Johannes Hansen said on 1.28.2009 at 12:55 PM

A bold statement... Only time will tell if you're right.

However, I disagree... Not because I don't like the MVC framework. I do! And if I had to choose I would choose MVC over WebForms any day.But I think many of my co-developers won't let go of the comfort they find in using something they know. Maybe tool support will change this with time but I think 2 years is too little time. But I'm like 60% for more than 2 years and 40% for less than to years, so it's a close call. I also think some types of applications will see more early adoption. I'm currently developing applications for internal use in a company that only uses IE as browser so compatibility isn't such a major issue at the moment. If it were I think I would try to sell MVC more internally.

My hopes are like Erics in that I hope silverlight will mature to support lob applications. I personally like the silvelight model more than MVC in that it gives the best of both worlds in my opinion.

Brian Sullivan said on 1.28.2009 at 1:20 PM

@johannes - Re: developers leaving their comfort-zones - If this were always the case, people would never change platforms. Are people still developing line of business apps with VB6? Some, but not many. If you're developing for the Windows platform, more than likely you've moved on to Windows Forms in .NET.

I think, in this case, whether WebForms moves into the "legacy" category will depend on Microsoft's attitude toward ASP.NET MVC. If they continue to hedge as they have been up to this point by saying "ASP.NET MVC isn't for everybody," it may hamper MVC adoption. If they've got enough courage to say, "ASP.NET MVC is, overall, a better way to build applications," then Jeffrey's prediction may well come true.

I think that the rest of the industry has borne out that MVC is good pattern for developing web apps, given the rising popularity of frameworks like Rails and Django.

Craig said on 1.28.2009 at 2:51 PM

I'd actually like to see MVC in other things like windows forms, silverlight, java, etc. The problem with the event driven model that VB6 and other tools gave us is it invites the developer to dump a lot of things in the code-behind that don't belong there--things like business logic and data access. I believe this is because the functionality starts at the button click, drop down, mouse move, or whatever, which all gets handled in the codebehind. It then takes extra work to call out to a presenter or controller. Its all to easy to just handle everything the Button1_Click method.

If instead, all events were instantly routed to a controller class which then made calls to the appropriate layer and returned the data to the view, the way these web frameworks are doing, things would be a lot different.

mknopf said on 1.28.2009 at 2:52 PM

Jeff

I agree with your prediction that ASP.NET MVC will supersede WebForms for new project development and WebForms will be considered a legacy framework within 2 years time. While Web Forms has become a strong force in the industry its limitations have been felt with intense pain (a pain that is also well documented) and ultimately will lead Web Forms down the path of Classic ASP (into the graveyard).

Just like the transition from Classic ASP to Web Forms, developers will have to pretty much learn an entirely new way of doing things. I've been working in Web Forms since 2002 and started on MVC with Preview 2 and let me tell you this: very little ports from one to the other. So for the developers out there who are just starting to look at MVC you need to be prepared to toss the vast majority of your experience in the trash and start all over again. This isn't to say that it's not worth it, nothing worth while is easy and neither is the switch from Web Forms to MVC.

Jeffrey Palermo said on 1.28.2009 at 3:37 PM

@mknopf,

I think that, on the contrary, you will not have to toss away all your knowledge. WebForms is a web UI framework. So is MVC. Only the UI layer changes.

Now, if you have unfortunately put non-UI logic in your UI, then you are in a tough spot.

suedeuno said on 1.29.2009 at 8:03 AM

Jeff, I only briefly look at one of the early versions. Does the .net MVC require anything like Ent Lib? I hope not.

Johannes Hansen said on 1.29.2009 at 10:21 AM

@Brian

Man, I hope you're right. I hope the company I work for will be forced to go new ways and take a fresh look at things. Perhaps the rest of the world isn't as reluctant to change as my coworkers are but I'm just saying that from my perspective 2 years seems like a short period. Personally I would change to MVC asap if it were me who called the shots.

Jeffrey Palermo said on 1.29.2009 at 11:53 AM

Just like any programming language or framework, WebForms will live for many decades. My prediction is that the shift will be within two years time to ASP.NET MVC for most new ASP.NET development.

Jeff Gonzalez said on 1.29.2009 at 12:12 PM

@eric

You said:

>I remember originally a lot of people involved in the MVC project said that it wasn't for "enterprise applications" and that you'd want to use "classic" Web Forms with all their datagrid-goodness.

I don't remember anybody saying that. Maybe they were just saying (the obvious) don't use the beta for enterprise software?

ASP.NET MVC isn't a mature, and not as "rich" as classic ASP.NET, but I see no reason not to at least consider it for a development platform in nearly any scenario you would consider using ASP.NET, if for no other reason that the potential for more test coverage and a more appropriate level of abstraction from your UI.

Jeff Gonzalez

Adam said on 1.29.2009 at 2:46 PM

I hope and pray that your prediction is correct. Unfortunately, there is a lot of FUD around Asp.Net MVC. To give a real world example. I recently started a new project using Asp.Net MVC Beta 1. I felt the technology was stable, did not want to start building something on "outdated" technology, and wanted the testability and clean HTML that MVC gives.

I had excellent code coverage on my unit tests, along with a full set of web tests built on top of WatiN, all showing that the application worked as the customer wanted. Today I am porting everything over to web forms because the powers that be said so. Unfortunately the word Beta carried too high a price for some. There was also some confusion as whether Asp.Net MVC was a brand new technology like Asp.Net when it first came out (I don’t think it is), and that it’s only used to enable switching out views (which it could be used for, but in all of the talks and examples it seems testability and separation of concerns were the driving factors).

Ironically I was involved in a meeting talking about another project that has 0 automated testing, and what a pain it is to re-test all of its functionality when just one little thing changes. However it’s those little changes that are impacting non-obvious parts of the code.

Jeffrey Palermo said on 1.29.2009 at 2:50 PM

@Adam,

I'm sorry. Why don't you come work for us. :-).

Mike Stokes said on 1.29.2009 at 3:03 PM

MVC is revolutionary for Microsoft and given the huge base of established devs using ASP.NET it would be a truly exciting thing to see them transitioning to MVC...

Just look at Ruby on Rails and the love it has from it's huge community of developers - here's hoping the MVC community expands and gets this similar attention that it deserves. I for one love MVC and the job the guys have done to this point with Release Candidate 1.

craig said on 1.29.2009 at 4:20 PM

So jeffrey, could you share you syntax to use partial asp.net partial views instead of .ascx?

Adam said on 1.29.2009 at 6:21 PM

Jeff,

If I lived in Austin, I would have applied long ago. Maybe I'll have the chance in a couple of years. Been talking about relocating to a warmer climate anyway. I might be down in Austin for the 1/2 Ironman they run in October and to do some relocation scouting.

jiang said on 1.29.2009 at 8:25 PM

What a childish prediction! For one thing, Webforms are a higher level of abstration and MVC is primitive HTML, php type of low productivity more internet type of platform. For Intranet, nothing beat Webform in productivity. We will see Webforms dominate intranet, LOB applications and ASP.NET MVC hopefully makes inroads on Java land.

Jeffrey Palermo said on 1.30.2009 at 8:08 AM

@jiang,

Thank you for the kind words. I find that programmers are actually writing less Html with ASP.NET MVC than I saw them write with WebForms. This is because the html helper model is a snap to abstract common ui widgets.

We are already seeing WebForms dominate intranet, LOB applications. I think at the 2yr mark, that will shift.

Craig said on 1.30.2009 at 12:31 PM

@jiang,

Indeed, webforms is a higher level of abstraction, but that abstraction is leaky and in many ways more complicated then dealing w/ html and the response/request lifecycle of pages. Think how many events are in Page. When is viewstate available in those events and when is it not? Think of all the steps to modify a textbox's properties that exists in a datagrid using codebehind. Integration with Javascript and html are far more complicated w/ webforms because asp.net modifies your ID attributes thru the control tree. Just today I had to work around a bug internal to asp.net webforms and asp.net ajax that blew 3 hours of our clients money. And on and on.

Even if you wrote less code with webforms (which in my experience is not the case), it often takes my developers and web designers longer to figure out how to get webforms to behave the way we want to, because of all this extra complexity in the "abstraction layer." My experience with MVC so far has indicated that the simplicity of the framework and its separation of concerns equals much greater productivity then webforms. I should know, I've been doing webforms since asp.net came out.

Also, its important to note that there are and will likely continue to be different view engines that allow cleaner syntax and more productivity then simply putting <% %> blocks, as well as things like Jquery and Mojo that can take the place of controls. I've found that these tools are easier to deal with, style, and tweak then many of the 3rd party control libraries out there.

IMHO, Webforms needs to die, and the faster the better. There are still some things I like about webforms, but they aren't worth the overall pain.

JP Toto said on 2.03.2009 at 3:33 PM

Totally agree,Jeff. Good stuff. Any idea when the pdf version of your book will be available? Usually that hits before the print version right?

Keep up the great work!