Headline News, Articles & Events Resource
For Your Digital Experience

Syndicated News

The Beginner's Guide to Design Patterns

To fully understand the importance of design patterns, let's start with an example -- when a user uses your product, how do they save their landing page, blog post, template, etc.? Do their projects auto-save, or do they need to press a "Save" button?

Let's say you choose auto-save. Great. Now, how much time do you have? Do you want to go into each individual page and code for the auto-save component, with a big potential for error?

Or do you want to use a design pattern to ensure each of your website pages saves the same way, without tedious effort on your part?

That's the value of design patterns.

Take our free Graphic Design Essentials Course on HubSpot Academy to learn design fundamentals and how to create simple designs.

Here, we'll explain what design patterns are, and provide lists of design patterns in Java, C# and .Net, so you can save valuable time and effort on your next design project.

Design patterns explained simply

 

At its most basic, design patterns are solutions to recurring problems.

In the UX world, then, a design pattern is a pre-prescribed solution to a common design problem. Essentially, it's a way of saying, "Here's how we typically solve for this problem, if you want to use our method."

Chelsea Bathurst, a Design Lead at HubSpot, puts it this way: "Basically, components are the foundation -- how does this thing look. Design patterns are how they work together."

Design patterns are undeniably useful. They allow designers to avoid "re-inventing the wheel", and because they are tried-and-true solutions from experienced designers, they are less risky than creating something from scratch.

There are three types of design patterns: 

  • Creational design patterns: Regarding object creation mechanisms
  • Structural design patterns: Regarding Class and Object composition -- identifying relationships and patterns between components
  • Behavioral design patterns: Identifying communication patterns between Class objects

Next, let's take a look at our lists of design patterns in java, or C# and .NET, so you can begin applying them yourself. 

Design patterns in Java

  1. Factory Pattern

  2. Abstract Factory Pattern

  3. Singleton Pattern

  4. Prototype Pattern

  5. Builder Pattern

  6. Adapter Pattern

  7. Bridge Pattern

  8. Composite Pattern

  9. Decorator Pattern

  10. Facade Pattern

  11. Flyweight Pattern

  12. Proxy Pattern

  13. Chain Of Responsibility Pattern

  14. Command Pattern

  15. Interpreter Pattern

  16. Iterator Pattern

  17. Mediator Pattern

  18. Memento Pattern

  19. Observer Pattern

  20. State Pattern

  21. Strategy Pattern

  22. Template Pattern

  23. Visitor Pattern

Design patterns in C# and .NET

  1. Abstract Factory Pattern

  2. Builder Pattern

  3. Factory Method Pattern

  4. Prototype Pattern

  5. Singleton Pattern

  6. Adapter Pattern

  7. Bridge Pattern

  8. Composite Pattern

  9. Decorator Pattern

  10. Facade Pattern

  11. Flyweight Pattern

  12. Proxy Pattern

  13. Chain Of Responsibility Pattern

  14. Command Pattern

  15. Interpreter Pattern

  16. Iterator Pattern

  17. Mediator Pattern

  18. Memento Pattern

  19. Observer Pattern

  20. State Pattern

  21. Strategy Pattern

  22. Template Pattern

  23. Visitor Pattern

Once you understand the uses of each of these design patterns, you can choose which ones will best fit your needs. However, it's critical you understand basic java, or C# and .NET programming concepts, to correctly apply these solutions. If you don't, begin by taking an introductory course before taking any next steps with these design patterns.

View original content: Here
 

Related HubSpot News: