Refactoring to Design Patterns by Example

Refactoring to Design Patterns by Example

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 4.5 Hours | 3.54 GB

Improving internal design of an existing application with refactoring techniques and design patterns in C#

This course begins with examination of a realistic application, which is poorly factored and doesn’t incorporate design patterns. The demo application converts text into subtitles for videos, which makes it quite useful in practice. Yet, it is nearly impossible to maintain and develop this application further, due to its poor structure and design.

That is the point at which the course begins. As demonstration after demonstration will unfold, we will refactor this entire application, one function and one class at a time. During refactoring, many design patterns will fit into place almost without effort. By the end of the course, you will know how code refactoring and design patterns – one coding practice and one design practice – can operate together and help each other create great design.

What you’ll learn

  • How to apply design patterns while refactoring an existing application
  • How to contain complexity of the business domain while performing small refactoring and redesign steps
Table of Contents

Recognizing the Need for Refactoring and Design Patterns
1 Introducing the Problem Domain
2 How Did the Application Become This Bad
3 Identifying Current Factoring of an Application
4 Identifying Refactoring Targets
5 Summary

Deciding Names and Locations for Types
6 Understanding Importance of Proper Naming
7 Defining the Project Structure
8 Implementing the Project Structure
9 The Case in Favor of Using Refactoring Tools
10 Naming Classes After Concepts They Model
11 Naming Classes After Behavior They Offer
12 Summary

Decoupling Implementation with Strategies
13 Identifying the Need to Decouple Function Calls
14 Refactoring Tightly Coupled Calls to the Strategy Pattern
15 Implementing Stateful Strategies
16 Null Object Pattern as a Strategy
17 Summary

Chaining Implementation with Composite and Decorator
18 Identifying the Need to Group Equally-typed Strategies
19 Understanding the Composite Pattern
20 Chaining Strategies with Composite Pattern
21 Understanding the Drawbacks of Composite
22 Understanding the Decorator Pattern
23 Wrapping Strategies with the Decorator Pattern
24 Summary

Constructing Complex Object Graphs with Builder
25 Identifying the Need for a Builder
26 Preparing Ground for the Builder
27 Designing the Builder
28 A Word about Structuring Namespaces
29 Summary

Modeling Low-level Concerns as Infrastructure
30 Identifying Infrastructural Concerns
31 Introducing the Infrastructure Layer
32 Isolating Infrastructural Code
33 Moving Infrastructural Code to Another Layer
34 Summary

Factoring Domain Complexity Out with the Rules Pattern
35 Identifying the Domain Rules
36 Preparing Room for Explicit Rules
37 Implementing the Rules
38 Constructing Composite Rules
39 Wrapping Rules into a Rule Adapter
40 Summary

Supporting Multiple Transforms with the Visitor Pattern
41 Identifying the Need for Unrelated Behaviors
42 Introducing the Visitor Design Pattern
43 Building Structural Inspection on the Visitor Idea
44 Implementing the Structural Inspection Visitor
45 Implementing the Concrete Visitor
46 Summary

Wrapping It All Together
47 Extending the Rules System
48 Pushing the Rules System to Its Extreme
49 Adding Features to the Domain
50 Summary
51 Course Summary