Software Design Architecture Answers
1. a.i) Compliment
between software architecture and software design.
Software Architecture focuses more on the interaction
between the externally visible components of the system where as the Design is
about how the internal components of the system interact with each other.
Software Architecture is more about what we want the system to do and Software
Design is about how we want to achieve that. Software Architecture is at a
higher level of abstraction than the Software Design. Software Architecture is
concerned with issues beyond the data structures and algorithms used in the
system.
Software Architecture shows how the different modules of the
system communicate with each other and other systems. What language is to be
used? What kind of data storage is present, what recovery systems are in place?
Like design patterns there are architectural patterns. Such MVC, 3-tier layered
design, etc.
Software design is about designing the individual modules /
components. What are the responsibilities, functions, of module x or class Y?
What can it do, and what not? What design patterns can be used? UML
diagram/flow chart/simple wireframes (for UI) for a specific module/part of the
system.
Software Architecture is the design of the entire system,
while Software Design emphasizes on a specific module / component / class
level.
All architecture is design but not all design is
architecture.
Software Architecture is “what” we are building. Software
Design is “how” we are building.
ii) 3 advantages of
using Philippe Kruchten architecture view model for software architecture
Stakeholder communication – architecture may be used as
focus of discussion by system stakeholders
System analysis – means that analysis of whether the system
can meet its nonfunctional requirements is possible.
Large-scale reuse – the architecture may be reusable across
range of systems.
b) Why tactics is
important for software architecture
Architect uses tactics as early design decision to fulfill
quality attributes
The choice of tactics are based on qualities attributes
scenario analysis Tactics are implemented using patterns which are the solutions
of recurring problems.
C i) The goal of
availability tactics
Prevention – to keep faults from becoming failures
Detection – to detect faults
Recovery – to make possible recovery
C ii) example of
availability tactics mechanisms and implications
Heartbeat: A fault detection mechanism that employs a periodic
message exchange between a system monitor and a process being monitored.
• Comp. 1 emits a “heartbeat” message periodically
• Comp. 2 listens for it
• If heartbeat fails
Comp. 1 assumed failed
Fault correcting comp. 3 is notified
Heartbeat can also carry data
d) Modifiability
tactics that can be used to control time and cost in making modifications to
the system.
Modifiability deals with change and the cost in time or
money of making a change.
• To which extent this modification affects other functions
or quality attributes.
Tactics to reduce the cost of making a change include
• making modules smaller,
• increasing cohesion, and
• reducing coupling.
• Deferring binding will also reduce the cost of making a
change.
2a) 2 software design
scenarios that demonstrate the benefits of architecture styles.
Design reuse – well understood solution applied to new
problems
Understanding of the system organization – a phase such as
client-server conveys a lot of information.
b) Benefits of using
long-term and short term patterns in software architecture
Short terms
benefits
·
Promote reuse
·
Prevent repeat similar mistakes Implement a
common desire vocabulary
·
Provides a clear procedure for implementation
Shorten desire phase
Long terms benefits
·
Provide a clear structure for maintenance programs
to help understand the code.
·
Use whenever extensibility procedures are
available in the patterns
C i) Layered style
ii) Advantages - increasing the abstraction
level
iii) Disadvantages -
performance
2 d i) compare
cohesion to coupling in software structural design
cohesion coupling Indicate the relationship within the
module Indicate the relationship between modules Show the module relative
functional strength Show the relative
independence among the modules Degree which a component module focus in the
single thing Degree which a component module is connected to other modules.
ii) Level of cohesion
and coupling for subsystems
Coupling -- the strength of dependencies between two
subsystems o strongly coupled == changes to one subsystem likely to affect the
other o loosely coupled == relatively independent (as long as the interface
doesn't change)
o Goal: Strive for loose couplings. Don't share attributes; use
operations and a well-specified interface
cohesion / coherence -- strength of
dependencies within a subsystem o High cohesion: subsystem contains related
objects performing similar tasks o Low cohesion: subsystem contains a number of
unrelated objects
o Goal: Strive for high cohesion
3. a i) 2 advantages
of object composition over class inheritance
Eliminates excessive use of subclass
Allow changes in object behavior in runtime
ii) Interface over
implementation
Interface simulates multiple inheritances. All classes in
java must have one based class. Multiple inheritance of a class is not allowed.
However a java class/interface may implement or extend any number of interfaces
3. b. I and 3.b. ii)
c. i) creational design patterns – abstract
factor pattern because hide how instances classes and methods work together to
provide set of services.
ii) Structural design
patterns – adapter pattern because it allow to wrap an interface of existing
class to be used as another interface
4. a.i) WMC is
determined by count the number of methods in a specific class.
ii) WMC Copyitem = 4
iii) WMC Loan = 2
iv) the significance of part
4 a.ii) Is that we
determined the WMC of class copyitem by
giving us 4 which represents the number of methods in the class copyitem. While
in the of part 4a. iii. Is that we determined the WMC of class Loan by giving
us 2 which represents the number of methods in the class Loan.
4b.i) DIT is is determined by count the number of levels of
superclass from which it inherits methods.
ii) DIT Holding =0
iii) DIT Record Material =2
iv) the DIT of part 4 b.iii. has high reusability and
complexity because is in between the DIT range which is 2-6.
c.i) keep the CBO for each class as low as possible to
reduce coupling
4 c.ii) MPC
CBO borrower = 1
CBO Loan =1
RFC borrower = 3
RFC Loan =3
5bi)
Source
|
Adam
|
Stimulus
|
registered
|
Artefact
|
Uberia
|
Response
|
Publish to potential customers
|
Response
|
measure maximum 10 seconds
|
5 b.ii)
Source
|
Eve
|
Stimulus
|
Make request
|
Artefact
|
Uberia
|
Response
|
Inform the customer
|
Response measure
|
maximum 30 seconds
|
No comments:
Post a Comment