Software Architecture
Software Architecture
Agenda
► Introduction
► Software Architecture
► Architectural Style and Pattern
► Visualising Software Architecture
► Practical application: Clean Architecture
► Architect Role
► References
► Q&A
Introduction
Cuong Nguyen
► Senior Software Architect at Cadena Vietnam.
► More than 12 years of experiences in software development.
► Hand-on experiences in a few domains: ERP, HRM, Logistic, E-commerce, Health.
► Email: [email protected]
Software Architecture
Software Architecture […] is the set of structures needed to reason about the system, which
comprises software elements, relations among them, and properties of both.
► Structures
► System
► Elements
► Relations
► Properties
Architectural Style
► How to organise our code
► Highest level of granularity and specified layers
► High-level modules of the application
► & How those modules and layers interact with each other
Architectural Style (cont)
► Component-based
► Monolithic application
► Layered
► Pipes and filters
► Event-driven
► Publish-subscribe
► Plug-ins
► Client-server
► Service-oriented
Architectural Pattern
► Architectural Patterns
► Microservice
► SOA
► Layered Architecture
► MVC
► Client/Server
► Domain Driven
► Communication Patterns
► Message stream processing
► Event sourcing
► Pub/Sub
► RPC
► Enterprise Service Bus
Visualising Software Architecture
The "C4 model"
A hierarchical way to think about the static structures of a software system in
terms of containers, components and classes (or code)
► Most general and high-level rules, and least likely to change when something
external changes.
► can be an object with methods, a set of data structures and functions…
► Use Cases
► contains application specific business rules. It encapsulates and implements all of
the use cases of the system.
► orchestrate the flow of data to and from the entities, and direct those entities to
use their enterprise wide business rules to achieve the goals of the use case.
► Interface Adapters
► a set of adapters that convert data from the format most convenient for the use
cases and entities, to the format most convenient for some external agency such
as the Database or the Web.
► Frameworks and Drivers.
► composed of frameworks and tools such as the Database, the Web Framework, etc
Clean Architecture (cont)
► The Dependency Rule: source code dependencies can only point inwards
► Independent of Frameworks
► Testable
► Independent of UI
► Independent of Database
► Independent of any external agency
Clean Architecture (cont)
► Example solution
Clean Architecture (cont)
► Domain layer
Clean Architecture (cont)
► Infrastructure layer
Clean Architecture (cont)
► Application layer
Clean Architecture (cont)
► Presentation layer
Architect Role
► Solutions architect
► mainly the one responsible for translating requirements into code
► Guiding the development team through the implementation process in every technical
details.
► Making sure that the developed solution meets the designed architecture.
► Making sure that the developed solution meets the functional requirements.
► Participate in choosing the right design patterns for solving problems.
► Application architect
► Choosing the technologies that will be used to implement the application. He'll be
► Making sure that the team is meeting the standard of the technology used.
► Responsible for choosing and cooperate in developing packages/frameworks that will be
used by the team.
► Reliability and scalability of the application.
► Maintaining/refining the development life cycle of the application.
► Enterprise architect
► Designing the high level organizational development process.
► Designing UML that will be used by application/solution architects.
► Should be engaged more with the business mission of the company and the IT strategy.
► Raising the skills of the development team and maintaining their knowledge.
Reference
► https://c4model.com/
► https://learn.microsoft.com/en-us/dotnet/architecture/modern-web-apps-azure/com
mon-web-application-architectures#clean-architecture
► https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-dd
d-cqrs-patterns/ddd-oriented-microservice#layers-in-ddd-microservices
► https://herbertograca.com/2017/11/16/explicit-architecture-01-ddd-hexagonal-onion-
clean-cqrs-how-i-put-it-all-together/
► https://blog.fals.io/2018-09-19-cqrs-clean-architecture/
► https://github.com/AlaaAttya/software-architect-roadmap
Q&A
► Any questions ?
► Thank you !!!