Thank you for visiting us. We are currently updating our shopping cart and regret to advise that it will be unavailable until September 1, 2014. We apologise for any inconvenience and look forward to serving you again.

Wiley
Wiley.com
Print this page Share

Professional ASP.NET Design Patterns

ISBN: 978-0-470-29278-5
720 pages
September 2010
Professional ASP.NET Design Patterns (0470292784) cover image
Professional ASP.NET Design Patterns is all about showing you how to use the power of design patterns and core design principles in real ASP.NET applications. The goal of this book is to educate developers on the fundamentals of object oriented programming, design patterns, principles, and methodologies that can help you become a better programmer. Design patterns and principles enable loosely coupled and highly cohesive code, which will improve your code’s readability, flexibility, and maintenance. Each chapter addresses a layer in an enterprise ASP.NET application and shows how proven patterns, principles, and best practices can be leveraged to solve problems and improve the design of your code. In addition, a professional-level, end-to-end case study is used to show how to use best practice design patterns and principles in a real website.

Professional ASP.NET Design Patterns is for ASP.NET developers who are comfortable with the .NET framework but are looking to improve how they code and understand why design patterns, design principles, and best practices will make their code more maintainable and adaptable. Readers who have had experience with design patterns before may wish to skip Part 1 of the book, which acts as an introduction to the Gang of Four design patterns and common design principles, including the S.O.L.I.D. principles and Martin Fowler’s enterprise patterns. All code samples are written in C# but the concepts can be applied very easily to VB.NET.

This book covers well-known patterns and best practices for developing enterprise-level ASP.NET applications. The patterns used can be applied to any version of ASP.NET from 1.0 to 4.0. The patterns themselves are language agnostic and can be applied to any object oriented programming language.

Professional ASP.NET Design Patterns can be used both as a step-by-step guide and as a continuous source of reference to dip into at your leisure. The book is broken into three distinct sections. Part 1 is an introduction to patterns and design principles. Part 2 examines how patterns and principles can be used in the various layers of an ASP.NET application. Part 3 represents an end-to-end case study showcasing many of the patterns covered in the book. You may find it useful to work through the chapters before reading the case study, or you may find it easier to see the patterns in action by reading the case study section first and referring back to Part 2 for a more detailed view on the patterns and principles used.

Within those parts the coverage includes:

  • The origins of the Gang of Four design patterns, their relevance in today’s world, and their decoupling from specific programming languages.
  • An overview of some common design principles and the S.O.L.I.D. design principles follows, and the chapter ends with a description of Fowler’s enterprise patterns.
  • Layering Your Application and Separating Your Concerns
  • A description of the Transaction Script pattern followed by the Active Record, with an exercise to demonstrate the pattern using the Castle Windsor project.
  • The Domain Model pattern demonstrated in an exercise with NHibernate and a review of the domain-driven design (DDD) methodology
  • Patterns and principles that can be used construct your objects and how to make sure that you are building your application for scalability and maintainability: Factory, Decorator, Template, State, Strategy, Composite, Specification and Layer Supertype.
  • Design principles that can improve your code’s maintainability and flexibility; these include Dependency Injection, Interface Segregation, and Liskov Substitution Principle
  • Service Oriented Architecture, the Facade design pattern, messaging patterns such as Document Message, Request-Response, Reservation, and the Idempotent pattern
  • The Data Access Layer: Two data access strategies are demonstrated to help organize your persistence layer: Repository and Data Access Objects. Enterprise patterns and principles that will help you fulfill your data access requirement needs elegantly, including Lazy Loading, Identity Map, Unit of Work, and the Query Object.
  • An introduction to Object Relational Mappers and the problems they solve.
  • An enterprise Domain Driven exercise with POCO business entities utilizing both NHibernate and the MS Entity Framework.
  • The Presentation Layer: how you can tie your loosely coupled code together Structure Map and an Inversion of Control container.
  • Presentation patterns, including letting the view be in charge with the Model-View-Presenter pattern and ASP.NET web forms, the Front Controller presentation pattern utilizing the Command and Chain of Responsibility patterns, as well as the Model-View-Controller Pattern implemented with the ASP.NET MVC framework and Windsor’s Castle Monorail framework. The final presentation pattern covered is PageController as used in ASP.NET web forms.
  • A pattern that can be used with organizational patterns, namely the ViewModel pattern and how to automate domain entities to ViewModel mapping with AutoMapper
  • The User Experience Layer: AJAX, JavaScript libraries, including jQuery. AJAX patterns: Ajax Periodic Refresh and Timeout patterns, maintaining history with the Unique URL pattern, client side data binding with JTemplate, and the Ajax Predictive Fetch pattern
  • An end-to-end e-commerce store case study with ASP.NET MVC, NHibernate, jQuery, Json, AutoMapper, ASP.NET membership provider and a second 3rd party authentication method, and PayPal as a payment merchant
See More
Introduction.

Part I: Introducing Patterns and Principles.

Chapter 1: The Pattern for Successful Applications.

Design Patterns Explained.

Design Principles.

Fowler's Enterprise Design Patterns.

Other Design Practices of Note.

Summary.

Chapter 2: Dissecting the Pattern's Pattern.

How to Read Design Patterns.

Design Pattern Groups.

How to Choose and Apply a Design Pattern.

A Quick Pattern Example.

Summary.

Part II: The Anatomy of an ASP.NET Application: Learning and Applying Patterns.

