Professional Enterprise .NET

( 1 )


Many businesses have begun investing in enterprise design with the hope that upfront costs will result in more efficient, maintainable code that will save them money down the line. However, building well-designed applications, incorporating them into existing systems, and responding to the demand for rapid delivery can be overwhelming to even the most experienced developer. This book is the definitive guide to the latest enterprise development patterns and methodologies that ...

See more details below
$34.61 price
(Save 30%)$49.99 List Price
Other sellers (Paperback)
  • All (15) from $10.55   
  • New (6) from $25.38   
  • Used (9) from $10.55   


Many businesses have begun investing in enterprise design with the hope that upfront costs will result in more efficient, maintainable code that will save them money down the line. However, building well-designed applications, incorporating them into existing systems, and responding to the demand for rapid delivery can be overwhelming to even the most experienced developer. This book is the definitive guide to the latest enterprise development patterns and methodologies that will make your code cleaner and more maintainable.

Examines the philosophy behind enterprise development, coding patterns, and common design patterns used in enterprise systems today

Walks you through the different ways to assemble your code in a loosely coupled, testable manner

Explores the pros and cons of the supporting tools (such as Inversion of Control containers, nHibernate, and ASP.NET MVC) that can ultimately lead to better system design

Shows you how to write and automate unit tests using tools such as nUnit and Rhino Mocks

Addresses the responsibilities of the data access layer and methodologies of persistence management

Read More Show Less

Product Details

  • ISBN-13: 9780470447611
  • Publisher: Wiley
  • Publication date: 10/12/2009
  • Edition number: 1
  • Pages: 504
  • Product dimensions: 7.30 (w) x 9.20 (h) x 1.10 (d)

Table of Contents

Introduction xxi

Part 1 Introduction to Practical Enterprise Development

Chapter 1 What is Enterprise Design? 3

What Is Enterprise Architecture? 5

What Is Enterprise Development? 6

Reliability 6

Flexibility 6

Separation of Concerns 7

Reusability 7

Maintainability 7

Where Is All of the Microsoft Enterprise? 9

The COM Factor 10

The Shift to Java 10

The .NET Revolution 11

Summary 14

Chapter 2 The Enterprise Code 15

A New Way to Look At Code 15

Modularity 16

Loosely Coupled Classes 17

Unit Testing 23

Inversion of Control Containers 25

Summary 29

Part 2 The New Code - Changing the Way You Build

Chapter 3 Emancipate Your Classes 33

Evaluating Your Code for Dependencies 33

Rigidity 45

Flexibility 45

Separation of Concerns 45

Reusability 45

Maintainabilty 45

Separation of Concerns and Identifying Modularity 46

The Dependency Inversion Principle 61

Turning Classes Inside Out Using Dependency Injection 64

Rigidity 70

Flexibility 70

Separation of Concerns 70

Reusability 70

Maintainability 70

Summary 72

Chapter 4 Test Driven Development 73

Tic Tac Toe and Test Driven Development: An Example 74

Tic Tac Toe Requirements 75

Testing Frameworks 110

Identifying Testable Elements 110

Writing Unit Tests That Work and Help 112

Refactoring 116

Refactoring Tools 117

ReSharper 117

Refactor Pro 117

Dealing with Dependencies in Test Driven Development - Mocking, Stubs, and Fakes 118

Mocking Frameworks 127

Rhino Mocks 128

Moq 128

NMock 128

Summary 128

Chapter 5 Make It Simple Again - Inversion of Control 131

Creating Dependencies 131

Factory Pattern 138

Service Locator 142

Inversion of Controland IoC Containers 144

What's in a Name? Dependency Injection vs. Inversion of Control 146

Choosing Your Container 146

StructureMap 150

Wire Up Using the Fluent Interface 151

Wire Up Using Attributes - the Plugin Family 153

Wire Up Using Configuration Meta Data 157

To XML or Not to XML, That Is the Question 160

Other IoC Frameworks 160

Summary 160

Part 3 Enterprise Design Patterns

Chapter 6 Getting to the Middle of Things 165

On Middleware 165

The Wild West 166

Tiered Designs 166

