Software Architecture
This section contains knowledge about software architecture concepts, patterns, and best practices. Due to my love of Python, architectural examples are provided in Python.
Sources Overview
Books
YouTube Videos
Courses
Main Concepts
Architecture - set of modules and components of the system, description of how these modules and components should be developed, how they should be connected, and interfaces that specify the purpose of each module and component.
Components inside modules should be tightly-coupled.
Modules should be loosely-coupled. Deletion/revision of a module should be simple, and should not affect other modules significantly.
Separation of concerns - different parts of a system should manage different parts of the process.
Inversion of control - helps to avoid strong coupling between components of the system. It realised by wrapping components and expose specific interface. Thus, components can be connected via interface rather than their hard-coded specific implementation.
Think of the following responsibilities while architecting software:
- Address functional and non-functional requirements
- Use technical standards, coding best practices and design patterns
- Interact with stakeholders to ensure smooth development and implementation
- Play an active role in the development process
- Proactive watching over tech trends and paradigm shifts, but do not follow them blindly
Main architectural principles
- DRY
- SOLID
- KISS
- PATTERNS
Architecture of WEB Application
Each component of the above schema is described in the respective topic of the Backend or Frontend sections.
Architectural Styles
-
Monolith
-
benefits:
- easy to develop
- easy to deploy (as a single package)
- easy to monitor
The key is simplicity, as long as the application remains lightweight.
-
challenges:
- adding new features and debugging becomes complicated while the app grows
- the code is tightly coupled, so it violates single responsibility principle
- lack of granular scalability
- availability at risk (error in one module can cause of cascade blocking of the whole app)
- high risk of technical debt
-
-
Service Oriented Architecture (SOA)
It has middle core componet - Enterprise Service Bus
- benefits:
- decouple application and services
- better governance, as SOA aims to provide single source of truth
- reusability of components
- technology agnostic
- scalability, as each service is independent
- challenges:
- lack of agility
- benefits: