SlideShare uma empresa Scribd logo
1 de 40
Baixar para ler offline
Régis ATEMENGUE
Software Engineer | Technical Instructor.
@regis_ate | www.regisatemengue.com
SoftwareArchitecture:
Architecture Styles and Patterns
Courseobjectives
Understanding the difference between
architecture Patterns and architecture
Style
1
Understanding Layered Architecture
@regis_ate | www.regisatemengue.com
Understanding C4 concepts
Introduction
Courseoverview
C4:Context,Containers,Components
andClasses
Architecture-Styles
Architecture-Patterns
2
LayeredArchitecture
Summary
CommonArchitectureDesign
@regis_ate | www.regisatemengue.com
Introduction
3
@regis_ate | www.regisatemengue.com
SoftwareArchitectureParts
SoftwareArchitecture consists of the structure
of the system (denoted as the heavy black lines
supporting the architecture), combined with
architectural characteristics (“-ilities”) the
system must
support, architecture decisions, and finally
design principles.
4
@regis_ate | www.regisatemengue.com
Fig 1 : SA Parts
SoftwareArchitectureParts
5
The structure of the system, as
illustrated in the figure refers to the type
ofarchitecturestyle(orstyles) the
system is implemented in (such as
microservices, layered, or microkernel).
Describing an architecture solely by the
structure does not wholly elucidate an
architecture.
@regis_ate | www.regisatemengue.com
Fig 2 : SA Parts (Structure)
6
@regis_ate | www.regisatemengue.com
Architecture-Styles
Architecture-Style
7
An architecturalstyle is a central, organizing concept for a
system.
Moderne Heimatstil
Gothique
@regis_ate | www.regisatemengue.com
8
Architecture-Style
An architectural style is a set of features characterizing an
architecture.
An Architectural Style, on the other hand, is just a name given to a
recurrent architectural design. Contrary to a pattern, it doesn't
exist to "solve" a problem.
Architectural Style refers to a set of guidelines or principles for
designing and building software systems.
@regis_ate | www.regisatemengue.com
Architecture-Style
9
Category Styles
Communication SOA, Message Bus etc...
Domain Microservice, Monolithic, etc...
Structure Component-based, Object-Oriented, plug-ins
Deployement Client-Server
@regis_ate | www.regisatemengue.com
10
@regis_ate | www.regisatemengue.com
Architecture-Patterns
An ArchitecturalPatternis a way of solving a recurring architectural
problem.
An ArchitecturalPattern is a specific, reusable solution to a common
problem or design issue in software architecture.
Architectural patterns are used to solve problems related to
architectural style. They are similar to design patterns but have a
different gateway. design patterns touch a specific part of the code to
apply a pattern. The level of granularity is the section of the code.
Architectural patterns have a larger level of granularity. It applies to
system components, functionality, and operation.
Architecture-Patterns
11
example: MVC, for instance, solves the problem of separating the UI
from the model. Sensor-Controller-Actuator is a pattern that will help
you with the problem of actuating in the face of several input sense
@regis_ate | www.regisatemengue.com
Fig 3 : SA MVC
12
Common Architecture Design
@regis_ate | www.regisatemengue.com
13
Two-tiered(Client/Server)architecturalstyle
This is one of the most common
styles in distributed systems. It is
charac- terised by division of
components into either clients or
servers: Clients request services from
servers, and servers provide services
to clients, but servers do not require
services from clients. In general there
are a larger number of clients than
servers. Either or both clients/servers
may be composite components.
Fig 4:: Clients and Server
@regis_ate | www.regisatemengue.com
13
Two-tiered(Client/Server)architecturalstyle
Advantages:
Applications can be easily developed and deployed due to simplicity.
The database server and application logic is physically close, which offers higher
performance, provided the users are manageable.
Disadvantages
On the other hand, the 2 tier architecture disadvantages are:
The performance of the application is degraded with increasing users. When
simultaneous client requests are made, application performance degrades rapidly
due to the fact that clients necessitate separate connections and increased CPU
memory.
Since the client holds most of the application logic, difficulties often arise in
controlling software versions and distributing new versions.
It’s often difficult to implement reliable security since users need to have login
information for every data server.
@regis_ate | www.regisatemengue.com
15
N-tieredarchitecturalstyle
This style is useful for separating
application logic into separate
software packages at different levels.
of platform-specificity, so that
business logic is separated from UI
code and data persistence code. The
tiers or levels correspond to the clean
architecture levels, except that data
storage and UI aspects are typically
in separate tiers, whereas they are
considered to be at the same level in
the clean architecture. The style is
widely used for mobile apps,
enterprise systems, etc.
Fig 5: 3-tiered architectural
@regis_ate | www.regisatemengue.com
16
3-tieredarchitecturalstyle A 3 tier architecture refers to a software
architecture in which the user presentation
interface, the business logic and the data
storage server are developed and
maintained as independent modules on
separate hardware platforms. The client
does not directly communicate with the
database server. Instead, the client interacts
with an application server which further
communicates with the data tier which
contains the database server that is used
for query processing and transaction
management. The business tier serves as a
medium for the exchange for partially
processed data between the database
server and the client. A three-tier
architecture often allows any one of the
three tiers to be upgraded or replaced
independently. The three tiers of this
software architecture are:
Fig 6: 3-tiered architectural
@regis_ate | www.regisatemengue.com
17
Three-tiered(Client/Server)architecturalstyle
The 3 tier architecture has the following advantages:
It can scale without degraded performance since no separate connections from
each client are not required.
There is improved data integrity because data corruption from client applications
can be eliminated by passing the data in the business tier for validation.
It’s often easier to implement improved security since client applications don’t have
direct database access.
It’s possible to scale or change the implementation of a tier on its own without
affecting other tiers of the system.
On the other hand, 3 tier architecture disadvantages are:
There is increased complexity of implementation as the communication points are
increased (presentation tier to business tier to the data tier, instead of direct client
tier to data tier communication).
@regis_ate | www.regisatemengue.com
19
ExampleN-tierarchitectures:enterpriseandmobile
systems
Fig 7: 5-tiered architectural: mobile Systems
@regis_ate | www.regisatemengue.com
Layered Architecture
18
@regis_ate | www.regisatemengue.com
19
LayeredArchitecture
Components within the layered
architecture pattern are organized
into horizontal layers, each layer
performing a specific role within
the application (e.g., presentation
logic or business logic). Although
the layered architecture pattern
does not specify the number and
types of layers that must exist in
the pattern, most layered architec‐
tures consist of four standard
layers: presentation, business,
persis‐ tence, and database Figure.
Fig 8: Layered architecture
@regis_ate | www.regisatemengue.com
20
LayeredArchitecture:Description
Presentationlayer: This is the layer that interacts with users through screens, forms, menus,
reports, etc. It is the most visible layer of the application. It defines how the application looks.
Businessruleslayer:This layer contains rules that determine the behavior of the whole
application, such as, “If an invoice is printed, then send an email to the customer, select all items
sold, and decrease their stock in the stock management module.”
Thepersistencelayeris responsible for storing data and files. It gets the data from the database
or the hard drive and sends it back to the business layer which then sends it back to the
presentation layer.
Databaselayer:This layer contains the tables, indexes, and data managed by the application.
Searches and insert/delete/update operations are executed here.
@regis_ate | www.regisatemengue.com
21
One of the powerful features of the layered architecture pattern is the separationofconcerns among
components. Components within a specific layer deal only with logic that pertains to that layer.
KeysConcepts
Fig 9:Layated Architecture
@regis_ate | www.regisatemengue.com
22
KeysConcepts(Closed Layers and request access)
Notice in Figure that each of the layers in the architecture is marked as being closed. This is a very
important concept in the lay‐ ered architecture pattern. A closed layer means that as a request moves
from layer to layer, it must go through the layer right below it to get to the next layer below that one
@regis_ate | www.regisatemengue.com
Fig 10: Layated Architecture
23
KeysConcepts(LayeredofIsolation)
The layers of isolation concept means that changes made in one layer of the architecture generally
don’t impact or affect components in other layers
The layers of isolation concept also means that each layer is inde‐ pendent of the other layers, thereby
having little or no knowledge of the inner workings of other layers in the architecture.
Fig 10:Layated Architecture
@regis_ate | www.regisatemengue.com
ExampleLayeredArchitecture
24
Fig 12:Layated Architecture
@regis_ate | www.regisatemengue.com
25
There are several advantages to using layered architecture:
Layers are autonomous: A group of changes in one layer does not affect the others. This
is good because we can increase the functionality of a layer, for example, making an
application that works only on PCs to work on phones and tablets, without having to
rewrite the whole application.
Layers allow better system customization.
There are also a few key disadvantages:
Layers make an application more difficult to maintain. Each change requires analysis.
Layers may affect application performance because they create overhead in execution:
each layer in the upper levels must connect to those in the lower levels for each
operation in the system.
AdvantagesandDisadvantages
@regis_ate | www.regisatemengue.com
26
WhenWouldIUseLayeredArchitecture?
@regis_ate | www.regisatemengue.com
27
C4: Context,Containers,Components and Classes
@regis_ate | www.regisatemengue.com
28
A C4 diagramisagraphicalrepresentationofasoftware
system'sstatic structure and behavior using a collection of
diagrams. The 'C4' in C4 diagram stands for Context, Container,
Component, and Code, which are the four levels of abstraction
that the diagram illustrates.
C4:Context,Containers,ComponentsandClasses
29
C4:Context,Containers,ComponentsandClasses
If software architecture is about
the structure of a software
system, it’s worth
understanding what the major
building blocks are and how
they fit together at differing
levels of abstraction.
ACommonsetofabstractions
@regis_ate | www.regisatemengue.com
30
C4:Context,Containers,ComponentsandClasses
@regis_ate | www.regisatemengue.com
31
C4:Context,Containers,ComponentsandClasses
Classes:for most of us in an OO world, classes are the smallest building blocks of
our software systems.
32
C4:Context,Containers,ComponentsandClasses
Components: A component can be
thought of as a logical grouping of
one or more classes. For example, an
audit component or an
authentication service that is used
by other components to determine
whether access is permitted to
specific resource. Components are
typically made up of a number of
collaborating classes, all behind
higher level contract.
@regis_ate | www.regisatemengue.com
34
C4:Context,Containers,ComponentsandClasses
Containers: A container represents something in which components are executed
or where data resides. This could be anything from a web or application server
through to a rich client application or database. Containers are typically executables
that are started as a part of the overall system, but they don’t have to be separate
processes in their own right. For example, I treat each Java EE web application or
.NET website as a separate container regardless of whether they are running in the
same physical web server process. The key thing about understanding a software
system from a containers perspective is that any inter-container communication is
likely to require a remote interface such as a SOAP web service, RESTful interface,
Java RMI, Microsoft WCF, messaging, etc
@regis_ate | www.regisatemengue.com
35
C4:Containers,
@regis_ate | www.regisatemengue.com
C4:Context,Containers,ComponentsandClasses
Systems: a system is the highest level of abstraction
and represents something that delivers value to
somebody. A system is made up of several separate
containers. Examples include a financial risk
management system, an Internet banking system, a
website and so on.
Context: A high-level diagram that sets the scene;
including key system dependencies and actors.
36
@regis_ate | www.regisatemengue.com
37
C4:Systems
@regis_ate | www.regisatemengue.com
38
C4:Abstraction
@regis_ate | www.regisatemengue.com
Next Course: Microservice Architecture
36
@regis_ate | www.regisatemengue.com

