Palermo J., Bogard J., Hexter E., Hinze M., Skinner J. - ASP.NET MVC 4 in Action + Code


ASP.NET MVC 4 in Action

A revised edition of ASP.NET MVC 2 in Action

Год: 2012 (June)

Автор: Jeffrey Palermo, Jimmy Bogard, Eric Hexter, Matthew Hinze, and Jeremy Skinner

Издательство: Manning Publications

ISBN: 9781617290411

Язык: Английский

Формат: PDF

Качество: Изначально компьютерное (eBook)

Интерактивное оглавление: Да

Количество страниц: 440

Описание: 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.

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.

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.

What's Inside:

•Complete coverage of ASP.NET MVC 4

•The new Web API

•Full-system testing


foreword to the second edition

foreword to the first edition



about this book

about the authors

about the cover illustration

Part 1 High-speed fundamentals

1 Introduction to ASP.NET MVC

1.1 Setting the stage

1.2 What is ASP.NET MVC?

1.3 What’s new in ASP.NET MVC 3/4?

1.4 Summary

2 Hello MVC world

2.1 Setting up your development environment

2.2 Creating your first MVC application

2.3 The Guestbook sample application

2.4 Summary

3 View fundamentals

3.1 Introducing views

3.2 Passing data to views

3.3 Using strongly typed templates

3.4 Summary

4 Action-packed controllers

4.1 Exploring controllers and actions

4.2 What should be in an action method?

4.3 Introduction to unit testing

4.4 Summary

Part 2 Working with ASP.NET MVC

5 View models

5.1 What is a view model?

5.2 Representing user input

5.3 More complex models for both display and input

5.4 Summary

6 Validation

6.1 Server-side validation

6.2 Client-side validation

6.3 Summary

7 Ajax in ASP.NET MVC

7.1 Ajax with jQuery

7.2 ASP.NET MVC Ajax helpers

7.3 Ajax with JSON and client templates

7.4 Creating an autocomplete text box

7.5 Summary

8 Security

8.1 Authentication and authorization

8.2 Cross-site scripting (XSS)

8.3 Cross-site request forgery (XSRF)

8.4 Summary

9 Controlling URLs with routing

9.1 Introducing URL routing

9.2 Designing a URL schema

9.3 Implementing routes in ASP.NET MVC

9.4 Using the routing system to generate URLs

9.5 Routing with ASP.NET Web Forms

9.6 Debugging routes

9.7 Testing route behavior

9.8 Summary

10 Model binders and value providers

10.1 Creating a custom model binder

10.2 Using custom value providers

10.3 Summary

11 Mapping with AutoMapper

11.1 Life before AutoMapper

11.2 Introducing AutoMapper

11.3 AutoMapper basics

11.4 Summary

12 Lightweight controllers

12.1 Why lightweight controllers?

12.2 Techniques for simplifying controllers

12.3 Summary

13 Organization with areas

13.1 Creating a basic area

13.2 Managing links and URLs with T4MVC

13.3 Summary

14 Third-party components

14.1 Learning about NuGet

14.2 Using ASP.NET Web Helpers

14.3 The MvcContrib Grid component

14.4 Summary

15 Data access with NHibernate

15.1 Functional overview of reference implementation

15.2 Application architecture overview

15.3 Exploring the Core

15.4 NHibernate configuration–infrastructure of the application

15.5 Presenting the model through the UI

15.6 Pulling it together

15.7 Summary

Part 3 Mastering ASP.NET MVC

16 Extending the controller

16.1 Controller extensibility

16.2 Controller actions

16.3 Action, authorization, and result filters

16.4 Action selectors

16.5 Using action results to reduce complexity

16.6 Summary

17 Advanced view techniques

17.1 Eliminating duplication in the view

17.2 Building query-string parameter lists

17.3 Exploring the Spark view engine

17.4 Summary

18 Dependency injection and extensibility

18.1 Introducing dependency injection

18.2 Using DI with ASP.NET MVC

18.3 Summary

19 Portable areas

19.1 NuGet packaging basics

19.2 Creating an RSS widget with a portable area

19.3 Interacting with the portable area bus

19.4 Summary

20 Full system testing

20.1 Testing the UI layer

20.2 Building maintainable navigation

20.3 Interacting with forms

20.4 Asserting results

20.5 Summary

21 Hosting ASP.NET MVC applications

21.1 Hosting environments

21.2 XCOPY deployment

21.3 IIS 7

21.4 IIS 6 and 5.1

21.5 Azure hosting

21.6 Summary

22 Deployment techniques

22.1 Employing continuous integration

22.2 Enabling push-button XCOPY deployments

22.3 Managing environment configurations

22.4 Enabling remote server deployments with Web Deploy

22.5 Summary

23 Upgrading to ASP.NET MVC 4

23.1 Runtime view selection with DisplayModes

23.2 Combining and minifying client assets

23.3 Improvements to Razor

23.4 Summary


24.1 What is Web API?

24.2 Adding web services to the Guestbook application

24.3 Web API alternative

24.4 Summary


Доп. информация: Who should read this book? This book is mostly written for senior, mid-level, and junior developers working with ASP.NET. The first section of the book will mostly benefit developers who have never worked with ASP.NET MVC before, or who have experience with older versions and are looking to upgrade.