Module 2 Transferring Design Knowledge
Module 2 Transferring Design Knowledge
For more detailed solution-oriented design needs, which are often concerned
with describing ‘constructional’ issues such as packaging, procedure
hierarchy, and data organization, the chosen forms will generally focus on
static design attributes.
The nature of software and the many paradigms that exist for developing software
systems, based on different structuring criteria, has led to the use of a large
number of design representations. These can be broadly classified as follows:
2. Behavioural forms, a set of viewpoints that seek to describe the causal links
between events and system responses during execution;
3. Functional forms, viewpoints that seek to describe what the system does in terms
of its tasks;
4. Data-modelling forms, concerned with the data objects used within the system,
and the relationships between these.
The above representations can all be classified as ‘direct’ viewpoints, in that
they are created directly by the designer.
3. packaging constructs, such as the Java class or the Ada package, where such con structs
may be used to construct some form of ‘scope wall’ around sections of the system, or to
create inheritance hierarchies.);
1. Constructional forms
2. fixed-interval descriptions are also fairly tractable, although their use is mainly
restricted to particular features of real-time systems;
3. constraint effects are very difficult to capture and describe using existing forms of
description
3. Functional forms
➢ One of the hardest tasks for the designer is to describe exactly what it is that a
system does.
➢ The initial problem specification, and the algorithmic aspects in particular may be
better specified than other features.
➢ At the detailed design level such forms are generally needed to describe the run
time behaviour of program elements such as subprograms
4. Data Modelling forms
➢ Description of data structures is often a critical aspect of a detailed design.
➢ Again, there are a number of relationships that may need to be captured. These
include such dependencies as: type (classes); sequence (in terms of structures such
as trees and lists); and form.
➢ Different forms of notation for constructing representations are used, the
three basic components that can be used in a representation are:
1. text
Diagram Form
2. diagrams
3. mathematical expressions
➢ Software design method could be described in terms of the following principal
components:
➢ representation part
➢ process part
➢ The process part of a method is closely entwined with the representation part, since
it provides ‘procedural’ guidelines on how the models should be developed.
➢ Figure shows this procedural model of the software design process in a symbolic
fashion. The basic symbols it uses to describe a design method are:
➢ a rectangle to denote a representation form;
2. An elaboration step is one which does not usually involve any change of viewpoint but
is more concerned with restructuring or reorganizing the design model within the
current viewpoint. The purpose of an elaboration step is usually either to add further
information to the model, or to obtain greater insight into the current state of the
design plan through restructuring, and as such it may be an essential preliminary to a
successful transformation step.
➢ The following broad groupings discuss how strategy is incorporated into a design
method:
2. Compositional methods, whereby the basic design model is built up from the
identification of ‘entities’ of some form;
3. Organizational methods, for which the structure of the design process is strongly
influenced by the requirement that it should conform to non-technical
requirements that are based on the form of the organization;
➢ The term ‘stepwise refinement’ is used for this strategy; the phrase ‘divide and conquer’
has also sometimes been used.
➢ In its most basic form, the success of this approach of finding a good solution will be
highly dependent on the way in which the original problem is described, since this forms
the model that is the basis for the designer’s initial choice of subtasks (Solution1)
➢ Indeed, it can be argued that this approach is therefore inherently unstable, in that small
differences in the decomposition of a task can lead to solutions that are functionally
equivalent, but structurally very different (Solution2)
➢ This instability in turn may lead to significant problems at a later stage of design,
and even to the need to totally redesign a system.
➢ The top-down strategy also illustrates one of the characteristic features of the
design process itself. When discussing Rittel’s definition of a ‘wicked problem’, we
identified one of the characteristics of such a problem as being the lack of a
‘stopping rule’ that the designer can use to determine that the design process is
complete. This feature of the design process is particularly evident in functional
decomposition, since there are no generally applicable criteria that can be used to
determine how small a task should be to be considered as suitably elemental.
➢ One other consequence of using this strategy that should also be mentioned is the
problem of duplication.
In the Figure, module A is the topmost module; module A has been decomposed
into modules B, C, and D. Modules B, D, E, F, and G are terminal modules, as
these have not been further decomposed
Top Down
➢ A complete and detailed model of the solution is then developed by elaborating the
descriptions of the entities and the interactions occurring between them.
➢ While the type and form of entity and interaction may differ considerably, the overall
strategy of composing the design model by grouping elements together is the
same.
➢ If compositional methods are more complex and less directly intuitive than those
methods that are based on a top-down approach, and so perhaps require more
discipline in their use, it can be argued that they are also
➢ more stable, in that their use will tend to lead to similar solutions for a problem, regardless of
the user, since the design strategy relates the structure of the solution to the structure of the
problem
➢ more even in terms of the transformation steps involved, with a more gradual progression of
design development than is common for top-down methods;
➢ better able to provide a good verification process between the design and the original
specification, since there is usually an explicit ‘audit trail’ between solution objects and
problem objects.
➢ A particular benefit of the compositional strategy is that it gives more opportunity
for using multiple viewpoints to exploit the use of such important design concepts
as modularity and information-hiding in the structuring of a designer’s solution.
➢ An organizational design method can be considered as one in which the form of the
process part of the method is strongly influenced by a set of non technical factors,
arising from the nature and structure of the organization using the method.
➢ While these factors do not usually affect the representational part so directly, their
influence may still have the effect of extending or formalizing it in some way.
➢ International agencies, as well as central and local government bodies, are major
customers for software-based systems. These range from specialized defence real-
time systems to applications for stock control or taxation. Many of these systems
are very large; they are difficult to specify; the requirements may change with
technology, legislation or internal reorganization; and they may be produced by in-
house teams or by outside contracting agencies.
➢ The use of a standard method or strategy within an organization has a number of
benefits
➢ there is minimum disruption of a project when staff changes occur;
➢ there is scope for better planning, costing and control of projects, based on the use of past
experience, which can be related directly to current practices.
➢ The major negative aspect is that they tend to be overly bureaucratic, with the
attendant risk that creative options may not be adequately explored, and also that
the overall technical direction can be lost.
There are a number of methods that can be classified as having an organizational
element. These include:
➢ SSADM (Structured Systems Analysis and Design Method), which has been produced
for use with data-processing projects by central and local government agencies in
the UK;
➢ The DFD provides a description based on modelling the flow of information around
a network of operational elements, with each element making use of or modifying
the information flowing into that element.
➢ The DFD has been widely used for software design purposes over many years, and a
number of variations in the exact forms of the symbols used for drawing DFDs are
to be found in the literature
The Data-Flow Diagram (The form of the DFD)
➢ The DFD is a graphical representation, and it makes use of only four basic symbols.
➢ Because of its highly abstract nature, in terms of the level of description provided, it
is chiefly used during the early design stages that are often termed ‘analysis’ – at a
time when the designer is likely to be making major architectural design decisions.
➢ The four basic elements that are used in the diagram are:
➢ the circle (or, as it is popularly termed, the bubble), which is used to denote an operation, and is labelled with a
brief description of the operation;
➢ the arc, used to denote the flow of information between the other three components.
The Data-Flow Diagram (The form of the DFD)
➢ Below figure shows an example of the use of a DFD to describe the operation of a
bank autoteller (cashpoint) system.
➢ DFD provides a top-level ‘model’ of how the designer intends the autoteller to
operate. It is expressed in terms that are part of the problem domain (customer,
PIN, transaction), rather than of the solution, and as such it identifies the main
architectural tasks for the autoteller system.
The Data-Flow Diagram (The form of the DFD)
➢ The data-flow element is used to identify the information that is needed for the
appropriate operations to be performed, as well as that which is generated by them.
Using the DFD
➢ The physical DFD is used to model a system in terms of the physical entities
concerned, rather than their functions.
➢ For example, following figure shows a physical DFD that is used to model the
workings of the booking system in a travel office. The labels on the bubbles in this
diagram indicate who does a job, rather than describing the job in any detail
Using the DFD
➢ The Logical DFD shows the equivalent logical DFD, in which the bubbles are now
labelled to show what is being done to the data, rather than who is doing it. This is
a more abstract and more structured view of the system
➢ Both of these forms are important: the physical DFD helps with initial modelling
tasks and with communication with the customer, while the logical DFD is necessary
when the designer begins to build up the architectural model required in order to
build the system.
The Entity–Relationship Diagram
➢ This form of diagram is principally used to capture the relationships that exist
between static data objects in a problem model or a design model.
➢ In particular, the Entity Relationship Model has provided an essential foundation for
the development of the relational models that are used in many database systems
➢ Figure shows the three principal symbols that are used in these diagrams, together
with their meanings.
The Entity–Relationship Diagram
➢ attributes are classes of values that represent atomic properties of either entities or
relationships
➢ Binary relationships link two entities, such as the relationship ‘married to’ occurring
between the entities ‘husband’ and ‘wife’.
➢ ERDs are purely and simply concerned with providing a data-modelling viewpoint of
a system.
➢ As with many notations, they can be used both during the analysis of the problem
and during the development of the solution (design).
Use of ERD
➢ ERDs are widely used for developing the schema used in relational database
modelling.
The State Transition Diagram
➢ Such a system can be considered as existing in a finite set of possible ‘states’, with
external events being the triggers that can lead to transitions between the states.
➢ As an example, the popular Unix screen editor vi (pronounced ‘vee eye’) has two
basic states of operation, which are termed its current ‘modes’. These are:
➢ command mode, in which keystrokes are interpreted as commands to the editor to perform such operations as
opening a file, moving the position of the screen cursor, or beginning to insert text at some point;
➢ insert mode, in which any keystrokes are interpreted as data to be stored in the editor’s buffer
➢ Transitions occur between these modes according to certain forms of ‘escape’ command.
2. The transition is described by an arrow, and identifies a ‘legal’ change of state that can occur within the system
3. The transition condition identifies the condition that will cause the transition to occur – usually in terms of the
event that causes the transition – but is not concerned with the actual mechanism. It is written next to the
transition arrow, above a horizontal line
4. The transition action describes the actions that arise as a result of the transition. These are written below the
horizontal line and the details of the transition conditions.
Form of the State Transition Diagram
➢ To complete the diagram, we also need to identify a default initial state (which has
an arrow pointing into it, with no source state attached), and may (possibly) need to
identify a final state (which will have transitions into it, but none out from it).
➢ It only identifies the possibility that particular transitions will occur, with no
indication as to how these will be sequenced.
Use of STD
➢ A major role for the STD is in modelling problem entities: although it can have a
role in building models of solutions, this is less significant.
➢ The STD is a useful modelling tool, but as with all diagrammatical forms, it has
limitations. As the example of the vi editor has shown, if there are a lot of
transitions between a small number of states, the diagram can become very
tangled.
The Statechart
➢ The Statechart is concerned with describing the behaviour of a system as a form of
finite-state automaton, or finite state machine.
➢ Like the STD, it is a form that is particularly well suited for use in describing reactive
systems, in which the main functions arise in response to particular events.
➢ It provides a rather more abstract form of description than the STD, and in
particular it adds to the state-oriented viewpoint the ability to create a hierarchy of
abstraction in the description, as well as permitting the designer to describe
transitions that are ‘orthogonal’ in that they are completely independent of each
other – so making it possible for the transitions to occur in parallel
Form of the Statechart
➢ In this notation, a state is denoted by a box with rounded corners, labelled in the
upper left corner. Hierarchy is represented by encapsulation, and directed arcs are
used to denote a transformation between states.
➢ The arcs are also labelled with a description of the event and, optionally, with a
parenthesized condition
Form of the Statechart
➢ The Statechart is clearly a powerful and useful tool, and like the STD it has an
important role in modelling reactive systems. Both forms are generally used to
support other design viewpoints such as data flow.
The Jackson Structure Diagram
➢ The Structure Diagram describes a very different set of attributes, and performs a
very different set of roles.
➢ selection
➢ iteration
The form of the Structure Diagram
➢ The Structure Diagram takes the form of a ‘tree’, constructed from a set of boxes and
arcs. Each set of ‘child’ boxes provides an elaboration of the description contained in the
parent box, and hence the full description of a complete sequence is described by the
lowest boxes on each branch
➢ Structure Diagrams can be used to provide a data modelling viewpoint, when used
to describe the sequential structuring of data objects. They can also be used for
describing a viewpoint that has elements of both functional and branch behavioural
viewpoints, when they are used to describe the actions of a program or an entity.
The viewpoints provided by the Structure Diagram
The viewpoints provided by the Structure Diagram
UML Modelling Forms
➢ A core concept of the object model is centered upon the relationships that involve
classes and any objects that are created from these. Identification of candidates for
classes is one of the primary activities in object oriented design practices.
➢ The UML class diagram therefore provides a means of describing both the classes
themselves, and also the interactions between these (uses relationship and the
concept of inheritance)
UML Modelling Forms (The Class Diagram)
➢ Classes can be related in a number of ways. The UML recognizes six forms of
relationship (association, dependency, flow, generalization, realization and usage)
with appropriate distinctions in the notation
UML Modelling Forms (The Use Case Diagram)
➢ The activity diagram can be thought of as a variant upon the state machine. Rather
than modelling the states of the system and the events that cause transitions
between these (Statecharts), the activity diagram is rather vaguely described as
‘modelling computations and workflows’.
➢ The activity diagram is therefore useful for modelling the type of ‘coordinating’
situation where a given computation cannot proceed until certain conditions are
met.
UML Modelling Forms (The Activity Diagram)
2. The transition (between activities), shown as an unlabelled arrow. The lack of a label is because,
unlike the case of the Statechart, the transitions arise from the actions of the activities
themselves, not because of external events.
3. The synchronization bar is a thick horizontal line that represents the coordination of the activities.
When all of the transitions into a bar are complete (the coordinating bit) then the outward
transitions are ‘fired’.
4. A decision diamond that effectively ‘routes’ outgoing transitions (this is in preference to using a
notation that shows multiple possible outgoing transitions). When this is used, then it becomes
necessary to label the transitions to indicate which condition is employed for a particular route.
UML Modelling Forms (The Activity Diagram)
➢ A white box notation can be viewed as one that is largely concerned with describing
some aspect of the detailed realization of a design element. So, not surprisingly,
such notations tend to be associated with the constructional and functional
viewpoints.
➢ Each processing element, usually an object, but also possibly some other system
‘actor’, is allocated a column, and messages are shown by arrows between the
columns.
Uses of Sequence Diagram
➢ Sequence diagrams are essentially concerned with modelling the detailed sequence
of actions taken by a set of collaborating elements, and with the messages that they
use to coordinate these actions. downwards.
➢ The Structure Chart provides a visual ‘index’ to the hierarchy of procedures within a
program, using a treelike format.
➢ The principal role of the Structure Chart is to describe the way in which a
program is assembled from a set of procedures.
➢ The Pseudocode is used very widely. It sometimes appears under other titles such as
PDL (program description language).
Pseudocode Form
Pseudocode
➢ To be effective, there are some useful rules of thumb for writing pseudocode. The
principal ones are:
a. Use indentation to emphasize structure (it aids the eye in following the form of a
sequence and finding other nodes in a branch).
c. Try to ‘bracket’ executable blocks such as the body of a loop, or a branch clause in
a conditional structure, by using such paired keywords as LOOP and ENDLOOP or IF
and ENDIF.
➢ Pseudocode can be used to complement the Structure Chart by providing the details
and sequencing information that elaborates on the boxes in the diagram. It can
ofcourse be generated directly from a Structure Diagram.
THANK YOU