DEV Community

joaofelipefaria
joaofelipefaria

Posted on

[EN] Design patterns: where do they come from?

A chat about design patterns

One of the topics I see sparking the most curiosity (and confusion) among people entering the world of software development is design patterns. In this short chat, I'll try to clear up a few things about them.

What are design patterns?

Design patterns are technical solutions used to solve recurring problems in software development. Some of the best known and most frequently mentioned in conversations about software are: Factory, DAO, DTO, Message Outbox and Pub/Sub.

Where the confusion starts

And this is where the confusion begins. Many younger developers, not knowing where these patterns come from, don't realize they originate from completely different worlds. So before we start defining patterns, let's understand the main groups and where they came from.

GoF Patterns: object-oriented programming

GoF Patterns are patterns for object-oriented programming. The name comes from the "Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides), the authors of the book Design Patterns: Elements of Reusable Object-Oriented Software, published in 1994. Among the main ones are Singleton, Factory Method and Observer.

JEE BluePrint Patterns: web applications

JEE BluePrint Patterns are patterns for developing enterprise web applications. They came out of the Java EE (formerly J2EE) ecosystem, from Sun Microsystems' Java BluePrints program, and were cataloged in the 2001 book Core J2EE Patterns. Among the main ones are DAO, DTO and Front Controller.

Messaging patterns: integrating systems

Messaging patterns deal with asynchronous communication and integration between systems through messages. Their main reference is the book Enterprise Integration Patterns by Gregor Hohpe and Bobby Woolf, published in 2003, and the topic gained even more traction with the rise of microservices. Among the main ones are Publish/Subscribe, Dead Letter Channel and Transactional Outbox.

And there are others

There are other families, such as UI/UX patterns, which deal with how we design interfaces and interactions. Two examples are the Breadcrumb and Infinite Scroll. There are also patterns for AI, architecture patterns, and many others.

Next steps

In the next articles, we'll dive deeper into these pattern families, one by one. We'll define the patterns, understand the problem each one solves, and see how to implement them in your projects.

Top comments (0)