ASP.NET MVC 4 in Action

By Jeffrey Palermo, Jimmy Bogard, Eric Hexter


ASP.NET MVC four in Action is a fast moving educational designed to introduce ASP.NET MVC to .NET builders and exhibit how one can observe it successfully. All examples during this revised variation are according to ASP.NET MVC four, so you will get complete assurance of gains equivalent to the Razor view engine, net Matrix helpers, and superior extensibility. you will see how your ASP.NET purposes can reap the benefits of alterations within the .NET Framework.

About the Technology

ASP.NET MVC presents the structure had to separate an application's good judgment and its UI. simply because every one component's position is easily outlined, MVC functions are effortless to check, preserve, and expand. the newest model, ASP.NET MVC four, takes benefit of .NET four and comprises robust positive aspects just like the Razor view engine, net Matrix helpers, and greater extensibility.

About the Book

ASP.NET MVC four in Action is a hands-on consultant that exhibits you ways to use ASP.NET MVC successfully. After a high-speed ramp up, this completely revised new version explores each one key subject with a self-contained instance so that you can leap correct to the components you wish. in accordance with millions of hours of real-world event, the authors express you helpful high-end recommendations you will not locate wherever else. Written for builders, the booklet hands you with the next-level talents and useful suggestions to create compelling net applications.

You desire a few wisdom of ASP.NET and C#, yet no earlier ASP.NET MVC event is assumed.

buy of the print e-book comes with a proposal of a unfastened PDF, ePub, and Kindle e-book from Manning. additionally on hand is all code from the booklet.

What's Inside

  • Complete assurance of ASP.NET MVC 4
  • The new internet 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
  5. PART 2 operating WITH ASP.NET MVC
  6. View models
  7. Validation
  8. Ajax in ASP.NET MVC
  9. Security
  10. Controlling URLs with routing
  11. Model binders and price providers
  12. Mapping with AutoMapper
  13. Lightweight controllers
  14. Organization with areas
  15. Third-party components
  16. Data entry with NHibernate
  17. PART three gaining knowledge of ASP.NET MVC
  18. Extending the controller
  19. Advanced view techniques
  20. Dependency injection and extensibility
  21. Portable areas
  22. Full procedure testing
  23. Hosting ASP.NET MVC applications
  24. Deployment techniques
  25. Upgrading to ASP.NET MVC 4
  26. ASP.NET net API

Show description

Quick preview of ASP.NET MVC 4 in Action PDF

Best Computer Science books

Web Services, Service-Oriented Architectures, and Cloud Computing, Second Edition: The Savvy Manager's Guide (The Savvy Manager's Guides)

Internet providers, Service-Oriented Architectures, and Cloud Computing is a jargon-free, hugely illustrated clarification of the way to leverage the speedily multiplying providers on hand on the net. the way forward for company is dependent upon software program brokers, cellular units, private and non-private clouds, immense facts, and different hugely hooked up know-how.

Software Engineering: Architecture-driven Software Development

Software program Engineering: Architecture-driven software program improvement is the 1st entire advisor to the underlying abilities embodied within the IEEE's software program Engineering physique of data (SWEBOK) common. criteria professional Richard Schmidt explains the normal software program engineering practices famous for constructing initiatives for presidency or company platforms.

Platform Ecosystems: Aligning Architecture, Governance, and Strategy

Platform Ecosystems is a hands-on consultant that provides a whole roadmap for designing and orchestrating brilliant software program platform ecosystems. in contrast to software program items which are controlled, the evolution of ecosystems and their myriad contributors needs to be orchestrated via a considerate alignment of structure and governance.

Additional info for ASP.NET MVC 4 in Action

Show sample text content

We’ll examine routing with net varieties in part nine. five. nine. three. four Catch-all routes the following course we’ll upload to the pattern software is a catch-all path to fit any URL no longer but matched by means of one other course. the aim of this course is to reveal our obtain from Wow! book 166 bankruptcy nine Controlling URLs with routing HTTP 404 blunders message. worldwide catch-all routes will trap something, and as such can be the final path outlined: routes. MapRoute("404-catch-all", "{*catchall}", new { controller = "Error", motion = "NotFound" }); the worth catchall supplies a reputation to the price that the catch-all direction picked up. in contrast to normal direction parameters, catch-all parameters (prefixed with an asterisk) catch the complete section of the URL together with the ahead slashes which are often used to split course parameters. as a result, the course is mapped to the NotFound motion of an ErrorController: public classification ErrorController : Controller { public ActionResult NotFound() { go back new NotFoundResult(); } } while the NotFound motion is invoked, we go back an example of the NotFoundResult that we equipped past in part nine. three. three. This motion consequence units the prestige code for the reaction to 404 after which renders a customized mistakes web page. this instance is a real catch-all direction that would actually fit any URL that hasn’t been stuck through the higher-priority principles. It’s legitimate to produce other catch-all parameters utilized in general routes, reminiscent of /events/{*info}, which might capture each URL beginning with /events/. yet be careful utilizing those catch-all parameters, simply because they’ll contain the other textual content at the URL, together with slashes and interval characters (which are typically reserved as separators for path segments). It’s a good suggestion to exploit a standard expression parameter anywhere attainable so that you stay in charge of the information being handed into your controller motion, instead of simply grabbing every little thing. one other attention-grabbing use for a catch-all path is for dynamic hierarchies, akin to product different types. in the event you achieve the boundaries of the routing approach, you could create a catch-all direction and do it your self. pleasant HTTP error now and again, you could now not see a customized errors web page whilst returning a view at the side of surroundings the prestige code to 404. as an alternative, the browser may possibly reveal its personal errors web page. this may take place if the content material of the view is simply too short—ensure that the customized mistakes view is a minimum of 512 bytes in measurement. At this element, the default {controller}/{action}/{id} direction will be got rid of simply because we’ve thoroughly personalized the routes to compare our URL schema. otherwise you may decide to hold it round as a default technique to entry your different controllers. We’ve now custom-made the URL schema for our site. We’ve performed this with whole keep watch over over our URLs, and with no enhancing the place we maintain our controllers obtain from Wow! publication Using the routing approach to generate URLs 167 and activities. which means any ASP. internet MVC developer can come and consider our software and recognize precisely the place every thing is.

Download PDF sample

Rated 4.83 of 5 – based on 6 votes