It's a great time to be an ASP.NET developer!
Whether you've been developing with ASP.NET for years or are just getting started, now is a great time to dig into ASP.NET MVC. ASP.NET MVC has been a lot of fun to work with from the start, but the last two releases have added many features that make the entire development process really enjoyable.
ASP.NET MVC 3 brought features like the Razor view engine, integration with the NuGet package management system, and built-in integration with jQuery to simplify Ajax development. ASP.NET MVC 5 continues that trend, with a refreshed visual design, mobile web support, easier HTTP services using ASP.NET Web API, easier integration with popular sites with built-in OAuth support, and more. The combined effect is that you can get started quickly with full-featured web applications.
This isn't just drag-and-drop short-term productivity, either. It's all built on a solid, patterns-based web framework that gives you total control over every aspect of your application, when you want it.
Join us for a fun, informative tour of ASP.NET MVC 5!
Professional ASP.NET MVC 5 is designed to teach ASP.NET MVC, from a beginner level through advanced topics.
If you are new to ASP.NET MVC, this book gets you started by explaining the concepts, and then helps you apply them through plenty of hands-on code examples. The authors have taught thousands of developers how to get started with ASP.NET MVC and know how to cut through boring rhetoric to get you up and running quickly.
We understand that many of our readers are familiar with ASP.NET Web Forms, so in some places we'll point out some similarities and differences to help put things in context. It's worth noting that ASP.NET MVC 5 is not a replacement for ASP.NET Web Forms. Many web developers have been giving a lot of attention to other web frameworks (Ruby on Rails, Node.js, Django, several PHP frameworks, etc.) that have embraced the MVC (Model-View-Controller) application pattern. If you're one of those developers, or even if you're just curious, this book is for you.
We've worked hard to make sure that this book is valuable for developers who are experienced with ASP.NET MVC, as well. Throughout the book, we explain how things are designed and how best to use them. We've added in-depth coverage of new features, including a greatly expanded chapter on Routing to cover the new Attribute Routing feature in this release. We've updated the NuGet Gallery case study in the final chapter (explaining how the NuGet development team build and run a real-world, high-volume ASP.NET MVC website) with some interesting lessons learned, directly from the development team. Finally, there's a new chapter from K. Scott Allen explaining how to build Single Page Applications with AngularJS.
This book is divided into two very broad sections, each comprising several chapters. The first six chapters are concerned with introducing the MVC pattern and how ASP.NET MVC implements that pattern.
The following ten chapters build on this foundation, introducing some more advanced concepts and applications.
To use ASP.NET MVC 5, you'll probably want a copy of Visual Studio. You can use Microsoft Visual Studio Express 2013 for Web or any of the paid versions of Visual Studio 2013 (such as Visual Studio 2013 Professional). Visual Studio 2013 includes ASP.NET MVC 5. Visual Studio and Visual Studio Express are available from the following locations:
You can also use ASP.NET MVC 5 with Visual Studio 2012. This is included as part of an update for ASP.NET and Web Tools for Visual Studio 2012 available at the following location:
Chapter 1 reviews the software requirements in depth, showing how to get everything set up on both your development and server machines.
To help you get the most from the text and keep track of what's happening, we've used a number of conventions throughout the book.
As for styles in the text:
persistence.properties
.We use a monofont type with no highlighting for most code examples.
We use bold to emphasize code that is particularly important in the present
context or to show changes from a previous code snippet.
Throughout the book you'll notice places where we suggest that you install a NuGet package to try out some sample code.
Install-Package SomePackageName
NuGet is a package manager for .NET and Visual Studio written by the Outercurve Foundation and incorporated by Microsoft into ASP.NET MVC.
Rather than having to search around for ZIP files on the Wrox website for source code samples, you can use NuGet to easily add these files into an ASP.NET MVC application from the convenience of Visual Studio. We think this will make it much easier and painless to try out the samples. Chapter 10 explains the NuGet system in greater detail.
Some chapters use examples that require an entire Visual Studio project, which is more easily distributed as a ZIP file. Source code for these chapters is available at http://www.wrox.com/go/proaspnetmvc5.
If you would like to download the sample NuGet packages for later use without an Internet connection, they are also available for download at http://www.wrox.com/go/proaspnetmvc5.
Once you download the code, just decompress it with your favorite compression tool. Alternately, you can go to the main Wrox code download page at www.wrox.com/dynamic/books/download.aspx to see the code available for this book and all other Wrox books.
We make every effort to ensure that there are no errors in the text or in the code. However, no one is perfect, and mistakes do occur. If you find an error in one of our books, like a spelling mistake or faulty piece of code, we would be very grateful for your feedback. By sending in errata you may save another reader hours of frustration and at the same time you will be helping us provide even higher quality information.
To find the errata page for this book, go to www.wrox.com and locate the title using the Search box or one of the title lists. Then, on the book details page, click the Errata link. On this page you can view all errata that has been submitted for this book and posted by Wrox editors. A complete book list, including links to each book's errata, is also available at www.wrox.com/misc-pages/booklist.shtml.
If you don't spot “your” error on the Errata page, go to www.wrox.com/contact/techsupport.shtml and complete the form there to send us the error you have found. We'll check the information and, if appropriate, post a message to the book's errata page and fix the problem in subsequent editions of the book.
For author and peer discussion, join the P2P forums at p2p.wrox.com. The forums are a web-based system for you to post messages relating to Wrox books and related technologies and interact with other readers and technology users. The forums offer a subscription feature to e-mail you topics of interest of your choosing when new posts are made to the forums. Wrox authors, editors, other industry experts, and your fellow readers are present on these forums.
At http://p2p.wrox.com you will find a number of different forums that will help you not only as you read this book, but also as you develop your own applications. To join the forums, just follow these steps:
Once you join, you can post new messages and respond to messages other users post. You can read messages at any time on the Web. If you would like to have new messages from a particular forum e-mailed to you, click the Subscribe to this Forum icon by the forum name in the forum listing.
For more information about how to use the Wrox P2P, be sure to read the P2P FAQs for answers to questions about how the forum software works as well as many common questions specific to P2P and Wrox books. To read the FAQs, click the FAQ link on any P2P page.