First Steps with Design Patterns
Gabriel Nascimento
Java Developer | Software Engineer | QA | QA Engineer | Automated Testing | SDET | Backend Developer | Tester | Quality Assurance | Analyst Testing | Performance Test
Why do we should be used design patterns?
Many problems we have nowadays for a new implementation, someone already implemented it, due to that we can't reinvent the wheels, let's enjoy it and take advantage use Design patterns.
Design Patterns are strategies for solving the common object-oriented design problems, so it's just an idea, not a specific implementation, and using that we can make your code more reusable, flexible, and maintainable.
There are mainly three types of Patterns, which are divided into sub-parts:
1. Creational
- Factory
- Abstract Factory
- Singleton
- Prototype
- Builder
2. Structural
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
3. Behavioral
- Chain Of Responsability
- Command
- Interpreter
- Iterator
- Mediator
- Memento
- Observer
- State
- Template
- Visitor
Advantage of Design Pattern
- reusable in multiple projects.
- provide transparency to the design of an application.
- Provide clarity to the system architecture and the possibility of building a better system.
Conclusion
In this first article, we discussed a little bit about the overview and the main type of Design Patterns.
In the next article, we will discuss the idea and main goals for each type of Design pattern, some weaknesses, and Strengths.
Bibliography
- https://sourcemaking.com/design_patterns
- https://www.javatpoint.com/design-patterns-in-java
- https://refactoring.guru/design-patterns/java