Hagía Sophía, Istanbul

Software Architecture: An Introduction for Beginners.

François-Xavier Briollais
magne.io
Published in
7 min readDec 18, 2021

--

Software architecture is a term used in the software engineering field to describe the structure of a software system. It typically describes how all of the individual components of a system fit together, interact, and relate to each other within an architectural framework. A good software architecture will help you understand how your system operates, what it is composed of, what types of interactions are possible between its components, and how data flows through the system.

Software architecture is often defined according to three core concepts:

  • Modularity
  • Separation of concerns
  • High cohesion.

What Is Software Architecture ?

Software architecture is the art of designing the components of a system and how they fit together. It encompasses many different levels, from individual software modules to an entire computer system.

The goal of this design is to create modular pieces that are easy to understand and maintain. It also strives for low coupling between different parts of the system, so that any changes or updates can be made without disrupting other areas. The desire for good separation of concerns makes it easier to develop individual components of the system, since you don’t have to worry about what other components may do.

One final goal is high cohesion within each component of the system. When each component performs just one or two small tasks, they are less likely to experience errors or bugs. This means that developers need only focus on their own individual project without worrying about what others are doing at the same time.

The Importance of Software Architecture

A software architecture is a well-defined structure that defines the design of a system. The primary goal of a software architecture is to ensure that a system is built correctly and can be maintained in the future. A software architecture describes the organization and interactions between components in an application or system, from low-level programming details to high-level abstractions.

Software architecture plays an important role in how easily applications are developed, understood, and expanded.

Often times, architects will use models to represent different structural options for a given system. Models can help identify architectural flaws or opportunities for improvement during the early stages of development before significant resources have been invested into building out the system. They also allow you to experiment with different architectural designs without having to build them all out manually.

For example, let’s say you’re starting work on a new social media app that allows people to create online profiles and post status updates. One model might represent this as a microservice which consists of three modules: one for handling user accounts, another which handles posts, and finally one for handling messages sent between users. In this case, modularity would mean breaking up these services into individual modules (or components), while cohesion would mean ensuring they interact with each other only

How to Know If You Need to Change Your Software Architecture

As your company grows, you may find that the software architecture you originally designed doesn’t work for you anymore. There are a few ways to know if your software architecture needs to change :

  • You find yourself constantly needing to make changes in order to accommodate new features or functionality.
  • The system is becoming increasingly complex and difficult to maintain.
  • Your codebase takes up more physical storage space than necessary because of duplicated code.
  • Finally, if you find that many different people need to make modifications in order to keep the system running smoothly, then it may be time for an architectural redesign.

Software architecture is important because it helps guide development decisions and provides a standard framework for other developers on the team. It also streamlines deployments and makes future changes easier to implement.

What is Modularity?

Modularity is a principle that states that a system should be built from components that are cohesive and loosely-coupled. This principle is based on the idea that complex systems can be redesigned as smaller, more modular pieces of software. In other words, modularity is about breaking down your system into small, manageable pieces so it’s easier to manage and maintain. The benefits of this design approach include:

  • Increased reliability
  • Reduced maintenance costs
  • More flexibility in changing requirements.

What is Separation of Concerns?

Within a software system, separation of concerns is a design principle that decomposes the system into distinct sections. The principle’s intent is to minimize dependencies between software modules by separating the areas of control and functionality within a computer program.

For example, in an accounting system, “concerns” might include inputting transactions, managing accounts, and generating reports.

Each module would then handle processing transactions independently from one another. The principle also prevents changes to one module from affecting others too much. This makes it easier to make changes to the software because you only have to update one section instead of multiple sections at once.

Separation of concern can also be applied to applications or technical projects by grouping together different specific functionalities in their own separate modules or components. In this way, developers can take on different parts of the project without stepping on each other’s toes and causing unnecessary delays in the development process.

What is High Cohesion?

High cohesion is the degree to which the items within a given software module are related. A high-cohesive module should have related data types, functions, and responsibilities.

One of the key principles of good software architecture is that it should be easy to understand. If you can understand what a software module does at a glance, then it is well-designed. The more cohesive the module, the easier it will be to understand its function.

Mechanisms for maintaining high cohesion in a system

Achieving high cohesion in a system is not about how objects are related within a system. It’s about the way the functionality of a single object relates to other objects in a sensible and predictable way.

The first method for maintaining high cohesion is “inheritance”, where one object acquires the characteristics of another. The second method for achieving this is by encapsulating or including subsets of data as part of the properties of an object. The third method, which can also be referred to as “code reuse”, refers to using already-existing code from one module or library as the core code for another module or library.

The last mechanism for achieving high cohesion is by defining dependencies between objects that then share common features. This provides consistency across modules and simplifies coding efforts, while it also makes it easier to maintain larger systems.

Keeping modules cohesive

When modules are cohesive, they share a set of responsibilities that work together to achieve one goal. For example, when an accountant enters data for a company’s finances, the module may need to calculate quarterly taxes and update monthly totals. Both of these tasks would be accomplished by the same module.

Different types of cohesion

The modularity of software architecture is often referred to as “cohesion” in the field of computer science. Cohesion is a measure of the degree to which the elements of a system belong together, and can also be thought of as closeness.

  • Low cohesion : The components in a system are not related and serve different purposes. For example, the parts of an engine may be designed to provide power or cooling functions while other parts might focus on controlling speed or steering.
  • Medium cohesion : The components in a system share one or more common purposes but perform different functions. In this case, all parts will have some connection with providing propulsion as well as protecting against damage from outside forces such as crashes and weather conditions
  • High cohesion : The components in a system share many common purposes and serve similar functions. This is the most ideal type of design for an automobile because each part has specific function within its own area of expertise which makes it easier to maintain overall functionality.

As you can see, there are three levels of cohesion; each level offers something slightly different for your business. Low cohesion allows developers to create loosely-coupled systems that can be easily changed and updated without affecting other parts of the system — essentially allowing for much faster development cycles. If you have low cohesion, the chances that one change will break another part of the system are much lower than if you had high cohesion, so it’s much easier for developers to make changes and updates without disrupting other parts of the codebase. But if you want everything to work seamlessly together, then high cohesion is best — it’ll offer this convenience at the cost of slower development cycles due to more complicated code

Conclusion

Software architecture is the process of developing a system’s architecture, in particular in regards to how well it can be maintained.

The world of software is ever changing. New technologies are emerging all the time, and with them come new challenges. The needs of software architects are ever changing. But what does not change is the need for good software architecture.

Good software architecture not only helps you to develop a system that can be maintained in the future, but also helps you to avoid problems when changes are made.

A good software architecture not only saves you time during development, but also when changes need to be made in the future.

Want to be the first one to know about my upcoming article ? Subscribe here !

--

--

François-Xavier Briollais
magne.io

Pattern analyst, system craftsmen. Usually annoyingly speaking about CS, systems, organisations and semiology. Art history senior lecturer