Mais conteúdo relacionado

Semelhante a Software Architecture - Architecture Styles and Patterns-1.pdf

Semelhante a Software Architecture - Architecture Styles and Patterns-1.pdf (20)

Ch6
Ch6Ch6
Ch6
 
Ch6
Ch6Ch6
Ch6
 
Client server architecture in .net by varun tiwari
Client server architecture in .net by varun tiwariClient server architecture in .net by varun tiwari
Client server architecture in .net by varun tiwari
 
Ch 6
Ch 6Ch 6
Ch 6
 
Lecture-12-Architecture Design.pptx
Lecture-12-Architecture Design.pptxLecture-12-Architecture Design.pptx
Lecture-12-Architecture Design.pptx
 
Ppt slides 05
Ppt slides 05Ppt slides 05
Ppt slides 05
 
Distributed architecture (SAD)
Distributed architecture (SAD)Distributed architecture (SAD)
Distributed architecture (SAD)
 
Architectural Design
Architectural DesignArchitectural Design
Architectural Design
 
chapter-6-Software_Engineering_P1_MohamedElhawy_19135002.pptx
chapter-6-Software_Engineering_P1_MohamedElhawy_19135002.pptxchapter-6-Software_Engineering_P1_MohamedElhawy_19135002.pptx
chapter-6-Software_Engineering_P1_MohamedElhawy_19135002.pptx
 
