CHAPTER 1 ■ WHAT’S THE BIG IDEA?
13
ASP.NET MVC Is Open Source
Unlike with previous Microsoft web development platforms, you’re free to download the original source
code for ASP.NET MVC, and even modify and compile your own version of it. This is invaluable when
your debugging trail leads into a system component, and you want to step into its code (and even read
the original programmers’ comments). It’s also useful if you’re building an advanced component and
want to see what development possibilities exist, or how the built-in components actually work.
Additionally, this ability is great if you don’t like the way something works, if you find a bug, or if you
just want to access something that’s otherwise inaccessible, because you can simply change it yourself.
However, you’ll need to keep track of your changes and reapply them if you upgrade to a newer version
of the framework. ASP.NET MVC is licensed under the Microsoft Public License (Ms-PL,
http://www.opensource.org/licenses/ms-pl.html), an Open Source Initiative (OSI)–approved open
source license. This means that you can change the source code, deploy it, and even redistribute your
changes publicly as a derivative project. However, Microsoft does not accept patches to the official build.
At present, Microsoft will ship only code that’s the product of its development and quality assurance
(QA) teams. You can download the MVC source code from http://aspnet.codeplex.com/.
Who Should Use ASP.NET MVC?
As with any new technology, the fact of ASP.NET MVC’s existence isn’t a compelling reason to adopt it.
Here, we’ll give you our view of how the MVC Framework compares with the most obvious alternatives.
We’ve tried to be as unbiased as two people writing a book about the MVC Framework can be, but we
know that there is a limit to our objectivity. The following sections are technology-based comparisons.
When selecting a web application framework, you should also consider the skills of your team, the work
involved in porting any existing projects, and your relationship with, and confidence in, the technology
source.
Comparisons with ASP.NET Web Forms
We have already detailed the weaknesses and limitations in traditional ASP.NET Web Forms, and how
ASP.NET MVC overcomes many of those problems. That doesn’t mean that Web Forms is dead, though.
Microsoft has repeatedly stated that both technologies are being actively developed and actively
supported, and that there are no plans to retire Web Forms. In some ways, your choice between the two
is a matter of development philosophy. Consider these points:
• Web Forms takes the view that UIs should be stateful, and to that end, adds a
sophisticated abstraction layer on top of HTTP and HTML, using View State and
postbacks to create the effect of statefulness. This makes it suitable for drag-and-
drop Windows Forms–style development, in which you pull UI widgets onto a
canvas and fill in code for their event handlers.
• MVC embraces HTTP’s true stateless nature, working with it rather than fighting
against it. The MVC Framework requires you to understand how web applications
actually work. Given that understanding, it provides a simple, powerful, modern
approach to writing web applications, with tidy code that’s easier to extend and
maintain over time, and that’s free of bizarre complications and painful
limitations.
Download at www.Pin5i.Com