Software Architecture and Design Tutorial
What is Software Architecture Design?
- Software architecture design is a representation of system which aids in the understanding of how the system will behave.
- It is a structured framework used to conceptualize software elements, relationships and properties.
- It serves as the blueprint for both the system and project.
- Software architecture is used for defining and structuring of a solution which connects technical and operational requirements.
In the above figure, software architecture design includes major factors such as, business strategy, quality, human resource, software design, environment.
It optimizes the attributes which involve a series of decisions such as, security, performance and manageability. These decisions impact the application quality, maintenance, performance and overall success.
Why is Software Architecture Design important?
- A software should be designed with consideration for the user, system and the business goals.
- Software architecture considers a design for software to implement its structure according to its rules and requirements.
- Software architecture manifests the earlier design decisions governing the system to be built and can be analyzed.
- Software architecture considers the communication among stakeholders for mutual understanding, negotiation and agreement.
- Software architecture constitutes transferable abstraction of a system and can promote large scale reuse.
- It provides a common language in which different concerns can be expressed.
- Software architecture focuses on how the major elements and components within an application are used or interacted within the application.
Goals of Software Architecture Design
Software architecture design improves the common quality attributes such as performance, security and manageability.
Good design and architecture reduces the business risks and is flexible to handle the changes which occur over time in hardware and software technology.
Software Architecture Design has following goals:
- The main important goal of software architecture design is to build the bridge between business and technical requirements.
- To identify the requirements which affect the basic structure of the application.
- Consider the overall effect of design decisions.
- Design should be flexible to handle the changes in user scenarios and requirements.
- To find the different ways to implement the use cases in the software.
Principles of Software Architecture DesignFollowing are the important principles considered while designing an architecture:
Following are the design principles considered for minimizing cost, maintaining requirements of an architecture,
1. Separation of Concerns
- Application should be flexible to support new changes over time to address requirements and challenges.
- Use UML (Unified Modeling Language) & visualizations to capture requirements, architectural & design to analyze their impact and to reduce risk.
- Use models, views, visualizations, collaboration tool of the architecture to communicate & share design efficiently with all the stakeholders and to enable rapid communication of changes to the design.
- Use proper information to understand the key engineering decisions and the areas where mistakes are most often made. If the decisions are right with use of proper information then the design is more flexible and less likely to be broken by changes.
- Use Incremental and Iterative testing to improve the architecture.
2. Single Responsibility Principle
- Separation of concern helps to provide high cohesion and low coupling. It means that to avoid overlapping between the components functionality just divide the components of system into specific features.
- It helps to avoid the interdependency between components of system which helps to maintain the system easily.
3. Principle of Least Knowledge
- Each component or module of a system has a single specific responsibility which helps user to understand the system and provide integration of the components with other components.
- Each module should be independent and responsible for only a specific feature of functionality.
4. Don't Repeat Yourself (DRY)
- Principle of least knowledge is also known as the Law of Demeter or LoD.
- It avoids interdependency and helps to manage maintainability because the component does not know about internal details of other components or objects.
5. Minimize Upfront Design
- DRY specifies that functionality of the components should not be repeated, only a piece of code should be implemented in one component.
- If the duplication of functionality comes within a single application, it has difficulties in implementing the changes in a system, decreases the clarity and introduces potential inconsistencies.
- If the requirements of an application are unclear and there is a possibility that the requirements might get modified then avoid making a large design for the whole system.