Architectural Design.pptx
Architectural Design.pptxArchitectural Design.pptx
Architectural Design.pptx
 
Software_Archi-1.ppt
Software_Archi-1.pptSoftware_Archi-1.ppt
Software_Archi-1.ppt
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 
N tier architecture
N tier architectureN tier architecture
N tier architecture
 

Último

NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...
NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...
NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...Amil baba
 
The Journey of Fashion Designer Sketches - From Concept to Catwalk
The Journey of Fashion Designer Sketches - From Concept to CatwalkThe Journey of Fashion Designer Sketches - From Concept to Catwalk
The Journey of Fashion Designer Sketches - From Concept to CatwalkWave PLM
 
And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)☕ 🥧 🚲 Martin Gude
 
spColumn-Manual design column by spcolumn software.pdf
spColumn-Manual design column by spcolumn software.pdfspColumn-Manual design column by spcolumn software.pdf
spColumn-Manual design column by spcolumn software.pdfChan Thorn
 
一比一原版谢菲尔德大学毕业证成绩单如何办理
一比一原版谢菲尔德大学毕业证成绩单如何办理一比一原版谢菲尔德大学毕业证成绩单如何办理
一比一原版谢菲尔德大学毕业证成绩单如何办理cyebo
 
Recycled Modular Low Cost Construction .pdf
Recycled Modular Low Cost Construction .pdfRecycled Modular Low Cost Construction .pdf
Recycled Modular Low Cost Construction .pdfjeffreycarroll14
 
