Home > Store

Reengineering .NET: Injecting Quality, Testability, and Architecture into Existing Systems, Rough Cuts

Rough Cuts

  • Available to Safari Subscribers
  • About Rough Cuts
  • Rough Cuts are manuscripts that are developed but not yet published, available through Safari. Rough Cuts provide you access to the very latest information on a given topic and offer you the opportunity to interact with the author to influence the final publication.

Not for Sale

Description

  • Copyright 2013
  • Dimensions: 7" x 9-1/8"
  • Pages: 400
  • Edition: 1st
  • Rough Cuts
  • ISBN-10: 0-13-296496-1
  • ISBN-13: 978-0-13-296496-8

This is the Rough Cut version of the printed book.

Reengineer .NET Code to Improve Quality, Update Architecture, Access New Tools, and Accelerate Delivery of New Features

As software ages, it becomes brittle: difficult to understand, fix, manage, use, and improve. Developers working with  many platforms have encountered this problem; now, developers working with Microsoft’s .NET are facing it as well.  In Reengineering .NET, leading .NET architect Bradley Irby introduces proven best practices for revitalizing older .NET code and integrating new architectural and development advances into business-critical systems that can’t go offline.  Using a step-by-step approach, .NET professionals can make legacy enterprise software more reliable, maintainable,  attractive, and usable—and make it easier to upgrade for years to come.

Through real-world case studies and extensive downloadable sample code, Irby shows how to carefully plan a .NET  reengineering project, understand the true current state of your code, introduce unit testing and other agile methods, refactor to services and controllers, and leverage powerful .NET reengineering tools built into Microsoft Visual Studio 2012.

This book is an indispensable resource for all developers, architects, and project managers responsible for existing .NET code bases and for a wide audience of non-technical managers and CTOs who want to understand the unique  challenges faced by .NET teams involved in application or system reengineering projects.

Coverage includes
• Migrating legacy .NET software to more flexible, extensible, and maintainable architectures—without breaking it
• Reengineering web applications with the MVC pattern, Winforms software with MVP, and WPF/Silverlight  systems with MVVM
• Asking the right questions to predict refactoring problems before they happen
• Planning and organizing reengineering projects to apply the right expertise to each task at the right time
• Using innovative Test Doubling to make unit testing even more effective
• Applying Dependency Inversion to break tight coupling and promote easier development and testing
• Leveraging source control, defect tracking, and continuous integration
• “Cleaning up” legacy solutions to improve them before you even touch business logic
• Establishing solid development infrastructure to support your reengineering project
• Refactoring to services—including advanced techniques using Repositories, Domain Models,  and the Command Dispatcher
• Refactoring to controller/view or ViewModel/View pairs

Sample Content

Table of Contents

Preface     xiii
Acknowledgments     xix
About the Author     xxi
PART I Target Architecture
1  Implementing a Service-Oriented Architecture     3
An Overview of the Service-Oriented Architecture     4
Understanding Standardized Service Contracts     6
  Interfaces     6
Understanding Coupling     12
Understanding Service Abstraction     15
Designing Reusable Services     18
Understanding Service Autonomy and Service Composability     18
Understanding Service Statelessness     19
A Service Example     24
Summary     26
2  Understanding Application Architecture     27
Working with Architectural Patterns     27
An Overview of Architectural Patterns     28
Differences Among MVP, MVC, and MVVM     29
  Model Access     30
  View Models     31
Handling UI Events     38
How Do the Patterns Work?     43
Which Pattern Should You Choose?     45
Summary     45
3  Unit Testing     47
An Example of Unit Testing     48
Creating Unit Tests     49
Writing a Test     52
Detecting Exceptions     58
Understanding the Power of Assert     61
Comparing Unit Tests to Integration Tests     61
Using the InternalsVisibleTo Attribute     62
Understanding Test Driven Development     65
Learning More About Unit Testing     65
Summary     66
4  Understanding the Dependency Inversion Principle     67
Understanding Tight Coupling     67
Implementing the Abstract Factory Pattern     74
Introducing Interfaces     79
Creating Unit Tests     82
Understanding Service Location     84
  Inversion of Control Containers     84
  Service Locator     88
  A Real World Example     90
  OnDemand Service Properties     96
  Unit Testing Advantages     99
  Final Tweaks     100
Using Dependency Injection     103
Why Is Service Location Better for Reengineering?     108
Summary     113
5  Using Test Doubles with Unit Tests     115
How Do Test Doubles Work?     115
What Need Do Test Doubles Satisfy?     116
Creating a Stub     119
  Distinguishing Between Mocks and Stubs     123
Creating a Mock     124
  A Second Mocking Example     128
  A Third Mocking Example     129
Using Mocking System Services     130
Learning More About Test Doubles     133
Summary     133
PART II Reengineering
6  Initial Solution Review     137
Analyzing the Code     138
  Basic Architecture     138
  Code Structure     139
  Database Access     140
  Data Structures     140<

Updates

Submit Errata

More Information