What Are Design Patterns?

A design pattern is a design solution to a software problem that occurs within a specific, recurring set of situations.

Let’s say you are making software for a problem situation that involves a heat sensor, and an overheat alarm. And let’s say that whenever the sensor senses temperature above a certain threshold, you’d like the alarm to go off. One way of dealing with this is to have the alarm trigger part constantly poll the sensor. this works, but is a bit wasteful. A more intuitive way is to treat the alarm trigger on a need-to-know basis, that is, have a mechanism that would enable the sensor to send a message to the alarm trigger whenever the heat threshold would exceed.

Now, expand this situation so that it can apply to problem domains other that heat sensor: You’ve got mail notification, account balance negative notification, delivery failed notification, etc.

Here, we are dealing with a problem that shows a pattern of occurrence in a similar problem context with different problem specificities. A solution for the this kind of recurring problems that concerns the context, and not the specificities of the problem is a design pattern.

For example, for the problem above, pattern practitioners have devised the “Observer Pattern”, whereby a party interested in a certain event expresses its interest to another party watches for that event, the latter notifies the former if such event happens.

You can also think of design patterns as recipes for design, or reusable design works that are devised to solve a specific, recurring problem.

There are many design patterns published in a variety of books, or journals, or on a variety of web sites.

A good place to start is “Design Patterns: Elements of Reusable Object-Oriented Software (Addison-Wesley, 1995)” by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. These guys were pioneers in design patterns, and most, if not all, of the patterns presented by them are widely used by software designers.

Another good book is “Patterns in Java (John Wiley & Sons, 1998)” by Mark Grand. This one runs over three volumes, and uses Java to code its patterns.

You can also check:

http://hillside.net/patterns/patterns.html http://www.objenv.com/cetus/oo_patterns.html http://rampages.onramp.net/~huston/dp/patterns.html

The true power of Java lies in its Object Oriented facilities. Familiarity with design patterns will enable you to identify recurring design situations, and let you reuse other object practitioner’s design works.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


The Latest

Top 5 B2B SaaS Marketing Agencies for 2023

In recent years, the software-as-a-service (SaaS) sector has experienced exponential growth as more and more companies choose cloud-based solutions. Any SaaS company hoping to stay ahead of the curve in this quickly changing industry needs to invest in effective marketing. So selecting the best marketing agency can mean the difference

technology leadership

Why the World Needs More Technology Leadership

As a fact, technology has touched every single aspect of our lives. And there are some technology giants in today’s world which have been frequently opined to have a strong influence on recent overall technological influence. Moreover, those tech giants have popular technology leaders leading the companies toward achieving greatness.

iOS app development

The Future of iOS App Development: Trends to Watch

When it launched in 2008, the Apple App Store only had 500 apps available. By the first quarter of 2022, the store had about 2.18 million iOS-exclusive apps. Average monthly app releases for the platform reached 34,000 in the first half of 2022, indicating rapid growth in iOS app development.