Danh mụcThẻBài viết

admin

I'm a Full-stack developer

Thẻ

Linked List
Data Structure
Chat GPT
Design Pattern
Microservices
API
AWS CDK
ReactJS
AWS Lightsail
Flutter Mobile
Design Patterns
Ngày đăng: 07/08/2023

What is a design pattern?

As master developers, they have to apply the design pattern to their code. OOP programming languages usually use design patterns because they provide better solutions to commonly occurring problems in software design.

The design pattern does not be a specific programming language. Almost programming languages might apply design patterns that to resolve a problem repeat.


Why should use design patterns?

Using the design pattern has some benefits:

  • Easy to re-use code and expand.
  • Resolving an issue effectively that is verified in software engineering.
  • Developing a software product quickly with a test model, a development model that is verified.
  • Avoiding large risks, upgrading, and maintaining is easier.
  • Code is consistent which makes the teammate could understand and discuss easily.


Classification of design patterns

The number of design patterns is 23 patterns and divided into 3 groups (Creational Pattern, Structural Pattern, Behavioral Pattern).


  • Creational Pattern is including 5 patterns: Factory Method, Abstract Factory, Builder, Prototype, and Singleton.


  • Structural Pattern contains 7 patterns: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, and Proxy.

  • Behavioral Pattern has 11 patterns: Interpreter, Template Method, Chain of Responsibility, Command, Integrator, Mediator, Memento, Observer, State, Strategy, and Visitor.


Thank you for reading! I hope this article helps you can better understand design pattern overview. In the next article, I will go into each design pattern.


Documents:

https://refactoring.guru/

https://gpcoder.com/4164-gioi-thieu-design-patterns/

Đề xuất

JOI - API schema validation
admin12/06/2023

JOI - API schema validation
Data validation is one of topics that I am interesting. I always review my code after developed features or fixed bugs. There are many places where need to validate data, it is really terrible. Some cases, we need to validate data input because ensure the data into API, it will not make any problems to crash system.
TypeScript Design Pattern - Bridge
admin08/08/2023

TypeScript Design Pattern - Bridge
Decouple an abstraction from its implementation so that the two can vary independently.
🚀 Using Bitwise Oprators to build a RBAC in Node.js 🚀
admin13/04/2024

🚀 Using Bitwise Oprators to build a RBAC in Node.js 🚀
In this article, I will illustrate to you how to build an RBAC in Node.js using Bitwise Operators.
Mới nhất

Part 3: Upgrade Latest Ghost Ver On AWS Lightsail
admin17/06/2023

Part 3: Upgrade Latest Ghost Ver On AWS Lightsail
You are a beginner with Ghost CMS, Bitanami, AWS Lightsail and don't know much about the documentation yet. So, in this article, I introduce step by step to upgrade Ghost CMS to the latest version.
TypeScript Design Pattern - Singleton
admin07/08/2023

TypeScript Design Pattern - Singleton
The singleton ensures only a single install is created in a class and provides a method to access this instance everywhere in a codebase.
TypeScript Design Pattern - Bridge
admin08/08/2023

TypeScript Design Pattern - Bridge
Decouple an abstraction from its implementation so that the two can vary independently.
Đinh Thành Công Blog

My website, where I write blogs on a variety of topics and where I have some experiments with new technologies.

hotlinelinkedinskypezalofacebook
DMCA.com Protection Status
Góp ý
Họ & Tên
Số điện thoại
Email
Nội dung
Tải ứng dụng
hotline

copyright © 2023 - AGAPIFA

Privacy
Term
About