Commit 4e8e2f48 authored by O'Reilly Media, Inc.'s avatar O'Reilly Media, Inc.
Browse files

Initial commit

parents
Loading
Loading
Loading
Loading
+8.83 MiB

File added.

No diff preview for this file type.

+276 KiB

File added.

No diff preview for this file type.

+7.61 MiB

File added.

No diff preview for this file type.

+171 −0
Changes for ProgASPNETMVC_627147_VBSampleCode/Book_TableofContents.txt: 171 added lines, 0 removed lines.
Original line number Diff line number Diff line
Programming Microsoft ASP.NET MVC == Table of Contents
 
PART I: THE PROGRAMMING PARADIGM
 
Chapter 1: Goals of ASP.NET MVC and Motivation for Its Development
   The Deep Impact of ASP.NET
      Productivity Is King 
      The Web Forms Model 
      The “Page Controller” Pattern 
   The ASP.NET Age of Reason 
      ASP.NET’s Signs of Aging 
      The Turning Point
   ASP.NET MVC at a Glance
      ASP.NET MVC Highlights 
      Web Forms vs. ASP.NET MVC
   Summary 

Chapter 2: The Runtime Environment
   The ASP.NET Runtime Machinery 
      ASP.NET and the IIS Web Server 
      Life Cycle of an ASP.NET Request 
      What’s an HTTP Handler, Anyway? 
      What’s an HTTP Module, Anyway? 
      URL Routing 
   The ASP.NET MVC Run-Time Shell
      The Big Picture 
      Processing an ASP.NET MVC Request
   Summary 

Chapter 3: The MVC Pattern and Beyond
   The Original MVC Pattern
      MVC Interaction Model 
      The Original Idea 
      Presenting the Actors 
      Limitations of the MVC Pattern
   The Model2 Pattern
      MVC and the Web 
      Model2 and ASP.NET MVC
   Presentation-Oriented Variations of MVC 
      The MVP Pattern 
      Presentation Model Pattern (Also Known as MVVM) 
   The ASP.NET MVC Project Template 
      Peculiarities of an ASP.NET MVC Project 
      ASP.NET MVC Special Folders 
   Summary 

PART II: THE CORE OF ASP.NET MVC

Chapter 4: Inside Controllers
   The Role of Controllers and the Motivation for Using Them 
      Beyond the Code-Behind Approach 
      Introducing Controllers
      Mechanics of Controllers in ASP.NET MVC 
   Anatomy of an ASP.NET MVC Controller 
      Inside the Structure of a Controller
      Behavior of a Controller 
      Attributes of Controllers and Action Methods 
   Writing a Controller 
      Design of a Controller Class 
      Should You Use Your Own Base Class?
   Special Capabilities
      Grouping Controllers
      Asynchronous Controllers 
      Render Actions 
   Controllers and Testability 
      Making Controllers Easy to Test 
      Writing Unit Tests
   Summary 

Chapter 5: Inside Views
   Views and Controllers 
      From Controllers to Views 
      Building the Response for the Browser 
   Anatomy of an ASP.NET MVC View
      Selecting the View
      Creating the View 
      The Default View Engine
      The Web Forms View Engine 
   Writing a View 
      The View’s Template 
      Filling Up the View
      HTML Helpers
      Templated HTML Helpers
      Datagrids and Paged Views 
      Testing a View
   Summary 

Chapter 6: Inside Models
   What’s the Model, Anyway? 
      How Many Types of Models Do You Know? 
      The Models Folder 
   Domain Model and View-Model
      Business Object Modeling 
      Adding Validation Logic to the Model
      Data for the View
   Model Binding 
      The Model Binder in Action 
   Summary 

PART III: PROGRAMMING FEATURES

Chapter 7: Data Entry in ASP.NET MVC
   The Select-Edit-Save Pattern 
      Presenting Data 
      Editing Data 
      Saving Data
   Data Validation 
      Validation on the Server Side
      Giving Feedback to the User
      Data Annotations and Validators 
      Client-Side Validation 
   Summary 

Chapter 8: The ASP.NET MVC Infrastructure
   Routing
      Dealing with Routes
      Keeping an Eye on SEO
   Error Handling 
      Foundations of ASP.NET Error Handling 
      Dealing with Missing Content 
   Localization 
      Making Resources Localizable 
      Dealing with Resources in ASP.NET MVC
   Dependency Injection 
      Dependency Inversion in Action 
      A Brief Tour of Unity 
      Creating a Global Container 
   Summary 
 
