- Design principles: SOLID
- Design patterns: Creational, Structural, Behavioral
- Guidelines for Asynchronous Programming: C# Asynchronous Programming Guideline Cheat Sheet
- Threading Design Guidelines:
- Parallel Programming with .NET
- Guidelines & Sample: Parallel Programming
- Task Parallel Library (TPL)
- Language Integrated Query (LINQ)
- 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
- Summary Table
- Case Study Example
Common Design Patterns
1) Creational Patterns
- Abstract Factory Pattern: Create instances of classes belonging to different families
- Builder Pattern: Separate representation and object construction
- Factory Method Pattern: Create instances of derived classes
- Prototype Pattern: Clone or copy initialized instances
- Singleton Pattern: Class with only one single possible instance
2) Structural Patterns
- Adapter Pattern: Match interfaces of classes with different interfaces
- Bridge Pattern:: Separate implementation and object interfaces
- Composite: Simple and composite objects tree
- Decorator: Dynamically add responsibilities to objects
- Facade: Class that represents subclasses and subsystems
- Flyweight: Minimize memory usage by sharing as much data as possible with similar objects
- Proxy: Object that represents another object
3) Behavioral Patterns
- Chain of Responsibility: Pass requests between command and processing objects within a chain of objects
- Command: Encapsulate a method call as an object containing all necessary information
- Interpreter: Include language elements and evaluate sentences in a given language
- Iterator: Give sequential access to elements in a collection
- Mediator: Encapsulates and simplifies communication between objects
- Memento: Undo modifications and restore an object to its initial state
- Observer: Notify dependent objects of state changes
- State: Change object behavior depending on its state
- Strategy: Encapsulate algorithms within a class and make them interchangeable
- Template Method: Define an algorithm skeleton and delegate algorithm steps to subclasses so that they may be overridden
- Visitor: Add new operations to classes without modifying them
Other design patterns:
- Repository Pattern: Unit Of Work pattern + Repository pattern with Entity Framework
- Unit of Work Pattern: The design pattern that
- Parallel Patterns: The design
- SOA Patterns: The SOA design patterns catalog uses a simple notation to consistently represent different types of patterns.
- Enterprise Architecture Patterns: The design