ASP.NET MVC 4 in Action

ASP.NET MVC 4 in Action

Jeffrey Palermo, Jimmy Bogard, Eric Hexter

Language: English

Pages: 440

ISBN: 1617290416

Format: PDF / Kindle (mobi) / ePub


ASP.NET MVC 4 in Action is a fast-paced tutorial designed to introduce ASP.NET MVC to .NET developers and show how to apply it effectively. All examples in this revised edition are based on ASP.NET MVC 4, so you'll get full coverage of features such as the Razor view engine, Web Matrix helpers, and improved extensibility. You'll see how your ASP.NET applications can benefit from changes in the .NET Framework.

About the Technology

ASP.NET MVC provides the architecture needed to separate an application's logic and its UI. Because each component's role is well defined, MVC applications are easy to test, maintain, and extend. The latest version, ASP.NET MVC 4, takes advantage of .NET 4 and includes powerful features like the Razor view engine, Web Matrix helpers, and enhanced extensibility.

About the Book

ASP.NET MVC 4 in Action is a hands-on guide that shows you how to apply ASP.NET MVC effectively. After a high-speed ramp up, this thoroughly revised new edition explores each key topic with a self-contained example so you can jump right to the parts you need. Based on thousands of hours of real-world experience, the authors show you valuable high-end techniques you won't find anywhere else. Written for developers, the book arms you with the next-level skills and practical guidance to create compelling web applications.

You need some knowledge of ASP.NET and C#, but no prior ASP.NET MVC experience is assumed.

Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.

What's Inside

  • Complete coverage of ASP.NET MVC 4
  • The new Web API
  • Full-system testing

About the Authors

Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner are all ASP.NET MVPs, ASP insiders, and early adopters of ASP.NET MVC.


Table of Contents

  1. Introduction to ASP.NET MVC
  2. Hello MVC world
  3. View fundamentals
  4. Action-packed controllers
  6. View models
  7. Validation
  8. Ajax in ASP.NET MVC
  9. Security
  10. Controlling URLs with routing
  11. Model binders and value providers
  12. Mapping with AutoMapper
  13. Lightweight controllers
  14. Organization with areas
  15. Third-party components
  16. Data access with NHibernate
  18. Extending the controller
  19. Advanced view techniques
  20. Dependency injection and extensibility
  21. Portable areas
  22. Full system testing
  23. Hosting ASP.NET MVC applications
  24. Deployment techniques
  25. Upgrading to ASP.NET MVC 4
  26. ASP.NET Web API

Multi-Agent Machine Learning: A Reinforcement Approach

WCF 4.0 Multi-tier Services Development with LINQ to Entities

Face Processing: Advanced Modeling and Methods

Planning Algorithms

Fuzzy Knowledge Management for the Semantic Web (Studies in Fuzziness and Soft Computing)

Building Software for Simulation: Theory and Algorithms, with Applications in C++
















GuestbookEntry, add it to the Models directory in the project, and add a few properties to it: public class GuestbookEntry { public int Id { get; set; } public string Name { get; set; } public string Message { get; set; } public DataTime DateAdded { get; set; } } Download from Wow! eBook The Guestbook sample application 25 Figure 2.10 The definition of the GuestbookEntries table with four columns—the Id, the name of the person signing the guestbook, their message, and the

explore what should (and shouldn’t) be part of a controller and look at how to manually construct view models, validate simple user input, and write controller actions that don’t use a view. This will give us a good set of building blocks for constructing the most common types of controller actions. We’ll also briefly introduce you to unit testing controller actions so you can verify that they’re working correctly. We’ll start off by looking at the default unit test project and then move on to

construct the view model), this Download from Wow! eBook 66 CHAPTER 4 Action-packed controllers would be a good time to move the logic out of the controller action and into a separate, dedicated class to help keep our controller lightweight. The corresponding view for our new screen is strongly typed and simply loops over the CommentSummary instances and displays them as rows in a table: Listing 4.4 Displaying CommentSummary instances in a table @model

launched the MvcContrib open source project with an initial offering of extensions that integrated with the ASP.NET MVC Framework. MvcContrib was subsequently accepted as the first community project by the CodePlex Foundation, a group that facilitates corporate contributions to open source. ASP.NET MVC is a frequently used tool at Headspring, where I manage the consulting practice. For the .NET industry as a whole, in 2009, I predicted that ASP.NET MVC would be considered the norm for ASP.NET

guess it all paid off! Thanks Dad, Mom, and Gordon. I would also like to thank my college professor, Dr. Bob Williams, for encouraging me with my endeavors into software. Download from Wow! eBook ACKNOWLEDGMENTS xxv Matthew Hinze I would like to thank my dad, Rick Hinze, for his unending support and friendship. He got me into this business. I’d also like to thank my wife, Sarah. She helps me get out of it. Jeremy Skinner Many thanks go to my parents, Paul and Nina, who

Download sample