iF_Design_Trend_Report_twentytwenrythree
iF_Design_Trend_Report_twentytwenrythreeiF_Design_Trend_Report_twentytwenrythree
iF_Design_Trend_Report_twentytwenrythreeCarlgaming1
 
Bit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfolioBit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfoliodhrumibshah13
 
Dos And Dont's Of Logo Design For 2024..
Dos And Dont's Of Logo Design For 2024..Dos And Dont's Of Logo Design For 2024..
Dos And Dont's Of Logo Design For 2024..GB Logo Design
 
FW25-26 Fashion Key Items Trend Book Peclers Paris
FW25-26 Fashion Key Items Trend Book Peclers ParisFW25-26 Fashion Key Items Trend Book Peclers Paris
FW25-26 Fashion Key Items Trend Book Peclers ParisPeclers Paris
 
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdfCADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdfDuyDo100
 
Heidi Livengood's Professional CADD Portfolio
Heidi Livengood's Professional CADD PortfolioHeidi Livengood's Professional CADD Portfolio
Heidi Livengood's Professional CADD PortfolioHeidiLivengood
 
Presentation on 3D Printing.pptx presentation
Presentation on 3D Printing.pptx presentationPresentation on 3D Printing.pptx presentation
Presentation on 3D Printing.pptx presentationajroy0196
 
