0% found this document useful (0 votes)
6 views

Software Architecture

Uploaded by

Hien Nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Software Architecture

Uploaded by

Hien Nguyen
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

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.

Clements et al, 2010

► 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

► How to solve the problems related to the Architectural Style?


► What high-level modules will have in our Service-Oriented Architecture and
how will they communicate?
► What classes will we have and how will they interact, in order to implement a
system with a specific set of layers?
Architectural Pattern (cont)

► 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)

► Level 1: System Context


► Diagram of a big picture of software system
► Surrounded by its users and the other systems that it interacts with
► Focus on people (actors, roles, personas, etc) and software systems
Visualising Software Architecture (cont)
Level 1: System Context
Visualising Software Architecture (cont)
► Level 2: Container
► High-level technology choices with a Container diagram.
► Web application, mobile app, desktop application, database, file system, etc.

► A separately deployable unit that executes code or stores data.


► Shows how the containers communicate with one another.
Visualising Software Architecture (cont)
Level 2: Container
Visualising Software Architecture (cont)
► Level 3: Component
► Zoom in to each container further to visualise the major structural building blocks
and their interactions
► Shows how a container is made up of a number of components, what each of those
components are, their responsibilities and the technology/implementation details.
Visualising Software Architecture (cont)
Level 3: Component
Visualising Software Architecture (cont)
► Level 4: Code
► Zoom into an individual component, how that component is implemented.
► Using UML class diagrams, entity relationship diagrams or similar.
► Code elements: classes, interfaces, objects, functions, database tables, …
Visualising Software Architecture (cont)
► Level 4: Code
► Zoom into an individual component, how that component is implemented.
► Using UML class diagrams, entity relationship diagrams or similar.
► Code elements: classes, interfaces, objects, functions, database tables, …
Practical application: Clean Architecture
Clean Architecture (cont)
► Entities
► encapsulate Enterprise wide business rules

► 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 !!!

You might also like