Chapter 3: Layering Your Application and Separating Your Concerns.

Application Architecture and Design.

Summary.

Chapter 4: The Business Logic Layer: Organization.

Understanding Business Organizational Patterns.

Summary.

Chapter 5: The Business Logic Layer: Patterns.

Leveraging Design Patterns.

Leveraging Enterprise Patterns.

Applying Design Principles.

Summary.

Chapter 6: The Service Layer.

Describing the Service Layer.

Leveraging Messaging Patterns.

An SOA Example.

Summary.

Chapter 7: The Data Access Layer.

Describing the DAL.

Data Access Strategies.

Patterns in Data Access.

Using an Object Relation Mapper.

Summary.

Chapter 8: The Presentation Layer.

Inversion of Control.

Model-View-Presenter.

Front Controller.

Model-View-Controller.

Page Controller.

Summary.

The User Chapter 9: Experience Layer.

What Is AJAX.

Using JavaScript Libraries.

Understanding AJAX Patterns.

Summary.

Part III: Case Study: The Online DVD Store.

Chapter 10: Requirements and Infrastructure.

Agatha's Clothing Store Requirements.

Architecture.

Summary.

Chapter 11: Creating The Product Catalog.

Creating The Product Catalog.

Summary.

Implementing t Chapter 12: he Shoppi ng Basket.

Implementing the Basket.

Summary.

Chapter 13: Customer Membership.

Customer Membership.

Summary.

Chapter 14: Ordering and Payment.

Checkout.

Summary.

Index.

See More
Scott Millett is an ASP.NET MVP and lead architect for wiggle.co.uk, an e-commerce company that uses ASP.NET.
See More
Download TitleSizeDownload
ReadMe 1.17 KB Click to Download
Chapter 02 code downloads 93.51 KB Click to Download
Chapter 03 code downloads 806.14 KB Click to Download
Chapter 04 code downloads 3.45 MB Click to Download
Chapter 05 code downloads 1.23 MB Click to Download
Chapter 06 code downloads 647.87 KB Click to Download
Chapter 07 code downloads 5.28 MB Click to Download
Chapter 08 code downloads 4.44 MB Click to Download
Chapter 09 code downloads 710.38 KB Click to Download
Chapter 10 code downloads 2.68 MB Click to Download
Chapter 11 code downloads 3.56 MB Click to Download
Chapter 12 code downloads 3.79 MB Click to Download
Chapter 13 code downloads 3.82 MB Click to Download
Chapter 14 code downloads 4.18 MB Click to Download
All the code from the book 32.09 MB Click to Download
See More

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
59 Error in Text
On p.59 it reads: "The ASP.NET Framework version 2.0 is preinstalled with Visual Studio 2010. However, for Visual Studio 2008 users you will need to navigate to www.asp.net/mvc/ to install the framework."

The context of actual and surrounding text including the link deal with 'MVC' in the above 1st sentence should read: "The ASP.NET MVC Framework version 2.0 is preinstalled with VS.NET 2010."

The acronym 'MVC' is missing in the sentence because this is the Framework it is alluding to.
10/15/2010
70 Error in Text
In Table 4-4: Transactions Table.

It is missing the last field in the table: Date, which should be of type datetime.
01/03/2011
86, 88 Error in Code
Code correction and reflected in Figure 4-6 on p.88:

The code on p.86 for the control 'lblAccountNo' should use the correct object property with that value. Instead it accidentally uses account balance, and is also reflected in Figure 4-6. The code currently reads:

this.lblAccountNo.Text = accView.Balance.ToString();

...and should read:

this.lblAccountNo.Text = accView.AccountNo.ToString();
10/15/2010
105 Error in Text
Reads: Figure 5-5 shows the UML representation of the Decorator pattern

Should read: Figure 5-5 shows the UML representation of the Template Method pattern
10/11/2010
108 Error in Code
On page 108, the last line of code in class NoQuibblesReturnProcess, a Class name is used instead of the instance variable:

ReturnOrder.AmountToRefund = returnOrder.PricePaid;

should be

returnOrder.AmountToRefund = returnOrder.PricePaid;
12/20/2010
108 Error in Code
On page 108, the last line of code in class NoQuibblesReturnProcess, a Class name is used instead of the instance variable:
ReturnOrder.AmountToRefund = returnOrder.PricePaid;
should be
returnOrder.AmountToRefund = returnOrder.PricePaid;
12/20/2010
109 Error in Text
The same typo appears in the last line of class FaultyReturnProcess:

ReturnOrder.AmountToRefund = ...

should be

returnOrder.AmountToRefund = ...
12/20/2010
110 Error in Text
In the note, it mentions looking for the unit tests in the code download, but the unit test project is missing in the "Chapter 05 code downloads" file.
12/20/2010
112 Error in Code
On page 112, in the IOrderState interface code, it is missing the Status property:

public OrderStatus Status { get; set; }
12/20/2010
113 Error in Text
On page 113, in the Order class, the definition of the Change method should be "internal", not "Internal".
12/20/2010
113 Error in Text
On page 113, the third sentence refers to "CanceledOrderState", but should be "OrderCanceledState".
12/20/2010
See More
Buy Both and Save 25%!
+

Professional ASP.NET Design Patterns (US $49.99)

-and- Professional jQuery (US $44.99)

Total List Price: US $94.98
Discounted Price: US $71.23 (Save: US $23.75)

Buy Both
Cannot be combined with any other offers. Learn more.

Related Titles

Back to Top