Knowing, Understanding and Planning Cities- Role and Relevance Physical Plan...
Knowing, Understanding and Planning Cities- Role and Relevance  Physical Plan...Knowing, Understanding and Planning Cities- Role and Relevance  Physical Plan...
Knowing, Understanding and Planning Cities- Role and Relevance Physical Plan...JIT KUMAR GUPTA
 
Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3Remy Rey De Barros
 
Week of Action 2022_EIT Climate-KIC_Headers
Week of Action 2022_EIT Climate-KIC_HeadersWeek of Action 2022_EIT Climate-KIC_Headers
Week of Action 2022_EIT Climate-KIC_Headersekinlvnt
 
Latest Trends in Home and Building Design
Latest Trends in Home and Building DesignLatest Trends in Home and Building Design
Latest Trends in Home and Building DesignResDraft
 
Eric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-INEric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-INEric Parein
 
Naer VR: Advanced Research and Usability Testing Project
Naer VR: Advanced Research and Usability Testing ProjectNaer VR: Advanced Research and Usability Testing Project
Naer VR: Advanced Research and Usability Testing Projectbuvanatest
 
Abdulaziz Tariq Abdulaziz Mustafa CV 2024
Abdulaziz Tariq Abdulaziz Mustafa CV 2024Abdulaziz Tariq Abdulaziz Mustafa CV 2024
Abdulaziz Tariq Abdulaziz Mustafa CV 2024Abdulaziz Mustafa
 

Último (20)

NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...
NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...
NO1 Popular kala jadu karne wale ka contact number kala jadu karne wale baba ...
 
The Journey of Fashion Designer Sketches - From Concept to Catwalk
The Journey of Fashion Designer Sketches - From Concept to CatwalkThe Journey of Fashion Designer Sketches - From Concept to Catwalk
The Journey of Fashion Designer Sketches - From Concept to Catwalk
 
And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)And that's about to change! (Service Design Drinks Berlin May 2024)
And that's about to change! (Service Design Drinks Berlin May 2024)
 
spColumn-Manual design column by spcolumn software.pdf
spColumn-Manual design column by spcolumn software.pdfspColumn-Manual design column by spcolumn software.pdf
spColumn-Manual design column by spcolumn software.pdf
 
一比一原版谢菲尔德大学毕业证成绩单如何办理
一比一原版谢菲尔德大学毕业证成绩单如何办理一比一原版谢菲尔德大学毕业证成绩单如何办理
一比一原版谢菲尔德大学毕业证成绩单如何办理
 
Recycled Modular Low Cost Construction .pdf
Recycled Modular Low Cost Construction .pdfRecycled Modular Low Cost Construction .pdf
Recycled Modular Low Cost Construction .pdf
 
iF_Design_Trend_Report_twentytwenrythree
iF_Design_Trend_Report_twentytwenrythreeiF_Design_Trend_Report_twentytwenrythree
iF_Design_Trend_Report_twentytwenrythree
 
Bit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfolioBit Dhrumi shah Graphic Designer portfolio
Bit Dhrumi shah Graphic Designer portfolio
 
Dos And Dont's Of Logo Design For 2024..
Dos And Dont's Of Logo Design For 2024..Dos And Dont's Of Logo Design For 2024..
Dos And Dont's Of Logo Design For 2024..
 
FW25-26 Fashion Key Items Trend Book Peclers Paris
FW25-26 Fashion Key Items Trend Book Peclers ParisFW25-26 Fashion Key Items Trend Book Peclers Paris
FW25-26 Fashion Key Items Trend Book Peclers Paris
 
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdfCADD 141 - BIRD Scooter - Cup Holder Photos.pdf
CADD 141 - BIRD Scooter - Cup Holder Photos.pdf
 
Heidi Livengood's Professional CADD Portfolio
Heidi Livengood's Professional CADD PortfolioHeidi Livengood's Professional CADD Portfolio
Heidi Livengood's Professional CADD Portfolio
 
Presentation on 3D Printing.pptx presentation
Presentation on 3D Printing.pptx presentationPresentation on 3D Printing.pptx presentation
Presentation on 3D Printing.pptx presentation
 
