0% found this document useful (0 votes)
16 views2 pages

Design Patterns in Java

The document discusses design patterns in Java. It explains that design patterns are reusable solutions to common problems in software design. It divides design patterns into three categories (creational, structural, and behavioral) and provides examples of popular patterns in each category, including Factory Method, Adapter, and Observer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Design Patterns in Java

The document discusses design patterns in Java. It explains that design patterns are reusable solutions to common problems in software design. It divides design patterns into three categories (creational, structural, and behavioral) and provides examples of popular patterns in each category, including Factory Method, Adapter, and Observer.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

DESIGN PATTERNS IN JAVA

Hello everyone and welcome to this new blog post. In this new entry we will discuss one of the most
important when solving problems in programming, it is about how to approach the resolution of them
relying on the so-called 'Design Patterns'.

Design patterns
After many years of work, a lot of work in learning and using design patterns in Java, in this
In this article, I will reflect on some of them and provide examples of the most important ones. I hope they are useful to you.
more than one of you.

Of course, we are not going to reinvent the wheel by creating what has already been created and validated; I will give you examples of use.
referring to other websites that I have previously consulted and I believe explain and exemplify in a way
perfect all the necessary knowledge to understand each design pattern.

If you are not familiar with software design patterns, you can initially refer to Wikipedia:

In software engineering, a design pattern is a general reusable solution to a problem that occurs.
commonly in software design. A design pattern is not a finished design that can be implemented
directly in code, but it has to be applied to a real problem and adapted as much as possible.

The usefulness of design patterns is explained by this quote:

Design patterns can accelerate the development process, providing paradigms for testing.
tested development.
As we all like to program faster, and we don't like to have to invent a thousand paradigms or mazes to
solving a problem, design patterns are a good idea for that.

Design patterns - History and classification


Design patterns became famous in the book 'The Gang of Four,' and later they were described.
in other design books such as 'The Design Patterns Smalltalk' thus originating the field of architecture. It should be noted
mention the author Christopher Alexander as one of the most prominent in this topic.

Design patterns have been divided into at least three categories:

1. Creation patterns

2. Structural Patterns

3. Behavior patterns
According to this organization, this article is organized in the same way:

Design patterns in Java


Although design patterns are intended to be independent of programming languages, it is very useful
to show, recognize, and understand them, use implementations in different languages.
Therefore, to specifically help Java programmers, I will use specific examples with
examples Examples with the JAVA language.

Examples of 'Creational' design patterns


According to Wikipedia, 'creational design patterns are the design patterns that relate to the
mechanisms for object creation, trying to create objects in a way that is appropriate to the situation.

I leave you some links to the most commonly used design patterns:

Factory Method Design Pattern


Abstract Factory Design Pattern
Builder Design Pattern
Object Pool Design Pattern
Prototype Design Pattern
Singleton Design Pattern
Examples of 'Structural' design patterns
According to Wikipedia, "structural design patterns are design patterns that facilitate design through the
identification of a simple way to realize the relationships between the entities.

Here are the links to the design patterns of this type:

Adapter Design Pattern


Bridge Design Pattern
Composite Design Pattern
Decorator Design Pattern
Facade Design Pattern
Flyweight Design Pattern
Private Class Data
Proxy Design Pattern
Examples of 'Behavioral' design patterns
According to Wikipedia, 'behavioral design patterns are design patterns that identify patterns'
common communication patterns among objects and they become aware of these patterns. In doing so, these patterns of increase
the flexibility in carrying out this communication.

The design patterns of this type are:

Chain of Responsibility
Command Design Pattern
Interpreter Design Pattern
Iterator Design Pattern
Mediator Design Pattern
Memento Design Pattern
Null Object Design Pattern
Observer Design Pattern
State Design Pattern
Strategy Design Pattern
Template Method Design Pattern
Visitor Design Pattern

You might also like