The Internet Age 168

The Enterprise Middleware Age 169

A WCF Web Service 172

The Messaging Model 182

A Brief Note on SOA 183

Summary 184

Chapter 7 Writing Your Own Middleware 185

Business Logic Layer 185

Patterns for Your Business 186

Transaction Script 186

Active Record Pattern 188

Domain Model Pattern 190

Which Pattern to Use? 194

Serving Your Business 195

The Service Layer 195

Putting Patterns into Practice 196

Mortgage Loan Prequalification Application 197

Talking the Language of the Domain 197

A Little Bit about Domain-Driven Design 198

Entities 198

Value Objects 199

Aggregates and Aggregate Roots 199

Talking with the Domain Expert 200

Building the Domain Model 202

Identifying the Aggregates 203

Building the Application 204

Creating the Repositories 242

Creating the Domain Services 244

Summary 250

Chapter 8 "Mining" Your Own Business 251

What is the Data Access Layer? 251

Rolling Your Own Data Access Layer 252

Object Relation Mapping 252

The Data Context 253

Entity Framework 269

LinqToSQL or the Entity Framework? 284

Mapping the Mortgage Application with NHibernate 299

Summary 318

Chapter 9 Organizing Your Front End 321

The Neglected Front End 321

Early Front-End Patterns 322

Java Struts 324


Model-View-Presenter 328

Back to MVC . . . the Rails Way 332

Summary 336

Chapter 10 Model-View-Presenter 337

The MVP Pattern - Simplified 337

The Model 338

The View 338

The Presenter 339

The MVP Mortgage Calculator - Web Sample 339

Switching Platforms - Thick Client Sample 360

Setting Up the WPF Application 361

Summary 365

Chapter 11 The Model-View-Controller Pattern 367

Back to Basics 367

Models 369

Controllers 370

Views 370

The Mortgage Loan Application 371

The Model 374

The Controller 376

The View 378

A Simple Repository 382

Creating and Editing 386

Flushing Out the Model 401

The Full Source Code 413

Summary 413

Chapter 12 Puttting It All Together 415

One Step Back, Many Steps Forward 415

The concepts 416

Reliability 416

Flexibility 416

Separation of Concerns 416

Reusability 416

Maintainability 416

The Big Picture 417

The Code 417

The Big Picture 418

The Patterns 418

Middleware 419

Persistence 420

The User Interface 421

The Big Picture 422

Being Holistic - The Big, BIG Picture 422

The Mortgage Service 423

Final Thoughts 423

Summary 424

Appendix A C#.NET Primer 425

Index 455

Read More Show Less

Customer Reviews

Average Rating 4
( 1 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Posted May 10, 2010

    more from this reviewer

    Great read. refreshing!

    The first chapter of this book was basically an attack on Microsoft developers and their poor development habits (due to RAD). However, I was not offended; on the contrary, I was shocked that someone finally pointed these facts out. The authors made a statement, "...built applications for automation" which describes the typical MS developer's methodology. I agree with the entire observation. It's just a shame that most MS developers wont see this book because they are the ones who think they don't need it.

    The rest of the book was a great tour through the enterprise patterns and how to implement them. Unfortunately, the book did not provide anything that I haven't already read in about 20 other books; The difference with this book is that the authors do a great job of getting you to think about why you should consider the enterprise patterns and way of life. they cover both small and large project types and do not discriminate against either one which was refreshing.

    I was disappointed though about the shear number of grammatical errors in the first few chapters and more so later on. Even worse were the code samples in the Middleware chapters. Following the code right from the book is not a good idea. There were entire methods left out (by mistake, not on purpose) and errors in the code that look as if there was a copy/paste gone wrong.

    I don't understand why the authors would include intro sections to Linq to Sql, Entity Framework and NHibernate. I felt it was out of place and unnecessary to accomplish the goal of the chapter. My guess is that it is an attempt to get the reader to open up to new technologies? I do like the fact that the chapter focuses more on NHibernate than Linq to SQL and EF, even though I don't use it.

    Overall this was a great read and I recommend that any .NET developer read it for the sake of others who need to look at your code ;)

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)