CHAPTER 1 WHAT’S THE BIG IDEA?
13
Comparisons with Ruby on Rails
Rails has become a benchmark against which other Web platforms are compared. Developers and
companies who are in the Microsoft .NET world will find ASP.NET MVC far easier to adopt and learn,
whereas developers and companies that work in Python or Ruby on Linux or Mac OS X will find an easier
path to Rails. It’s unlikely that you would migrate from Rails to ASP.NET MVC or vice versa. There are some
real differences in scope between the two technologies.
Rails is a holistic development platform, meaning that it handles the complete stack, right from
database source control, through ORM, to handling requests with controllers and actions—all topped off
with built-in automated testing tools.
The ASP.NET MVC Framework focuses on handling Web requests in an MVC-pattern with controllers
and actions. It does not have a built-in ORM tool, a built-in automated testing tool, or a system for
managing database migrations. This is because the .NET platform already has an enormous range of
choices for these functions, and you can use any of them. For example, if you’re looking for an ORM tool,
you might use NHibernate, Subsonic, Microsoft’s Entity Framework, or one of the many other mature
solutions available. Such is the luxury of the .NET platform, although this does mean that these
components are not as tightly integrated into ASP.NET MVC as the equivalents are into Rails.
Comparisons with MonoRail
MonoRail is an earlier .NET-based MVC Web application platform, created as part of the open source
Castle project and in development since 2003. In many ways, MonoRail acted as the prototype for
ASP.NET MVC. MonoRail demonstrated how a Rails-like MVC architecture could be built on top of
ASP.NET and established patterns, practices, and terminology that are used throughout Microsoft’s
implementation.
We don’t see MonoRail as a serious competitor. It is probably the most popular .NET Web application
platform created outside Redmond, and it did achieve reasonably widespread adoption in its day.
However, since the launch of ASP.NET MVC, the MonoRail project is rarely heard of. The momentum of
enthusiasm and innovation in the .NET Web development world is now focused on ASP.NET MVC.
What’s New in ASP.NET MVC 4?
Version 4 of the MVC Framework provides a number of improvements over version 3. There are some
significant new features such as support for Web API applications (which we describe in Chapter 25),
support for mobile devices (Chapter 24) and some useful optimization techniques for sending content to
clients (Chapter 24).
In addition, there are lots of small improvements, such as a simplified syntax for Razor views, a better
organized system for providing core configuration information in MVC applications and some new
template options for Visual Studio MVC projects.
Summary
In this chapter, we have described how Web development has evolved at tremendous speed from the
primordial swamp of the CGI executable to the latest high-performance, standards-compliant, agile
platforms. We reviewed the strengths, weaknesses, and limitations of ASP.NET Web Forms, Microsoft’s
main Web platform since 2002, and the changes in the wider Web development industry that forced
Microsoft to respond with something new.
You saw how the ASP.NET MVC platform addresses the weaknesses of ASP.NET Web Forms, and how
its modern design delivers advantages to developers who want to write high-quality, maintainable code.
In the next chapter, you’ll see the MVC Framework in action, learning the simple mechanisms that
yield all these benefits. By Chapter 7, you’ll be ready for a realistic e-commerce application built with a
clean architecture, proper separation of concerns, automated tests, and beautifully minimal markup.