Knowing, Understanding and Planning Cities- Role and Relevance Physical Plan...
Knowing, Understanding and Planning Cities- Role and Relevance  Physical Plan...Knowing, Understanding and Planning Cities- Role and Relevance  Physical Plan...
Knowing, Understanding and Planning Cities- Role and Relevance Physical Plan...
 
Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3Design lessons from Singapore | Volume 3
Design lessons from Singapore | Volume 3
 
Week of Action 2022_EIT Climate-KIC_Headers
Week of Action 2022_EIT Climate-KIC_HeadersWeek of Action 2022_EIT Climate-KIC_Headers
Week of Action 2022_EIT Climate-KIC_Headers
 
Latest Trends in Home and Building Design
Latest Trends in Home and Building DesignLatest Trends in Home and Building Design
Latest Trends in Home and Building Design
 
Eric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-INEric Parein CV. Parein in English is best pronounced as PARE-IN
Eric Parein CV. Parein in English is best pronounced as PARE-IN
 
Naer VR: Advanced Research and Usability Testing Project
Naer VR: Advanced Research and Usability Testing ProjectNaer VR: Advanced Research and Usability Testing Project
Naer VR: Advanced Research and Usability Testing Project
 
Abdulaziz Tariq Abdulaziz Mustafa CV 2024
Abdulaziz Tariq Abdulaziz Mustafa CV 2024Abdulaziz Tariq Abdulaziz Mustafa CV 2024
Abdulaziz Tariq Abdulaziz Mustafa CV 2024
 

