Beruflich Dokumente
Kultur Dokumente
SequenceDiagram
Week7
Announcement Reminder
Announcement
MidtermI:
Midterm I:
1:00 1:50pmWednesday23rd March
Ch.1,2,3and26.5
Hour1,6,7and19(pp.331 335)
Multiplechoice
Agenda (Lecture)
Agenda(Lecture)
Architecturedesign
Architecture design
Sequencediagram
Agenda (Lab)
Agenda(Lab)
Create
Createausecase
a use caselevel
level(function
(functionlevel)
level)sequence
sequence
diagram(LabAssignment#7)foryourgroupproject.
Quizzes(hours9)
Q ( )
Weeklyprogressreport
Submittheprogressreportandsequencediagramby
Submit the progress report and sequence diagram by
theendoftheWednesdaylabsession.
Team Lab Assignment #7
TeamLabAssignment#7
Create
Createausecase
a use caselevel
level(function
(functionlevel)
level)sequence
sequence
diagram(LabAssignment#7)foryourgroupproject.
Duedate
Theendofthe3/9labsession
Topics covered
Topicscovered
Architecturaldesigndecisions
Architectural design decisions
Architecturalviews
Architectural patterns
Architecturalpatterns
Applicationarchitectures
Software architecture
Softwarearchitecture
The
Thedesignprocessforidentifyingthesub
design process for identifying the subsystems
systems
makingupasystemandtheframeworkforsub
systemcontrolandcommunicationisarchitectural
design.
Theoutputofthisdesignprocessisadescriptionof
the softwarearchitecture.
Architectural design
Architecturaldesign
An
Anearlystageofthesystemdesignprocess.
early stage of the system design process.
Representsthelinkbetweenspecificationanddesign
p
processes.
Oftencarriedoutinparallelwithsomespecification
activities.
Itinvolvesidentifyingmajorsystemcomponentsand
theircommunications.
Thearchitectureofapackingrobot
controlsystem
l
Architectural abstraction
Architecturalabstraction
Architecture
Architectureinthesmallisconcernedwiththe
in the small is concerned with the
architectureofindividualprograms.Atthislevel,we
areconcernedwiththewaythatanindividual
programisdecomposedintocomponents.
Architectureinthelargeisconcernedwiththe
architectureofcomplexenterprisesystemsthat
includeothersystems,programs,andprogram
components These enterprise systems are
components.Theseenterprisesystemsare
distributedoverdifferentcomputers,whichmaybe
owned and managed by different companies.
ownedandmanagedbydifferentcompanies.
Advantages of explicit architecture
Advantagesofexplicitarchitecture
Stakeholdercommunication
Architecturemaybeusedasafocusofdiscussionby
systemstakeholders.
Systemanalysis
S t l i
Meansthatanalysisofwhetherthesystemcanmeetits
nonfunctionalrequirementsispossible.
q p
Largescalereuse
Thearchitecturemaybereusableacrossarangeof
systems
Productlinearchitecturesmaybedeveloped.
Architectural representations
Architecturalrepresentations
Simple,informalblockdiagramsshowingentitiesand
p , g g
relationshipsarethemostfrequentlyusedmethod
fordocumentingsoftwarearchitectures.
Butthesehavebeencriticizedbecausetheylack
h h b db h l k
semantics,donotshowthetypesofrelationships
between entities nor the visible properties of entities
betweenentitiesnorthevisiblepropertiesofentities
inthearchitecture.
Dependsontheuseofarchitecturalmodels.The
requirementsformodelsemanticsdependsonhow
themodelsareused.
Box and line diagrams
Boxandlinediagrams
Very
Veryabstract
abstract theydonotshowthenatureof
they do not show the nature of
componentrelationshipsnortheexternallyvisible
propertiesofthesubsystems.
However,usefulforcommunicationwith
stakeholdersandforprojectplanning.
Use of architectural models
Useofarchitecturalmodels
Asawayoffacilitatingdiscussionaboutthesystem
y g y
design
Ahighlevelarchitecturalviewofasystemisusefulfor
communication with system stakeholders and project planning
communicationwithsystemstakeholdersandprojectplanning
becauseitisnotclutteredwithdetail.Stakeholderscanrelateto
itandunderstandanabstractviewofthesystem.Theycanthen
discussthesystemasawholewithoutbeingconfusedbydetail.
Asawayofdocumentinganarchitecturethathasbeen
designed
The
Theaimhereistoproduceacompletesystemmodelthatshows
aim here is to produce a complete system model that shows
thedifferentcomponentsinasystem,theirinterfacesandtheir
connections.
Architectural design decisions
Architecturaldesigndecisions
Architectural
Architecturaldesignisacreativeprocesssothe
design is a creative process so the
processdiffersdependingonthetypeofsystem
beingdeveloped.
However,anumberofcommondecisionsspanall
designprocessesandthesedecisionsaffectthenon
functionalcharacteristicsofthesystem.
Architectural design decisions
Architecturaldesigndecisions
Isthereagenericapplicationarchitecturethatcanbeused?
g pp
Howwillthesystembedistributed?
Whatarchitecturalstylesareappropriate?
Whatapproachwillbeusedtostructurethesystem?
Howwillthesystembedecomposedintomodules?
Whatcontrolstrategyshouldbeused?
Howwillthearchitecturaldesignbeevaluated?
How should the architecture be documented?
Howshouldthearchitecturebedocumented?
Architecture reuse
Architecturereuse
Systems
Systemsinthesamedomainoftenhavesimilar
in the same domain often have similar
architecturesthatreflectdomainconcepts.
Applicationproductlinesarebuiltaroundacore
pp p
architecturewithvariantsthatsatisfyparticular
customerrequirements.
Thearchitectureofasystemmaybedesigned
aroundoneofmorearchitecturalpatternsorstyles.
Thesecapturetheessenceofanarchitectureandcanbe
instantiatedindifferentways.
Discussedlaterinthislecture.
Discussed later in this lecture
Architectureandsystemcharacteristics
y
Performance
Localizecriticaloperationsandminimizecommunications.Uselarge
ratherthanfinegraincomponents.
Securityy
Usealayeredarchitecturewithcriticalassetsintheinnerlayers.
Safety
Localizesafetycriticalfeaturesinasmallnumberofsubsystems.
Localize safety critical features in a small number of sub systems
Availability
Includeredundantcomponentsandmechanismsforfaulttolerance.
Maintainability
Usefinegrain,replaceablecomponents.
Architectural views
Architecturalviews
Whatviewsorperspectivesareusefulwhendesigning
a e s o pe spec es a e use u e des g g
anddocumentingasystemsarchitecture?
Whatnotationsshouldbeusedfordescribing
architecturalmodels?
Eacharchitecturalmodelonlyshowsoneviewor
perspectiveofthesystem.
ti f th t
Itmightshowhowasystemisdecomposedintomodules,how
theruntimeprocessesinteractorthedifferentwaysinwhich
systemcomponentsaredistributedacrossanetwork.Forboth
designanddocumentation,youusuallyneedtopresentmultiple
viewsofthesoftwarearchitecture.
4+1viewmodelofsoftware
architecture
h
Alogicalview,whichshowsthekeyabstractionsin
g , y
thesystemasobjectsorobjectclasses.
Aprocessview,whichshowshow,atruntime,the
systemiscomposedofinteractingprocesses.
d f
Adevelopmentview,whichshowshowthesoftware
is decomposed for development
isdecomposedfordevelopment.
Aphysicalview,whichshowsthesystemhardware
p
andhowsoftwarecomponentsaredistributedacross
theprocessorsinthesystem.
Relatedusingusecasesorscenarios(+1)
Architectural patterns
Architecturalpatterns
Patterns
Patternsareameansofrepresenting,sharingand
are a means of representing, sharing and
reusingknowledge.
Anarchitecturalpatternisastylizeddescriptionof
p y p
gooddesignpractice,whichhasbeentriedand
testedindifferentenvironments.
Patternsshouldincludeinformationaboutwhen
theyareandwhenthearenotuseful.
Patternsmayberepresentedusingtabularand
graphicaldescriptions.
TheModelViewController(MVC)
pattern
Name MVC (Model-View-Controller)
Description Separates presentation and interaction from the system data. The system is
structured into three logical components that interact with each other. The
Model component manages the system data and associated operations on
that data. The View component
p defines and managesg how the data is
presented to the user. The Controller component manages user interaction
(e.g., key presses, mouse clicks, etc.) and passes these interactions to the
View and the Model. See Figure 6.3.
Example Figure 6.4 shows the architecture of a web-based application system
organized using the MVC pattern.
When used Used when there are multiple ways to view and interact with data. Also used
when the future requirements for interaction and presentation of data are
unknown.
Advantages Allows the data to change independently of its representation and vice versa.
versa
Supports presentation of the same data in different ways with changes made
in one representation shown in all of them.
Disadvantages Can involve additional code and code complexity when the data model and
interactions are simple.
p
TheorganizationoftheModelView
Controller
ll
Webapplicationarchitectureusingthe
MVCpattern
Layered architecture
Layeredarchitecture
Usedtomodeltheinterfacingofsubsystems.
g y
Organisesthesystemintoasetoflayers(orabstract
machines)eachofwhichprovideasetofservices.
Supportstheincrementaldevelopmentofsubsystemsin
differentlayers.Whenalayerinterfacechanges,onlythe
j y
adjacentlayerisaffected.
However,oftenartificialtostructuresystemsinthisway.
The Layered architecture pattern
TheLayeredarchitecturepattern
Name Layered architecture
Operator Shutdown
Session
Customer
Invalid PIN
include
extend
Login Transaction
include
Bank
CustomerConsole OperatorPanel
ATMController
CardReader ReceiptPrinter
p Receipt
p
Card
Ca d Session
Sess o Transaction
a sact o
Account
SD ATMSystemStartup
SD ATM System Startup
sd System Startup
access
switchon()
Operator
performStartup()
getInitialCash()
initialCash(iCash)
setInitialCash(iCash)
reply
openConnection()
reply
confirmation
sd System Shutdown
access
switchOff()
Operator
performShutdown()
closeConnection()
reply
reply
sd Session
cardInserted()
:Session
<<create>>
User
performSession()
readCard()
sendCardInfo()
readPIN()
sendPIN()
<<create>>
p
performTransaction()
()
doAgain()
ejectCard()