Software Engineering - 2
Software Engineering - 2
John W. Horch (2005). "Two Orientations On How To Work With Objects." In: IEEE
Software. vol. 12, no. 2, pp. 117-118, Mar., 1995.
Karl E. Wiegers (2005). More About Software Requirements: Thorny Issues and
Practical Advice.
1.0 Introduction
35
The last unit exposed you to the overview of software development. In this unit you
will learn about the various lifecycle models (the phases of the software life cycle) in
general. You will also specifically learn about the requirement and the design phases
2.0 Objectives
Software life cycle models describe phases of the software cycle and the order in which
those phases are executed. There are a lot of models, and many companies adopt their
own, but all have very similar patterns. According to Raymond Lewallen (2005), the general,
basic model is shown below:
Source: http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/13/129114.aspx.
Each phase produces deliverables needed by the next phase in the life cycle.
Requirements are converted into design. Code is generated during implementation that is
driven by the design. Testing verifies the deliverable of the implementation phase against
requirements.
This is the most common life cycle models, also referred to as a linear-sequential life
cycle model. It is very simple to understand and use. In a waterfall model, each phase
must be completed before the next phase can begin. At the end of each phase, there is
36
always a review to ascertain if the project is in the right direction and whether or not to
carry on or abandon the project. Unlike the general model, phases do not overlap in a
waterfall model.
Source: http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/13/129114.aspx.
3.2.1 Advantages
3.2.2 Disadvantages
Just like the waterfall model, the V-Shaped life cycle is a sequential path of execution of
processes. Each phase must be completed before the next phase begins. Testing is
emphasized in this model more so than the waterfall model The testing procedures are
37
developed early in the life cycle before any coding is done, during each of the phases
preceding implementation.
Requirements begin the life cycle model just like the waterfall model. Before
development is started, a system test plan is created. The test plan focuses on meeting the
functionality specified in the requirements gathering.
The high-level design phase focuses on system architecture and design. An integration
test plan is created in this phase as well in order to test the pieces of the software systems
ability to work together.
The low-level design phase is where the actual software components are designed, and
unit tests are created in this phase as well.
The implementation phase is, again, where all coding takes place. Once coding is
complete, the path of execution continues up the right side of the V where the test plans
developed earlier are now put to use.
Source: http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/13/129114.aspx.
3.3.1 Advantages
38
Simple and easy to use.
Each phase has specific deliverables.
Higher chance of success over the waterfall model due to the development of test
plans early on during the life cycle.
Works well for small projects where requirements are easily understood.
3.3.2 Disadvantages
The first iteration produces a working version of software and this makes possible to have
working software early on during the software life cycle. Subsequent iterations build on
the initial software produced during the first iteration.
Source: http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/13/129114.aspx.
3.4.1 Advantages
Generates working software quickly and early during the software life cycle.
39
More flexible – inexpensive to change scope and requirements.
Easier to test and debug during a smaller iteration.
Easier to manage risk because risky pieces are identified and handled during its
iteration.
Each of the iterations is an easily managed landmark
3.4.2 Disadvantages
The spiral model is similar to the incremental model, with more emphases placed on risk
analysis. The spiral model has four phases namely Planning, Risk Analysis, Engineering
and Evaluation. A software project continually goes through these phases in iterations
which are called spirals. In the baseline spiral requirements are gathered and risk is
assessed. Each subsequent spiral builds on the baseline spiral.
Requirements are gathered during the planning phase. In the risk analysis phase, a
process is carried out to discover risk and alternate solutions. A prototype is produced at
the end of the risk analysis phase.
Software is produced in the engineering phase, alongside with testing at the end of the
phase. The evaluation phase provides the customer with opportunity to evaluate the
output of the project to date before the project continues to the next spiral.
In the spiral model, the angular component denotes progress, and the radius of the spiral
denotes cost.
40
Fig 5 Spiral Life Cycle Model
Source: http://codebetter.com/blogs/raymond.lewallen/archive/2005/07/13/129114.aspx.
3.5.1 Merits
3.5.2 Demerits
41
Business requirements are gathered in this phase. This phase is the main center of
attention of the project managers and stake holders. Meetings with managers, stake
holders and users are held in order to determine the requirements. Th general questions
that require answers during a requirements gathering phase are: Who is going to use the
system? How will they use the system? What data should be input into the system?
What data should be output by the system? A list of functionality that the system should
provide, which describes functions the system should perform, business logic that
processes data, what data is stored and used by the system, and how the user interface
should work is produced at this point. The requirements development phase may have
been preceded by a feasibility study, or a conceptual analysis phase of the project. The
requirements phase may be divided into requirements elicitation (gathering the
requirements from stakeholders), analysis (checking for consistency and completeness),
specification (documenting the requirements) and validation (making sure the specified
requirements are correct)
42
maintainability requirement may be decomposed into restrictions on software constructs
or limits on lines or code.
43
3.6.5.1 Fix system boundaries
This is initial step and helps in identifying how the new application fit in into the business
processes, how it fits into the larger picture as well as its capacity and limitations.
3.6.5.2 Identify the customer
This focuses on identifying who the ‗users‘ or ‗customers‘ of an application are that is to
say knowing the group or groups of people who will be directly or indirectly impacted by
the new application. This allows the Requirements Analyst to know in advance where he
has to look for answers.
44
User interfaces
45
3.7 Requirements Management
Requirements Management is the all-inclusive process that includes all aspects of
software requirements analysis and as well ensures verification, validation and
traceability of requirements. Effective requirements management practices assure that all
system requirements are stated unmistakably, that omissions and errors are corrected and
that evolving specifications can be included later in the project lifecycle.
The software system design is formed from the results of the requirements phase. This is
where the details on how the system will work are produced. Deliverables in this phase
include hardware and software, communication, software design.
The design process is very important. As a labourer, for example one would not attempt
to build a house without an approved blueprint so as not to risk the structural integrity
and customer satisfaction. In the same way, the approach to building software products is
no unlike. The emphasis in design is on quality. It is pertinent to note that, this is the only
phase in which the customer‘s requirements can be precisely translated into a finished
software product or system. As such, software design serves as the foundation for all
software engineering steps that follow regardless of which process model is being
employed.
During the design process the software specifications are changed into design models that
express the details of the data structures, system architecture, interface, and components.
Each design product is re-examined for quality before moving to the next phase of
software development. At the end of the design process a design specification document
is produced. This document is composed of the design models that describe the data,
architecture, interfaces and components.
46
Architectural design - defines the relationships among the major structural
elements of the software, the ―design patterns‖ that can be used to attain the
requirements that have been defined for the system, and the constraint that affect
the way in which the architectural patterns can be applied. It is derived from the
system specification, the analysis model, and the subsystem interactions defined
in the analysis model (DFD).
Interface design - explains how the software elements communicate with each
other, with other systems, and with human users. Much of the necessary
information required is provided by the e data flow and control flow diagrams.
Component-level design – It converts the structural elements defined by the
software architecture into procedural descriptions of software components using
information acquired from the process specification (PSPEC), control
specification (CSPEC), and state transition diagram (STD).
In order to assess the quality of a design (representation) the yardstick for a good design
should be established. Such a design should:
These criteria are not acquired by chance. The software design process promotes good
design through the application of fundamental design principles, systematic methodology
and through review.
―The design process is a series of steps that allow the designer to describe all aspects of
the software to be built. However, it is not merely a recipe book; for a competent and
successful design, the designer must use creative skill, past experience, a sense of what
makes ―good‖ software, and have a commitment to quality.
47
The set of principles which has been established to help the software engineer in directing
the design process are:
The design process should not suffer from tunnel vision – Alternative
approaches should be considered by a good designer. Designer should judge
each approach based on the requirements of the problem, the resources
available to do the job and any other constraints.
The design should be traceable to the analysis model – because a single
element of the design model often traces to multiple requirements, it is
necessary to have a means of tracking how the requirements have been
satisfied by the model
The design should not reinvent the wheel – Systems are constructed using a
suite of design patterns, many of which may have likely been encountered
before. These patterns should always be chosen as an alternative to
reinvention. Design time should be spent in expressing truly fresh ideas and
incorporating those patterns that already exist.
The design should reduce intellectual distance between the software and the
problem as it exists in the real world – This means that, the structure of the
software design should imitate the structure of the problem domain.
The design should show uniformity and integration – a design is uniform if it
appears that one person developed the whole thing. Rules of style and format
should be defined for a design team before design work begins. A design is
integrated if care is taken in defining interfaces between design components.
The design should be structured to degrade gently, even with bad data, events,
or operating conditions are encountered – Well-designed software should
never ―bomb‖. It should be designed to accommodate unusual circumstances,
and if it must terminate processing, do so in a graceful manner.
The design should be reviewed to minimize conceptual (semantic) errors –
there is sometimes the tendency to focus on minute details when the design is
reviewed, missing the forest for the trees. The designer team should ensure
that major conceptual elements of the design have been addressed before
worrying about the syntax if the design model.
Design is not coding, coding is not design – Even when detailed designs are
created for program components, the level of abstraction of the design model
is higher than source code. The only design decisions made of the coding level
address the small implementation details that enable the procedural design to
be coded.
The design should be structured to accommodate change
The design should be assessed for quality as it is being created
With proper application of design principles, the design displays both external and
internal quality factors. External quality factors are those factors that can readily be
observed by the user, (e.g. speed, reliability, correctness, usability). Internal quality
factors have to do with technical quality more so the quality of the design itself. To
achieve internal quality factors the designer must understand basic design concepts.
48
3.12 Fundamental Software Design Concepts
Over the past four decades, a set of fundamental software design concepts has evolved,
each providing the software designer with a foundation from which more sophisticated
design methods can be applied. Each concept assists the soft ware engineer to answer the
following questions:
Are there uniform criteria that define the technical quality of a software
design?
49
4.0 Conclusion
Software life cycle models describe phases of the software cycle and the order in which
those phases are executed.
5.0 Summary
Software life cycle models describe phases of the software cycle and the order
in which those phases are executed. .
In general model, each phase produces deliverables required by the next phase
in the life cycle. Requirements are translated into design. Code is produced
during implementation that is driven by the design. Testing verifies the
deliverable of the implementation phase against requirements.
In a waterfall model, each phase must be completed in its entirety before the
next phase can begin. At the end of each phase, a review takes place to
determine if the project is on the right path and whether or not to continue or
discard the project. Unlike what I mentioned in the general model, phases do
not overlap in a waterfall model.
Just like the waterfall model, the V-Shaped life cycle is a sequential path of
execution of processes. Each phase must be completed before the next phase
begins. Testing is emphasized in this model more so than the waterfall model
though. The testing procedures are developed early in the life cycle before
any coding is done, during each of the phases preceding implementation.
The incremental model is an intuitive approach to the waterfall model.
Multiple development cycles take place here, making the life cycle a ―multi-
waterfall‖ cycle. Cycles are divided up into smaller, more easily managed
iterations. Each iteration passes through the requirements, design,
implementation and testing phases.
The spiral model is similar to the incremental model, with more emphases
placed on risk analysis. The spiral model has four phases: Planning, Risk
Analysis, Engineering and Evaluation. A software project repeatedly passes
through these phases in iterations (called Spirals in this model). The baseline
spirals, starting in the planning phase, requirements are gathered and risk is
assessed. Each subsequent spirals builds on the baseline spiral.
In requirement phase business requirements are gathered and that the phase is
the main focus of the project managers and stake holders.
The software system design is produced from the results of the requirements
phase and it is the phase is where the details on how the system will work is
produced
50