Software Architecture - Architecture Styles and Patterns-1.pdf

  • 1. Régis ATEMENGUE Software Engineer | Technical Instructor. @regis_ate | www.regisatemengue.com SoftwareArchitecture: Architecture Styles and Patterns
  • 2. Courseobjectives Understanding the difference between architecture Patterns and architecture Style 1 Understanding Layered Architecture @regis_ate | www.regisatemengue.com Understanding C4 concepts
  • 5. SoftwareArchitectureParts SoftwareArchitecture consists of the structure of the system (denoted as the heavy black lines supporting the architecture), combined with architectural characteristics (“-ilities”) the system must support, architecture decisions, and finally design principles. 4 @regis_ate | www.regisatemengue.com Fig 1 : SA Parts
  • 6. SoftwareArchitectureParts 5 The structure of the system, as illustrated in the figure refers to the type ofarchitecturestyle(orstyles) the system is implemented in (such as microservices, layered, or microkernel). Describing an architecture solely by the structure does not wholly elucidate an architecture. @regis_ate | www.regisatemengue.com Fig 2 : SA Parts (Structure)
  • 8. Architecture-Style 7 An architecturalstyle is a central, organizing concept for a system. Moderne Heimatstil Gothique @regis_ate | www.regisatemengue.com
  • 9. 8 Architecture-Style An architectural style is a set of features characterizing an architecture. An Architectural Style, on the other hand, is just a name given to a recurrent architectural design. Contrary to a pattern, it doesn't exist to "solve" a problem. Architectural Style refers to a set of guidelines or principles for designing and building software systems. @regis_ate | www.regisatemengue.com
  • 10. Architecture-Style 9 Category Styles Communication SOA, Message Bus etc... Domain Microservice, Monolithic, etc... Structure Component-based, Object-Oriented, plug-ins Deployement Client-Server @regis_ate | www.regisatemengue.com
  • 11. 10 @regis_ate | www.regisatemengue.com Architecture-Patterns An ArchitecturalPatternis a way of solving a recurring architectural problem. An ArchitecturalPattern is a specific, reusable solution to a common problem or design issue in software architecture. Architectural patterns are used to solve problems related to architectural style. They are similar to design patterns but have a different gateway. design patterns touch a specific part of the code to apply a pattern. The level of granularity is the section of the code. Architectural patterns have a larger level of granularity. It applies to system components, functionality, and operation.
  • 12. Architecture-Patterns 11 example: MVC, for instance, solves the problem of separating the UI from the model. Sensor-Controller-Actuator is a pattern that will help you with the problem of actuating in the face of several input sense @regis_ate | www.regisatemengue.com Fig 3 : SA MVC
  • 13. 12 Common Architecture Design @regis_ate | www.regisatemengue.com
  • 14. 13 Two-tiered(Client/Server)architecturalstyle This is one of the most common styles in distributed systems. It is charac- terised by division of components into either clients or servers: Clients request services from servers, and servers provide services to clients, but servers do not require services from clients. In general there are a larger number of clients than servers. Either or both clients/servers may be composite components. Fig 4:: Clients and Server @regis_ate | www.regisatemengue.com
  • 15. 13 Two-tiered(Client/Server)architecturalstyle Advantages: Applications can be easily developed and deployed due to simplicity. The database server and application logic is physically close, which offers higher performance, provided the users are manageable. Disadvantages On the other hand, the 2 tier architecture disadvantages are: The performance of the application is degraded with increasing users. When simultaneous client requests are made, application performance degrades rapidly due to the fact that clients necessitate separate connections and increased CPU memory. Since the client holds most of the application logic, difficulties often arise in controlling software versions and distributing new versions. It’s often difficult to implement reliable security since users need to have login information for every data server. @regis_ate | www.regisatemengue.com
  • 16. 15 N-tieredarchitecturalstyle This style is useful for separating application logic into separate software packages at different levels. of platform-specificity, so that business logic is separated from UI code and data persistence code. The tiers or levels correspond to the clean architecture levels, except that data storage and UI aspects are typically in separate tiers, whereas they are considered to be at the same level in the clean architecture. The style is widely used for mobile apps, enterprise systems, etc. Fig 5: 3-tiered architectural @regis_ate | www.regisatemengue.com
  • 17. 16 3-tieredarchitecturalstyle A 3 tier architecture refers to a software architecture in which the user presentation interface, the business logic and the data storage server are developed and maintained as independent modules on separate hardware platforms. The client does not directly communicate with the database server. Instead, the client interacts with an application server which further communicates with the data tier which contains the database server that is used for query processing and transaction management. The business tier serves as a medium for the exchange for partially processed data between the database server and the client. A three-tier architecture often allows any one of the three tiers to be upgraded or replaced independently. The three tiers of this software architecture are: Fig 6: 3-tiered architectural @regis_ate | www.regisatemengue.com
  • 18. 17 Three-tiered(Client/Server)architecturalstyle The 3 tier architecture has the following advantages: It can scale without degraded performance since no separate connections from each client are not required. There is improved data integrity because data corruption from client applications can be eliminated by passing the data in the business tier for validation. It’s often easier to implement improved security since client applications don’t have direct database access. It’s possible to scale or change the implementation of a tier on its own without affecting other tiers of the system. On the other hand, 3 tier architecture disadvantages are: There is increased complexity of implementation as the communication points are increased (presentation tier to business tier to the data tier, instead of direct client tier to data tier communication). @regis_ate | www.regisatemengue.com
  • 19. 19 ExampleN-tierarchitectures:enterpriseandmobile systems Fig 7: 5-tiered architectural: mobile Systems @regis_ate | www.regisatemengue.com
  • 20. Layered Architecture 18 @regis_ate | www.regisatemengue.com
  • 21. 19 LayeredArchitecture Components within the layered architecture pattern are organized into horizontal layers, each layer performing a specific role within the application (e.g., presentation logic or business logic). Although the layered architecture pattern does not specify the number and types of layers that must exist in the pattern, most layered architec‐ tures consist of four standard layers: presentation, business, persis‐ tence, and database Figure. Fig 8: Layered architecture @regis_ate | www.regisatemengue.com
  • 22. 20 LayeredArchitecture:Description Presentationlayer: This is the layer that interacts with users through screens, forms, menus, reports, etc. It is the most visible layer of the application. It defines how the application looks. Businessruleslayer:This layer contains rules that determine the behavior of the whole application, such as, “If an invoice is printed, then send an email to the customer, select all items sold, and decrease their stock in the stock management module.” Thepersistencelayeris responsible for storing data and files. It gets the data from the database or the hard drive and sends it back to the business layer which then sends it back to the presentation layer. Databaselayer:This layer contains the tables, indexes, and data managed by the application. Searches and insert/delete/update operations are executed here. @regis_ate | www.regisatemengue.com
  • 23. 21 One of the powerful features of the layered architecture pattern is the separationofconcerns among components. Components within a specific layer deal only with logic that pertains to that layer. KeysConcepts Fig 9:Layated Architecture @regis_ate | www.regisatemengue.com
  • 24. 22 KeysConcepts(Closed Layers and request access) Notice in Figure that each of the layers in the architecture is marked as being closed. This is a very important concept in the lay‐ ered architecture pattern. A closed layer means that as a request moves from layer to layer, it must go through the layer right below it to get to the next layer below that one @regis_ate | www.regisatemengue.com Fig 10: Layated Architecture
  • 25. 23 KeysConcepts(LayeredofIsolation) The layers of isolation concept means that changes made in one layer of the architecture generally don’t impact or affect components in other layers The layers of isolation concept also means that each layer is inde‐ pendent of the other layers, thereby having little or no knowledge of the inner workings of other layers in the architecture. Fig 10:Layated Architecture @regis_ate | www.regisatemengue.com
  • 27. 25 There are several advantages to using layered architecture: Layers are autonomous: A group of changes in one layer does not affect the others. This is good because we can increase the functionality of a layer, for example, making an application that works only on PCs to work on phones and tablets, without having to rewrite the whole application. Layers allow better system customization. There are also a few key disadvantages: Layers make an application more difficult to maintain. Each change requires analysis. Layers may affect application performance because they create overhead in execution: each layer in the upper levels must connect to those in the lower levels for each operation in the system. AdvantagesandDisadvantages @regis_ate | www.regisatemengue.com
  • 29. 27 C4: Context,Containers,Components and Classes @regis_ate | www.regisatemengue.com
  • 30. 28 A C4 diagramisagraphicalrepresentationofasoftware system'sstatic structure and behavior using a collection of diagrams. The 'C4' in C4 diagram stands for Context, Container, Component, and Code, which are the four levels of abstraction that the diagram illustrates. C4:Context,Containers,ComponentsandClasses
  • 31. 29 C4:Context,Containers,ComponentsandClasses If software architecture is about the structure of a software system, it’s worth understanding what the major building blocks are and how they fit together at differing levels of abstraction. ACommonsetofabstractions @regis_ate | www.regisatemengue.com
  • 33. 31 C4:Context,Containers,ComponentsandClasses Classes:for most of us in an OO world, classes are the smallest building blocks of our software systems.
  • 34. 32 C4:Context,Containers,ComponentsandClasses Components: A component can be thought of as a logical grouping of one or more classes. For example, an audit component or an authentication service that is used by other components to determine whether access is permitted to specific resource. Components are typically made up of a number of collaborating classes, all behind higher level contract. @regis_ate | www.regisatemengue.com
  • 35. 34 C4:Context,Containers,ComponentsandClasses Containers: A container represents something in which components are executed or where data resides. This could be anything from a web or application server through to a rich client application or database. Containers are typically executables that are started as a part of the overall system, but they don’t have to be separate processes in their own right. For example, I treat each Java EE web application or .NET website as a separate container regardless of whether they are running in the same physical web server process. The key thing about understanding a software system from a containers perspective is that any inter-container communication is likely to require a remote interface such as a SOAP web service, RESTful interface, Java RMI, Microsoft WCF, messaging, etc @regis_ate | www.regisatemengue.com
  • 37. C4:Context,Containers,ComponentsandClasses Systems: a system is the highest level of abstraction and represents something that delivers value to somebody. A system is made up of several separate containers. Examples include a financial risk management system, an Internet banking system, a website and so on. Context: A high-level diagram that sets the scene; including key system dependencies and actors. 36 @regis_ate | www.regisatemengue.com
  • 40. Next Course: Microservice Architecture 36 @regis_ate | www.regisatemengue.com