Software Engineering Chapter
Software Engineering Chapter
1
SOFTWARE PROCESS AND
AGILE DEVELOPMENT
INTRODUCTION
SOFTWARE CHARACTERISTICS
CATEGORIES OF SOFTWARE
SOFTWARE MYTHS
ATTRIBUTES OF GOOD SOFTWARE
CHALLENGES OF SOFTWARE ENGINEERING
LAYERED TECHNOLOGY
SOFTWARE PROCESS
INTRODUCTION TO AGILITY
AGILE PROCESS
EXTREME PROGRAMMING
XP PROCESS
1. 2 Software Engineering
(e.g.) Some failure software projects are British public accounts, space shuttle Columbia,
Ministry of agriculture in United Kingdom, Anane 5 launcher, Revenue service and so on.
Thus to develop a software product, the following criteria has to be satisfied :
• User needs and constraints must be determined and explicitly stated.
• The source code must be tested thoroughly.
• The product must satisfy the user needs.
• Supporting documents such as principles of operation, users guide,
installation procedures and maintenance documents must be prepared.
The software development is not merely the coding but systematically developing and
maintaining that software.
What is Software?
• Computer programs and associated documentation.
• Software products may be developed for a particular customer or may be developed
for a general market.
• Software products may be
Generic - developed to be sold to a range of different customers.
Bespoke (custom) - developed for a single customer according to their
specification.
Software Process and Agile Development 1. 3
The primary goal of software engineering is to improve the quality of software products
and to increase the productivity and job satisfaction of software engineers.
1.1.1 Software Characteristics
Software is a logical rather than a physical system element. The various software
characteristics are:-
1. Software is developed or engineered, it is not manufactured: Unlike hardware,
software is logical rather than physical. It has to be designed well before producing it.
In spite of availability of many automated software development tools, it is the skill
of the individual, creativity of the developers and proper management by the project
manager that counts for a good software product.
2. Software does not “wear out”: As time progresses, the hardware components start
deteriorating-they are subjected to environmental maladies such as dust, vibration,
temperature etc. and at some point of time they tend to breakdown. The defected
components can then be traced and replaced. But, software is not susceptible to the
environmental changes. So, it does not wear out. The software works exactly the
same way even after years it was first developed unless any charges are introduced to
it. The changes in the software may occur due to the changes in the requirements.
And these changes may introduce some defects in it thus, deteriorating the quality of
software, So, software need to maintained properly.
is highly interlinked with other modules. Further, it requires lot of skill to integrate
different modules into one. Now a days the term component is widely used in
software industry where object oriented system is in use.
Failure rate
“Infant
“Wear out”
Mortality”
Time
change
actual curve
idealized curve
Time
Fig. 1.2 Failure Curves for Software
• A general statement of objectives from the customer is all that is needed to begin a
software project. The reality is without constant communication between the
customer and the developers it is impossible to build a software product that meets
the customer’s real needs.
• Project requirements change continually and change is easy to accommodate in the
software design. The reality is that every change has far-reaching and unexpected
consequences. Changes to software requirements must be managed very carefully to
keep a software project on time and under budget.
• Once a program is written, the software engineer’s work is finished. The reality is
that maintaining a piece of software is never done, until the software product is
retired from service.
• There is no way to assess the quality of a piece of software until it is actually running
on some machine. The reality is that one of the most effective quality assurance
practices (formal technical reviews) can be applied to any software design product
and can serve as a quality filter very early in the product life cycle.
• The only deliverable from a successful software project is the working program. The
reality is the working program is only one of several deliverables that arise from a
well-managed software project. The documentation is also important since it provides
a basis for software support after delivery.
Software engineering is all about the creation of large and unnecessary documentation.
The reality is that software engineering is concerned with creating quality. This means doing
things right the first time and not having to create deliverables needed to complete or
maintain a software product. This practice usually leads to faster delivery times and shorter
development cycles.
TOOLS
methods
process
A quality focus
Software engineering methods provide the technical how-to’s for building software.
Methods encompass a broad array of tasks that include requirements analysis, design,
program construction, testing and maintenance.
1.2 SOFTWARE PROCESS
A Software Process is a set of activities and associated results which produces a software
product. These activities are mostly carried out by software engineers. There are four
fundamental process activities which are common to all software processes.
Software Process and Agile Development 1. 9
3. Software Validation:- The software must be validated to ensure that it does what the
customer wants.
4. Software Evolution:- The software must evolve to meet changing customer needs.
1.2.1 Generic Process Framework
The process model is chosen based on nature of software project and application and
then to obtain deliverable product method and tools are applied.
All software development can be characterized as a problem solving loop as shown
Fig. 1.5 in which four distinct stages are encountered:
Status quo represents the existing status.
Problem definition identifies the specific problem to be solved.
Technical development solves the identified problem with appropriate technology.
Solution integration which delivers the results
Problem
definition
Existing Technical
status development
Solution
integration
The problem solving loop is very difficult to implement in software development process
because we cannot strictly categorize the development in these phases. There may be a
requirement of cross talk within and across stages. Hence various software process models
are suggested depending upon nature of the software.
1.2.4 Need for Life Cycle Models
The primary goal of life cycle model is to develop a software in a systematic and
disciplined manner. When a program is developed by a single programmer, he has the
freedom to decide the exact steps through which he can develop the program. However, when
a software is developed by a team, it is necessary to have a good understanding among the
team members as to when to do what. Otherwise, it results in product failure. Usually in the
case of large projects, it is splitted into many modules and each module
Software Process and Agile Development 1. 13
is done by various team members. Finally all the modules are interfaced and checked for the
efficiency. Severe problem arise in interfacing the different parts and in managing the overall
development.
phase in the development process begins only if the previous phase is complete. In waterfall
model phases do not overlap.
Waterfall Model Design
Waterfall approach was first SDLC Model to be used widely in Software Engineering to
ensure success of the project. In “The Waterfall” approach, the whole process of software
development is divided into separate phases. In Waterfall model, typically, the outcome of
one phase acts as the input for the next phase sequentially.
Following Fig. 1.6 is a diagrammatic representation of different phases of waterfall
model.
❖ Integration and Testing: All the units developed in the implementation phase are
integrated into a system after testing of each unit. Post integration the entire system is
tested for any faults and failures.
❖ Deployment of system: Once the functional and non functional testing is done, the
product is deployed in the customer environment or released into the market.
❖ Maintenance: There are some issues which come up in the client environment. To fix
those issues patches are released. Also to enhance the product some better versions are
released. Maintenance is done to deliver these changes in the customer environment.
All these phases are cascaded to each other in which progress is seen as flowing steadily
downwards (like a waterfall) through the phases. The next phase is started only after the
defined set of goals are achieved for previous phase and it is signed off, so the name
“Waterfall Model”. In this model phases do not overlap.
Waterfall Model Application
Every software developed is different and requires a suitable SDLC approach to be
followed based on the internal and external factors. Some situations where the use of
Waterfall model is most appropriate are:
❖ Requirements are very well documented, clear and fixed.
❖ Product definition is stable.
❖ Technology is understood and is not dynamic.
❖ There are no ambiguous requirements.
❖ Ample resources with required expertise are available to support the product.
❖ The project is short.
Waterfall Model Pros and Cons
Advantage
The advantage of waterfall development is that it allows for departmentalization and
control. A schedule can be set with deadlines for each stage of development and a product
can proceed through the development process model phases one by one.
Development moves from concept, through design, implementation, testing, installation,
troubleshooting, and ends up at operation and maintenance. Each phase of development
proceeds in strict order.
Disadvantage
The disadvantage of waterfall development is that it does not allow for much reflection
or revision. Once an application is in the testing stage, it is very difficult to go back and
change something that was not well-documented or thought upon in the concept stage.
1. 16 Software Engineering
The following table lists out the pros and cons of Waterfall model:
Pros Cons
• Simple and easy to understand and use • No working software is produced until
late during the life cycle.
• Easy to manage due to the rigidity of the • High amounts of risk and uncertainty.
model . each phase has specific
deliverables and a review process.
• Phases are processed and completed • Not a good model for complex and
one at a time. object-oriented projects.
• Works well for smaller projects where • Poor model for long and ongoing
requirements are very well understood. projects.
• Clearly defined stages. • Not suitable for the projects where
requirements are at a moderate to high
risk of changing. So risk and uncertainty
is high with this process model.
• Process and results are well documented. • No working software is produced until
late in the life cycle.
1.3.2 V-Model
The V - model is SDLC model where execution of processes happens in a sequential
manner in V-shape. It is also known as Verification and Validation model.
Software Process and Agile Development 1. 17
development. System test plan is developed based on the system design. Doing this at
an earlier stage leaves more time for actual test execution later.
❖ Architectural Design: Architectural specifications are understood and designed in
this phase. Usually more than one technical approach is proposed and based on the
technical and financial feasibility the final decision is taken. System design is broken
down further into modules taking up different functionality. This is also referred to as
High Level Design (HLD).
The data transfer and communication between the internal modules and with the
outside world (other systems) is clearly understood and defined in this stage. With
this information, integration tests can be designed and documented during this stage.
❖ Module Design:In this phase the detailed internal design for all the system modules
is specified, referred to as Low Level Design (LLD). It is important that the design is
compatible with the other modules in the system architecture and the other external
systems. Unit tests are an essential part of any development process and helps
eliminate the maximum faults and errors at a very early stage. Unit tests can be
designed at this stage based on the internal module designs.
Coding Phase
The actual coding of the system modules designed in the design phase is taken up in the
Coding phase. The best suitable programming language is decided based on the system and
architectural requirements. The coding is performed based on the coding guidelines and
standards. The code goes through numerous code reviews and is optimized for best
performance before the final build is checked into the repository.
Validation Phases
Following are the Validation phases in V-Model:
❖ Unit Testing: Unit tests designed in the module design phase are executed on the code
during this validation phase. Unit testing is the testing at code level and helps eliminate
bugs at an early stage, though all defects cannot be uncovered by unit testing.
uncover the compatibility issues with the other systems available in the user
environment. It also discovers the non functional issues such as load and performance
defects in the actual user environment.
V- Model Application
V- Model application is almost same as waterfall model, as both the models are of sequential
type. Requirements have to be very clear before the project starts, because it is usually expensive
to go back and make changes. This model is used in the medical development field, as it is strictly
disciplined domain. Following are the suitable scenarios to use V-Model:
❖ Requirements are well defined, clearly documented and fixed.
❖ Product definition is stable.
❖ Technology is not dynamic and is well understood by the project team.
❖ There are no ambiguous or undefined requirements.
❖ The project is short.
V- Model Pros and Cons
The advantage of V-Model is that it.s very easy to understand and apply. The simplicity
of this model also makes it easier to manage. The disadvantage is that the model is not
flexible to changes and just in case there is a requirement change, which is very common in
today.s dynamic world, it becomes very expensive to make the change.
The following table lists out the pros and cons of V-Model:
Pros Cons
In incremental model the whole requirement is divided into various builds. During each
iteration, the development module goes through the requirements, design, implementation
and testing phases. Each subsequent release of the module adds function to the previous
release. The process continues till the complete system is ready as per the requirement.
The key to successful use of an iterative software development lifecycle is rigorous validation
of requirements, and verification & testing of each version of the software against those
requirements within each cycle of the model. As the software evolves through successive cycles,
tests have to be repeated and extended to verify each version of the software.
Like other SDLC models, Iterative and incremental development has some specific
applications in the software industry. This model is most often used in the following scenarios:
❖ A new technology is being used and is being learnt by the development team while
working on the project.
❖ Resources with needed skill set are not available and are planned to be used on
contract basis for specific iterations.
❖ There are some high risk features and goals which may change in the future.
The advantage of this model is that there is a working model of the system at a very early
stage of development which makes it easier to find functional or design flaws. Finding issues
at an early stage of development enables to take corrective measures in a limited budget.
The disadvantage with this SDLC model is that it is applicable only to large and bulky
software development projects. This is because it is hard to break a small software system
into further small serviceable increments/modules.
1. 22 Software Engineering
The following table lists out the pros and cons of Iterative and Incremental SDLC Model:
Pros Cons
• Some working functionality can be • More resources may be required.
developed quickly and early in the life
• Although cost of change is lesser but it
cycle.
is not very suitable for changing
• Results are obtained early and requirements.
periodically.
• More management attention is required.
• Parallel development can be planned.
• System architecture or design issues
• Progress can be measured. may arise because not all requirements
are gathered in the beginning of the
• Less costly to change the scope/ entire life cycle.
requirements.
• Defining increments may require
• Testing and debugging during smaller definition of the complete system.
iteration is easy.
• Not suitable for smaller projects.
• Risks are identified and resolved during
iteration; and each iteration is an easily • Management complexity is more.
managed milestone.
• End of project may not be known which
• Easier to manage risk - High risk part is is a risk.
done first.
• Highly skilled resources are required for
• With every increment operational product risk analysis.
is delivered.
• Projects progress is highly dependent
• Issues, challenges & risks identified from upon the risk analysis phase.
each increment can be utilized/applied to
the next increment.
• Risk analysis is better.
• It supports changing requirements.
• Initial Operating time is less.
The spiral model combines the idea of iterative development with the systematic,
controlled aspects of the waterfall model.
Spiral model is a combination of iterative development process model and sequential
linear development model i.e. waterfall model with very high emphasis on risk analysis.
It allows for incremental releases of the product, or incremental refinement through each
iteration around the spiral.
Spiral Model design
The spiral model has four phases. A software project repeatedly passes through these
phases in iterations called Spirals.
❖ Identification:This phase starts with gathering the business requirements in the baseline
spiral. In the subsequent spirals as the product matures, identification of system
requirements, subsystem requirements and unit requirements are all done in this phase.
Then in the subsequent spirals with higher clarity on requirements and design details
a working model of the software called build is produced with a version number.
These builds are sent to customer for feedback.
❖ Evaluation and Risk Analysis:Risk Analysis includes identifying, estimating, and
monitoring technical feasibility and management risks, such as schedule slippage and
cost overrun. After testing the build, at the end of first iteration, the customer
evaluates the software and provides feedback.
Following Fig. 1.9 is a diagrammatic representation of spiral model listing the activities
in each phase:
Based on the customer evaluation, software development process enters into the next
iteration and subsequently follows the linear approach to implement the feedback suggested
by the customer. The process of iterations along the spiral continues throughout the life of the
software.
Spiral Model Application
Spiral Model is very widely used in the software industry as it is in synch with the natural
development process of any product i.e. learning with maturity and also involves minimum risk
Software Process and Agile Development 1. 25
for the customer as well as the development firms. Following are the typical uses of Spiral
model:
❖ When costs there is a budget constraint and risk evaluation is important.
❖ For medium to high-risk projects.
❖ Long-term project commitment because of potential changes to economic priorities
as the requirements change with time.
❖ Customer is not sure of their requirements which is usually the case.
❖ Requirements are complex and need evaluation to get clarity.
❖ New product line which should be released in phases to get enough customer feedback.
❖ Significant changes are expected in the product during the development cycle.
Spiral Model Pros and Cons
The advantage of spiral lifecycle model is that it allows for elements of the product to be
added in when they become available or known. This assures that there is no conflict with
previous requirements and design.
This method is consistent with approaches that have multiple software builds and releases
and allows for making an orderly transition to a maintenance activity. Another positive aspect is
that the spiral model forces early user involvement in the system development effort.
On the other side, it takes very strict management to complete such products and there is
a risk of running the spiral in indefinite loop. So the discipline of change and the extent of
taking change requests is very important to develop and deploy the product successfully.
The following table lists out the pros and cons of Spiral SDLC Model:
Pros Cons
• Changing requirements can be • Management is more complex.
accommodated. • End of project may not be known early.
• Allows for extensive use of prototypes • Not suitable for small or low risk
• Requirements can be captured more projects and could be expensive for
accurately. small projects.
• Users see the system early. • Process is complex
• Development can be divided into smaller • Spiral may go indefinitely.
parts and more risky parts can be
• Large number of intermediate stages
developed earlier which helps better risk requires excessive documentation.
management.
1. 26 Software Engineering
The basic idea here is that instead of freezing the requirements before a design or coding
can proceed, a throwaway prototype is built to understand the requirements. This prototype is
developed based on the currently known requirements. Development of the
prototype obviously undergoes design, coding and testing. But each of these phases is not
done very formally or thoroughly. By using this prototype, the client can get an “actual feel”
of the system, since the interactions with prototype can enable the client to better
understand the requirements of the desired system.
Prototyping is an attractive idea for complicated and large systems for which there
is no manual process or existing system to help determining the requirements. In such situations
letting the client “plan” with the prototype provides invaluable and intangible inputs
which helps in determining the requirements for the system. It is also an effective method to
demonstrate the feasibility of a certain approach. This might be needed for novel systems
where it is not clear that constraints can be met or that algorithms can be developed to
implement the requirements. The process model of the prototyping approach is shown in the
Fig. 1.10 below.
Quick
Planning
Communication
Modeling
Quick Design
Deployment,
Delivery,
and Feedback
Construction
Of Prototype
In addition, the cost of testing and writing detailed documents are reduced. These factors
helps to reduce the cost of developing the prototype. On the other hand, the experience of
developing the prototype will very useful for developers when developing the final system.
This experience helps to reduce the cost of development of the final system and results in a
more reliable and better designed system.
Advantages of Prototyping
1. Users are actively involved in the development
2. It provides a better system to users, as users have natural tendency to change their
mind in specifying requirements and this method of developing systems supports this
user tendency.
3. Since in this methodology a working model of the system is provided, the users get a
better understanding of the system being developed.
4. Errors can be detected much earlier as the system is mode side by side.
5. Quicker user feedback is available leading to better solutions.
Disadvantages
1. Leads to implementing and then repairing way of building systems.
2. Practically, this methodology may increase the complexity of the system as scope of
the system may expand beyond original plans.
1.3.4.3 The Concurrent Development Model
The concurrent development model, sometimes called concurrent engineering, can be
represented schematically as a series of Framework activities, Software engineering actions
of tasks, and their associated states.
The concurrent model is often more appropriate for system engineering projects where
different engineering teams are involved.
Figure above provides a schematic representation of one Software engineering task
within the modeling activity for the concurrent process model. The activity – modeling-
may be in any one of the states noted at any given time.
All activities exist concurrently but reside in different states.
For example, early in the project the communication activity has completed its first
iteration and exists in the awaiting changes state. The modeling activity which existed in the
none state while initial communication was completed now makes a transition into
underdevelopment state.
If, however, the customer indicates the changes in requirements must be made, the
modeling activity moves from the under development state into the awaiting changes state.
1. 28 Software Engineering
The concurrent process model defines a series of events that will trigger transitions from
state to state for each of the Software engineering activities, actions, or tasks.
• Available component-based products are researched and evaluated for the application
domain in question.
• Component integration issues are considered.
• Software architecture is designed to accommodate the components.
• Components are integrated into the architecture.
• Comprehensive testing is conducted to ensure proper functionality.
The component-based development model leads to Software reuse, and reusability
provides Software engineers with a number of measurable benefits.
• Because few software developers have the necessary background to apply formal
methods, extensive training is required
Typical enterprise and internet applications today have to address “concerns” like security,
transactional behavior, logging, etc.. The subsystems that provide these services can be
implemented in a modular way. However, to use these services, you must insert the same
“boilerplate” code fragments into various places in the rest of the application to invoke these
services. This violates the “don’t repeat yourself” (DRY) principle and it compromises the
overall system modularity, because the same invocation code is scattered throughout the
application.
For example, if you want to control access to certain services in your application, you
could insert authorization-checking boilerplate at the beginning of every method that needs this
control. Because this redundant boilerplate appears in many places in the code, it would now be
difficult and error prone to modify or replace this security approach later, should that become
necessary. Also, your application code is now tangled with code for the security (and probably
other) concerns, which both compromises clarity and makes it hard to reuse your code in
another context, since you would have to drag along the same security approach, which may
not be appropriate.
Agile principles
• The highest priority of this process is to satisfy the customer.
• Acceptance of changing requirement even late in development.
• Frequently deliver a working software in small time span.
• Throughout the project business people and developers work together on
daily basis.
• Projects are created around motivated people if they are given the proper
environment and support.
• Face to face interaction is the most efficient method of moving information
in the development team.
Software Process and Agile Development 1. 31
1. Planning:
• The planning activity begins with the creation of a set of stories that describe required
features and functionality for software to be built.
• Each story is written by the customer and is placed on an index card. The customer
assigns a value to the story based on the overall business value of the feature of function.
1. 32 Software Engineering
• Members of the XP (Extreme Programming) team then assess each story and assign a
cost – measured in development weeks – to it.
• If the story will require more than three development weeks, the customer is asked to
split the story into smaller stories, and the assignment of value and cost occurs again.
• Customers and the XP team work together to decide how to group stories into the
next release to be developed by the XP team.
• Once a basic commitment is made for a release, the XP team orders the stories that
will be developed in one of three ways:
• As development work proceeds, the customer can add stories, change the value of an
existing story, split stories or eliminate them.
• The XP team then reconsiders all remaining releases and modifies its plan
accordingly.
2. Design :
• XP design follows the KIS (Keep It Simple) principle. A simple design is always
preferred over a more complex representation.
• The design provides implementation guidance for a story as it is written – nothing
less, nothing more.
• XP encourages the use of CRC (Class Responsibility Collaborator) cards as an
effective mechanism for thinking about the software is an object oriented context.
• CRC cards identify and organize the object oriented classes that are relevant to
current software increment.
• The CRC cards are the only design work product produced as a part of XP process.
• If a difficult design is encounter as a part of the design of a story, XP recommends the
immediate creation of that portion of the design called as ‘spike solution’.
• XP encourages refactoring – a construction technique.
3. Coding
• XP recommends that after stories are developed and preliminary design work is done, the
team should not move to cord, but rather develop a series of unit test that will be exercise
each stories.
• Once the unit test has been created, the developer better able to focus on what must be
implemented to pass the unit test.
• Once the code complete, it can be unit tested immediately, thereby providing
instantaneous feedback to the developer.
Software Process and Agile Development 1.33
• As pair programmers complete their work, the code they developed is integrated
with the work of others.
• This continuous integration strategy helps to avoid compatibility and interfacing
problems and provides a smoke testing environment that helps to uncover errors
early.
4.Testing :
• The creation of unit test before coding is the key element of the XP approach.
• The unit tests that are created should be implemented using a framework that enables
them to be automated. This encourages regression testing strategy whenever code is
modified.
• Individual unit tests are organize into a “Universal Testing Suit”, integration and
validation testing of the system can occur on daily basis. This provides the XP team with
a continual indication of progress and also can raise warning flags early if things are
going away.
• XP acceptance test, also called customer test, are specified by the customer and focus on
the overall system feature and functionality that are visible and reviewable by the
customer.
1. 54 Software Engineering
REVIEW QUESTIONS
PART - A
PART – B
1. Compare Waterfall Model and Spiral Model of software development. Give the
advantage and disadvantages of each.
2. Explain Prototype Model and Iterative Model in detail.
3. Explain Software Process Framework in detail.
4. What is the need for software life cycle model? Explain any two life cycle models in
detail.
5. Explain any two perspective process models in detail.
6. Explain the specialized process model in detail.
7. What is meant by UP? Explain the various phases of UP in detail.
8. Explain the Extreme Programming Process in detail.
9. Explain the XP Process model in detail.
10. Discuss about the Agility in detail.
11. Write short notes on Agile Process.