What Is and What Is Not a Design Pattern

If you’re an experienced software developer, you’ve probably heard about Design Patterns. But if you are just starting, don’t worry, it’s OK.

What is not okay is to ignore that they exist. Do not use them when you shouldn’t or get the wrong interpretation of them.

What Is a Design Pattern?

It’s a general reusable solution that can be applied to commonly occurring problems in software development.

They are proven solutions. They are expressive and make things easy to maintain. Since many developers are familiar with Design Patterns, we can say it’s kind of a development standard.

Remember, they are language neutral, so they can be applied to any technology. Also, Design Patterns are not associated to project size.

What Are the Elements of Design Patterns?

Pattern Name
The name should be descriptive enough to know what we’re talking about.
Problem
Describes the general problem or situation to resolve.
Solution
Describes the general solution to be implemented.
Consequences
Describes the good and bad things that will happen if we implement it.

What Are the Categories of Design Patterns?

Creational Design Patterns
They provide the techniques to create objects. Examples, Singleton, Abstract Factory, and Builder Pattern.
Structural Design Patterns.
They describe the composition of the objects and their organization. Examples, Adapter Pattern, and Decorator Pattern.
Behavioral Design Patterns
They focus on improving the communication between objects in a system. Examples, Iterator Pattern, Observer Pattern, and Strategy Pattern.

Be Careful of the Dark Side… the Antipatterns!

An Antipattern is an ineffective response to a recurring problem. Typically, it has more bad consequences than good ones.

The worst is the God classes. They can control many other classes and have many dependencies and lots of responsibilities. God classes tend to grow to the point of becoming maintenance nightmares.

Have you ever seen or, even worst, created a God class? Don’t do it and if you see any please kill it (or refactor as required).

Recommended Books

Finally…

So now you know a little bit more about Design Patterns. You’re ready to join the vast group of developers already using them. Use your new knowledge wisely.

 

Learn More about Encora

We are the software development company fiercely committed and uniquely equipped to enable companies to do what they can’t do now.

Learn More

Global Delivery

READ MORE

Careers

READ MORE

Industries

READ MORE

Related Insights

Online Travel Agencies: Some Solutions to changes in booking and commission attributions

Discover how we can simplify travel changes for both travelers and OTAs using blockchain and ...

Read More

The AI-Powered Journey: How AI is Changing the Face of Travel

As travel elevates itself into an experience where every journey is as unique as the travelers ...

Read More

Enhancing Operational Excellence with AI: A Game-Changer for the Hospitality Industry

By AI, the hospitality industry can offer the best of both worlds: the efficiency and ...

Read More
Previous Previous
Next

Accelerate Your Path
to Market Leadership 

Encora logo

Santa Clara, CA

+1 669-236-2674

letstalk@encora.com

Innovation Acceleration

Speak With an Expert

Encora logo

Santa Clara, CA

+1 (480) 991 3635

letstalk@encora.com

Innovation Acceleration