Topics:

  1. Design principles: SOLID
  2. Design patterns: Creational, Structural, Behavioral
  3. Guidelines for Asynchronous Programming: C# Asynchronous Programming Guideline Cheat Sheet
  4. Threading Design Guidelines: 
  5. Parallel Programming with .NET
    1. Guidelines & Sample:  Parallel Programming
    2. Task Parallel Library (TPL)
    3. Language Integrated Query (LINQ)
    4. Parallel Language Integrated Query (PLINQ)

What's design pattern?

The simplest way to describe a pattern is that it provides a proven solution to a common problem individually documented in a consistent format and usually as part of a larger collection.

The notion of a pattern is already a fundamental part of everyday life. Without acknowledging it each time, we naturally use proven solutions to solve common problems each day. Patterns in the IT world that revolve around the design of automated systems are referred to as design patterns.

Design patterns are helpful because they:

  • represent field-tested solutions to common design problems
  • organize design intelligence into a standardized and easily "referencable" format
  • are generally repeatable by most IT professionals involved with design
  • can be used to ensure consistency in how systems are designed and built
  • can become the basis for design standards
  • are usually flexible and optional (and openly document the impacts of their application and even suggest alternative approaches)
  • can be used as educational aids by documenting specific aspects of system design (regardless of whether they are applied)
  • can sometimes be applied prior and subsequent to the implementation of a system
  • can be supported via the application of other design patterns that are part of the same collection
  • enrich the vocabulary of a given IT field because each pattern is given a meaningful name

Furthermore, because the solutions provided by design patterns are proven, their consistent application tends to naturally improve the quality of system designs.

Note that even though design patterns provide proven design solutions, their mere use cannot guarantee that design problems are always solved as required. Many factors weigh in to the ultimate success of using a design pattern, including constraints imposed by the implementation environment, competency of the practitioners, diverging business requirements, and so on. All of these represent aspects that affect the extent to which a pattern can be successfully applied.

Design Patterns & Design Principles

  • Design principles are applied collectively to solution logic in order to shape it in such a manner that it fosters key design characteristics that support the strategic goals associated with service-oriented computing.
  • Design patterns provide solutions to common problems encountered when applying design principles-and-when establishing an environment suitable for implementing logic designed in accordance with service-orientation principles.

Các chủ điểm cần nghiên cứu của một design pattern

  • Requirement
  • Icon
  • Summary Table
  • Principles
  • Architecture
  • Problem
  • Solution
  • Application
  • Impacts
  • Relationships
  • Case Study Example

 

Common Design Patterns

1) Creational Patterns

  1. Abstract Factory Pattern: Create instances of classes belonging to different families
  2. Builder Pattern: Separate representation and object construction
  3. Factory Method Pattern: Create instances of derived classes
  4. Prototype Pattern: Clone or copy initialized instances
  5. Singleton Pattern: Class with only one single possible instance

2) Structural Patterns

  1. Adapter Pattern: Match interfaces of classes with different interfaces
  2. Bridge Pattern:: Separate implementation and object interfaces
  3. Composite: Simple and composite objects tree
  4. Decorator: Dynamically add responsibilities to objects
  5. Facade: Class that represents subclasses and subsystems
  6. Flyweight: Minimize memory usage by sharing as much data as possible with similar objects
  7. Proxy: Object that represents another object

3) Behavioral Patterns

  1. Chain of Responsibility: Pass requests between command and processing objects within a chain of objects
  2. Command: Encapsulate a method call as an object containing all necessary information
  3. Interpreter: Include language elements and evaluate sentences in a given language
  4. Iterator: Give sequential access to elements in a collection
  5. Mediator: Encapsulates and simplifies communication between objects
  6. Memento: Undo modifications and restore an object to its initial state
  7. Observer: Notify dependent objects of state changes
  8. State: Change object behavior depending on its state
  9. Strategy: Encapsulate algorithms within a class and make them interchangeable
  10. Template Method: Define an algorithm skeleton and delegate algorithm steps to subclasses so that they may be overridden
  11. Visitor: Add new operations to classes without modifying them

Other design patterns:

  1. MVC
  2. MVP
  3. MVVM
  4. Repository Pattern: Unit Of Work pattern + Repository pattern with Entity Framework
  5. Unit of Work Pattern: The design pattern that
  6. Parallel PatternsThe design
  7. SOA PatternsThe SOA design patterns catalog uses a simple notation to consistently represent different types of patterns.
  8. Enterprise Architecture PatternsThe design

C# Design Patterns

http://www.dotnettricks.com/learn/designpatterns

  1. Template Method
  2. Strategy
  3. Factory Method
  4. Abstract Factory
  5. Facade
  6. Command
  7. Observer
  8. Iterator
  9. Singleton

http://www.abhisheksur.com/2010/05/design-patterns.html

JavaScript Design Patterns