Software Architecture

Software Architecture

Software Architecture It's the way of ordering your system components to do their function in the best possible way, the architect or the philosopher (as I like to call him/her) is responsible for defining what are the system components, defining the scope of every component and draw the relationships between these components, defining the properties of relations and also defining the flow of the data inside the system.

So Software Architecture is the highest-level framework, the skeleton of the software system. It’s one of the very first choices made for the base of the system. That choice can significantly influence the flow of work, quality of the code, maintenance, deployment, and ease of development.


Why do we need software architecture?

Robert C. Martin (Uncle Bob) in his book (Clean Architecture) sees the main goal behind software architecture is to minimize the human resources required to build and maintain the required system.

Uncle Bob added the architecture quality can be measured by the effort required to meet the needs of the customer. If that effort is low and stays low throughout the lifetime of the system then it's good architecture, and if the effort grows with each new release then the architecture is bad.

So the main responsibility of a software architect is to find an architecture that meets the customer's requirement and the same time minimizes the resources required to build and maintain the required system.

Note: When we say resources we mean the infrastrcture and also the engineers,testers...etc



How would a good architecture minimize the resources required to build and maintain the required system?

When a software architect starts designing the architecture he/she should keep these concepts in his/her mind and we will see how each of these points can affect minimizing the resources.


Maintenance

How choosing a specific software architecture can make the system easy to maintain which will reduce the resources required to maintain the system?

Choosing the right software architecture can significantly impact how easy a system is to maintain, which directly translates to reduced resources needed in the long run. Here's how:

  • Modularity: By breaking down the system into smaller, independent components with well-defined interfaces, changes or bug fixes in one area are less likely to cascade and affect other parts. This makes maintenance tasks more focused and efficient. Architectures like Microservices and Layered Architectures promote this approach.
  • Loose Coupling: Tightly coupled components, where changes in one require significant changes in others, create a maintenance nightmare. A good architecture fosters loose coupling, where components interact through defined interfaces, and changes in one have minimal impact on others. This allows for easier updates and reduces regression testing overhead.
  • Code Reusability: Well-designed architectures encourage code reuse across different parts of the system. This reduces the amount of code that needs to be maintained and simplifies future development. Layered architectures and component-based architectures are good examples.


Ease of development

How choosing a specific software architecture can make the system easy to develop which will reduce the resources required to maintain the system?

  • Reduced Complexity: Architectures that promote modularity and well-defined interfaces lead to less complex codebases. This makes it easier for developers to understand individual components and their interactions, reducing development time and the likelihood of errors.
  • Standardization and Frameworks: Certain architectures leverage established frameworks and best practices. This provides developers with pre-built components and standardized patterns, reducing the need to reinvent the wheel and streamline development. For example, web applications often utilize MVC frameworks that handle common functionalities like routing and data access.


Scaling Up

Ease of scaling up is about system responsiveness of increasing in the traffic, In other words, it's the that the system handles increasing in the traffic.

so how software architecture can help the system with scaling up, and how that will minimize the required resources?

Let's assume that you have a big system with 20 components, every component has its role and you have high traffic for specific kind of requests that uses only 6 of your components to respond to that flow of requests, in this case, if your architecture is Layered architecture for example, you will have to scale up your system (vertically or horizontally) and that's an additional cost because you are scaling all components not only the specific 6 components.

On the other side if you use microservices you will scale up only the 6 components which will be called services in the microservices perspective.


So choosing the system architecture can affect the resources required (servers in the past example).


Testability

How choosing a specific software architecture can make the system easy to be tested which will reduce the resources required to maintain the system?

Choosing the right software architecture can significantly impact how easy a system is to testable, which directly translates to reduced resources needed in the long run. Here's how:

  • Modularity: By breaking down the system into smaller, independent components with well-defined interfaces, changes or bug fixes in one area are less likely to cascade and affect other parts. This makes maintenance tasks more focused and efficient. Architectures like Microservices and Layered Architectures promote this approach.
  • Loose Coupling: Tightly coupled components, where changes in one require significant changes in others, create a maintenance nightmare. A good architecture fosters loose coupling, where components interact through defined interfaces, and changes in one have minimal impact on others. This allows for easier updates and reduces regression testing overhead.

If you keep modularity and Loose coupling in mind while designing the architecture you will reach a point where every component has a specific goal and if you want to test one of the system components all things you have to do is mock other components and then the testing will be easy.

So In case your system is highly testable you will need fewer engineers to work on it.


Software Architecture Patterns


A software architecture pattern is a general, reusable solution to a common design problem in software development. It provides a blueprint for structuring the different parts of a software system, including the components, their interactions, and overall system layout.


Here are some popular blueprint styles for software:

  • Microservices: Like building a house out of Legos - lots of small, independent parts that can be put together in different ways. Easy to change or add things later.
  • Layered Architecture: Like building a house with a separate foundation, walls, and roof. Keeps things organized and makes changes to one part easier.




References:

要查看或添加评论,请登录

Maher Alzu’bi的更多文章

  • Layered Architecture Pattern (n-Tier)

    Layered Architecture Pattern (n-Tier)

    A layered architecture pattern is one of the common software architecture patterns if it's not the common one. Simply…

    3 条评论

社区洞察

其他会员也浏览了