Please enable JavaScript.
Coggle requires JavaScript to display documents.
Hierarchical Architecture (Main/Subroutine Architecture (Function Call…
Hierarchical Architecture
General Rules
Services at lower level provides more specific functionality down to fundamental utility services such as
Middle layers provide more domain dependent functions such as
Upper layers provide more abstract functionality in the form of user interfaces such as
Any changes to a specific layer may affect only its adjacent upper layers.
Main/Subroutine Architecture
The oldest and most widely used architecture.
Encourage re-use of modules
Idea
System decomposed into sub-routines
A “main” program calls sub-routines and accomplishes task
Function Call Supported by Assembly
Protect old register values by pushing to stack
Set parameters in register
Call the subroutine
Jump, Long Jump, Call instruction
Software Interrupt
Function Call Supported by High Level Language
Much more convenient
Much more tricky!
Parameter passing
Pass by value
Pass by reference
Design
Usually Requirement Spec. Specified in Data Flow Diagram (DFD)
Objective: Map from DFD to Main/Subroutine Design
Benefits
Easy to decompose the system
Can still be used in sub-system of OO Design.
Limitations
Globally shared data are vulnerable
Tight coupling may cause ripple impacts as compared to OO design
Master-Slave
A variant of main-subroutine architecture
It supports Fault tolerance and system reliability
The slaves provide replicated services to the master
The master selects a particular result among slaves by certain selection strategies.
Layered
For systems that can be divided between portions providing generic services to the application of the system
For applications which have classes that are close related each other
Benefits
Incremental software development
Enhanced independence of upper layer to lower layer
Enhanced reusability and interchangeability
Component-based technology is a suitable
Promotion of portability
Limitations
Lower runtime performance
Many applications can not fit this architecture
Exception and error handling