Chapter 9: AJAX Capabilities
   AJAX in ASP.NET
      Partial Rendering 
      Direct Scripting 
   AJAX in ASP.NET MVC
      The JavaScript API 
      The Controller Façade 
      AJAX Helpers in ASP.NET MVC 
      Partial Rendering in ASP.NET MVC 
   Summary 

Chapter 10: Testability and Unit Testing
   Testability and Design
      Design for Testability
      Loosen Up Your Design
   Basics of Unit Testing
      Working with a Test Harness 
      Aspects of Testing 
   Unit Testing in ASP.NET MVC
      Testing Controller Actions 
      Injecting Mocks and Fakes 
      Mocking the HTTP Context 
      More Specific Tests 
   Summary 

Chapter 11: Customizing ASP.NET MVC
   The Controller Factory
      ASP.NET MVC Request Processing 
      Extending the Default Controller Factory 
      Invoking Actions
   Action Filters 
      Gallery of Action Filters
      Loading Action Filters Dynamically 
      Action Selectors 
   Action Results and Rendering 
      Processing the Result of the Action 
      Custom ActionResult Objects 
      View Engines
      HTML Helpers
   Summary 

Appendix: ReSharper and the Power of Tools
+53 −0
Changes for ProgASPNETMVC_627147_VBSampleCode/Customization ReadMe.txt: 53 added lines, 0 removed lines.
Original line number Diff line number Diff line
 
___________________________________________________________________

                   Sample Customization Readme
                              for

                Programming Microsoft ASP.NET MVC

                       by Dino Esposito 

           Copyright (c) 2010 by Microsoft Corporation
                      
          Portions copyright (c) 2010 by Dino Esposito

                      All Rights Reserved

___________________________________________________________________


=================================
CUSTOMIZING THE SAMPLE
=================================

1) The sample application may be compiled with either Visual Studio 2010 (MvcGallery.sln) or Visual Studio 2008 (MvcGallery2008.sln). In both cases, Visual Studio must be combined with ASP.NET MVC 2. You may download a trial version of Visual Studio 2010 from the following URL:

     http://www.microsoft.com/visualstudio/en-us/products/2010-editions/ultimate

ASP.NET MVC 2 may be downloaded from this URL:

     http://www.microsoft.com/downloads/details.aspx?familyid=C9BA1FE1-3BA8-439A-9E21-DEF90A8615A9&displaylang=en

2) The sample uses information contained within the Northwind database. If you do not have the Northwind database, you can download it from the following URL:

     http://www.microsoft.com/downloads/details.aspx?FamilyID=06616212-0356-46A0-8DA2-EEBC53A68034&displaylang=en

(Ignore the mention of SQL Server 2000...you can install and use this database with later versions of SQL Server as well.) Once downloaded and installed, the necessary SQL command file will be placed in the installation folder you specified during installation (defaulting to "C:\SQL Server 2000 Sample Databases"). There will also be a "readme" HTML file that should help answer any questions you may have.

3) You must provide your server information in the connection string used by the business logic component, which you will find located within the MvcGallery.Business project found under Lib. To edit the connection string, load the MvcGallery solution into Visual Studio 2010 and open the settings (Settings.settings, found under Properties). There you will find the connection string available for editing. Currently, the connection string assumes the following server:

     .\SQLEXPRESS

It also assumes Windows Authentication. Most readers should find this connection string sufficient. However, modify it as required to work with your local server. Failing to do so will result in data errors when running the sample application.

4) You will need to download and install both the Unity Application Block and Rhino Mocks to run this sample application:

Unity: http://unity.codeplex.com/releases/view/18855

Rhino Mocks: http://www.ayende.com/projects/rhino-mocks/downloads.aspx

Note you may also have to re-reference these assemblies. The Unity references are located in MvcGallery.Unity project, while thr Rhino Mocks references are in two test projects: HttpContextTests and SimpleCoordinatorTests.

5) To run the samples, first compile the entire solution. Then, select one of the many projects under Src in Solution Explorer and click the Debug button or press F5. The page for the sample will appear. You will find three tabs: the sample tab, the author tab, and an explanation tab. The sample tab will contain links and descriptive text designed to experiment with the given ASP.NET MVC task at hand. The author tab provides information about the book and training provided by the author. And the explanation tab provides additional insight regarding the particular aspects of ASP.NET MVC being demonstrated. Feel free to experiment!
Loading