Taliferro
Software Architecture
0  /  100
keyboard_arrow_up
keyboard_arrow_down
keyboard_arrow_left
keyboard_arrow_right
21 Nov 2022
  • Website Development

Exploring Software Architectural Design Patterns and Uses

Start Reading
By Tyrone Showers
Co-Founder Taliferro

Introduction

Architectural design patterns are a set of guidelines for building software systems. They often describe how to handle common problems in an object-oriented way and provide solutions that can be reused repeatedly.

Event Driven

The Event-Driven design pattern is a design pattern that uses events to communicate between classes. This pattern is used when one function wants to inform another function about something. The event-driven pattern has two major components:

  • Event generator - A class instance that generates events and sends them to other objects. It can be any object; however, it is usually a data source representing some action associated with the user interface (UI).
  • Event listener - An object or method that listens for specific events generated by an event generator. This can be any method or member variable of your application's classes.

Master Slave

The master-slave pattern is a good choice for systems that need to be highly available, scalable, and fault tolerant.

In this pattern, one component is designated as the "master," and all other components are "slaves." The master does most of the decision-making and data processing, while the slaves only do what they're told.

MVC

Model View Controller (MVC) is a software design pattern used in computer programming. It divides an application into three interconnected parts: the model, the view, and the controller.

The model represents or contains all of your program's data and business logic, which may include information from a database or user-inputted data. The view is what users see on their screens; it comprises all of your visual elements, including menus, windows, and buttons, as well as their layout on-screen via HTML markup or XAML (WPF/Silverlight). The controller connects these two: when a user interacts with something that impacts how data should be presented (for example, clicking a button), it communicates this back to the controller, which then instructs models to update themselves with new information from sources such as databases or web services if necessary.

Broker

This pattern uses a message broker to decouple clients from servers. Clients send requests to the broker, which routes them to servers. The client needs to find out how many servers there are and where they are located. Depending on load balancing and other factors, the same request might be routed to different servers. The important thing is that the client sends a request, which is stored in memory or persistent storage by the broker until it receives an acknowledgment from one of its back-end services (known as servers), at which point it removes the message from its queue. This pattern is helpful for applications that have many users. For example, a chat application might use this pattern so that new messages can instantly be sent even if all of its back-end services aren't available yet because messages will only be sent when an acknowledgment comes back from at least one service running somewhere else in your system architecture.

Interpreter

Interpreters help manage programs written in programming languages that are not yet compiled, such as source code in various stages of development. Since they interpret each statement sequentially rather than collecting it into machine language ahead of time, interpreters can run much more slowly than compiled code and take longer to start up. However, interpreters have some advantages: If you make changes to your program, you can re-run it instantly by just refreshing the page/restarting the application/etc., whereas with compiled code you must wait until the compiler finishes its work before getting new output from your program. Additionally, since an interpreter needs only one copy of your source code (which may be written in any language), it can run on more platforms than a compiler would need to support — including ones without a complete operating system!

Client Server

Client Server is a software design pattern in which the client and the server are separate processes. The server program runs in a loop, waiting for requests from clients and servicing them by reading, writing, or manipulating the needed data. The client-server model is one of many ways to distribute work across multiple computers. It involves one or more server programs that accept requests from clients, perform some processing on them (often for web pages), then pass the results on to the requesting client.

Layered

Layering is a common way of organizing software and is one of the most effective ways to manage complexity. The idea is simple: depending on the needs of your application, you can split it into different layers (or tiers). Each layer should have its concerns, meaning it should only manage a specific application part. For example, some layers will be responsible for displaying data on a screen, while others might handle complex business logic or persistence. The idea behind layering is an abstraction; each layer has its interface, so users don't need to know how things work under the hood. This separation also allows us to hide complexity to make our applications easier to use and maintain over time.

Strangler

The Strangler pattern is used when the client is tightly bound to the old interface, and it is difficult to change the client code. The pattern allows you to replace an existing object so that the client does not have to be changed. The new entity has all of its methods replaced by new ones so that it behaves exactly like the original one but with some additional features or improvements.

Conclusion

I hope this article helped you understand the different architectural patterns available. Each pattern has its benefits and drawbacks, and choosing the right one depends on your project's requirements.

Tyrone Showers