Software Engineering

advertisement
Software Engineering
INTRODUCTION TO SOFTWARE
ENGINEERING
1
Books
TEXT Books:
 Pressman R S, Software Engineering: A
Practitioners Approach, McGraw Hill.
 Datta S, Software Engineering: Concepts and
Applications, Oxford University Press, 2010.
INTRODUCTION TO SOFTWARE
ENGINEERING
2
UNIT-1
INTRODUCTION TO SOFTWARE
ENGINEERING
3
What is Software?
The product that software professionals build and then support
over the long term.
Software encompasses: (1) instructions (computer programs)
that when executed provide desired features, function, and
performance; (2) data structures that enable the programs to
adequately store and manipulate information and (3)
documentation that describes the operation and use of the
programs.
4
Software products

Generic products
◦ Stand-alone systems that are marketed and sold to any
customer who wishes to buy them.
◦ Examples – PC software such as editing, graphics
programs, project management tools; CAD software;
software for specific markets such as appointments
systems for dentists.

Customized products
◦ Software that is commissioned by a specific customer
to meet their own needs.
◦ Examples – embedded control systems, air traffic
control software, traffic monitoring systems.
5
Why Software is Important?




The economies of ALL developed nations are
dependent on software.
More and more systems are software controlled
( transportation, medical, telecommunications,
military, industrial, entertainment,)
Software engineering is concerned with
theories, methods and tools for professional
software development.
Expenditure on software represents a
significant fraction of GNP in all developed
countries.
Software costs
Software costs often dominate computer
system costs. The costs of software on a PC
are often greater than the hardware cost.
 Software costs more to maintain than it does
to develop. For systems with a long life,
maintenance costs may be several times
development costs.
 Software engineering is concerned with costeffective software development.

Features of Software?
Its characteristics that make it different from other things human being
build.
Features of such logical system:
 Software is developed or engineered, it is not manufactured in the
classical sense which has quality problem.

Software doesn't "wear out. ” but it deteriorates (due to change).
Hardware has bathtub curve of failure rate ( high failure rate in the beginning,
then drop to steady state, then cumulative effects of dust, vibration, abuse occurs).

Although the industry is moving toward component-based
construction (e.g. standard screws and off-the-shelf integrated
circuits), most software continues to be custom-built. Modern
reusable components encapsulate data and processing into software
parts to be reused by different programs. E.g. graphical user interface,
window, pull-down menus in library etc.
8
Wear vs. Deterioration
9
Software Applications
1. System software: such as compilers, editors, file management
utilities
2. Application software: stand-alone programs for specific needs.
3. Engineering/scientific software: Characterized by “ number
crunching”algorithms. such as automotive stress analysis, molecular
biology, orbital dynamics etc CAD, simulation
4. Embedded software resides within a product or system. (key pad
control of a microwave oven, digital function of dashboard display in
a car)
5. Product-line software focus on a limited marketplace to address
mass consumer market. (word processing, multimedia, graphics,
database management)
6. WebApps (Web applications) network centric software. As web 2.0
emerges, more sophisticated computing environments is supported
integrated with remote database and business applications.
7. AI software uses non-numerical algorithm to solve complex problem.
Robotics, expert system, pattern recognition game playing.
10
Software Engineering Definition
The seminal definition:
[Software engineering is] the establishment and use of
sound engineering principles in order to obtain
economically software that is reliable and works
efficiently on real machines.
The IEEE definition:
Software Engineering: (1) The application of
disciplined, quantifiable approach to the
operation, and maintenance of software;
application of engineering to software. (2)
approaches as in (1).
a systematic,
development,
that is, the
The study of
Importance of Software Engineering
More and more, individuals and society rely on
advanced software systems. We need to be able to
produce reliable and trustworthy systems
economically and quickly.
 It is usually cheaper, in the long run, to use
software engineering methods and techniques for
software systems rather than just write the
programs as if it was a personal programming
project. For most types of system, the majority of
costs are the costs of changing the software after
it has gone into use.

12
FAQ about software engineering
Question
Answer
What is software?
Computer programs, data structures and
associated documentation. Software products
may be developed for a particular customer or
may be developed for a general market.
What are the attributes of good Good software should deliver the required
software?
functionality and performance to the user and
should be maintainable, dependable and usable.
What is software engineering?
Software engineering is an engineering discipline
that is concerned with all aspects of software
production.
What is the difference between Computer science focuses on theory and
software engineering and computer fundamentals; software engineering is concerned
science?
with the practicalities of developing and delivering
useful software.
What is the difference between System engineering is concerned with all aspects
software engineering and system of
computer-based
systems
development
engineering?
including hardware, software and process
engineering. Software engineering is part of this
more general process.
13
Essential attributes of good software
Product characteristic
Description
Maintainability
Software should be written in such a way so that it can evolve to
meet the changing needs of customers. This is a critical attribute
because software change is an inevitable requirement of a
changing business environment.
Dependability and
security
Software dependability includes a range of characteristics
including reliability, security and safety. Dependable software
should not cause physical or economic damage in the event of
system failure. Malicious users should not be able to access or
damage the system.
Efficiency
Software should not make wasteful use of system resources such
as memory and processor cycles. Efficiency therefore includes
responsiveness, processing time, memory utilisation, etc.
Acceptability
Software must be acceptable to the type of users for which it is
designed. This means that it must be understandable, usable and
compatible with other systems that they use.
14
Software Engineering
A Layered Technology
tools
methods
process model
a “quality” focus




Any engineering approach must rest on organizational commitment to quality which fosters a
continuous process improvement culture.
Process layer as the foundation defines a framework with activities for effective delivery of
software engineering technology. Establish the context where products (model, data, report
and forms) are produced, milestone are established, quality is ensured and change is
managed.
Method provides technical how-to’s for building software. It encompasses many tasks
including communication, requirement analysis, design modeling, program construction
testing and support.
Tools provide automated or semi-automated support for the process and methods.
15
Software Process



A process is a collection of activities, actions and tasks
that are performed when some work product is to be
created. It is not a rigid prescription for how to build
computer software. Rather, it is an adaptable approach
that enables the people doing the work to pick and
choose the appropriate set of work actions and tasks.
Purpose of process is to deliver software in a timely
manner and with sufficient quality to satisfy those who
have sponsored its creation and those who will use it.
16
Five Activities of a Generic Process
framework

Communication: communicate with customer to understand objectives
and gather requirements

Planning: creates a “map” defines the work by describing the tasks, risks
and resources, work products and work schedule
.
Modeling: Create a “sketch”, what it looks like architecturally, how the
constituent parts fit together and other characteristics.




Construction: code generation and the testing.
Deployment: Delivered to the customer who evaluates the products and
provides feedback based on the evaluation.

These five framework activities can be used to all software development
regardless of the application domain, size of the project, complexity of the
efforts etc, though the details will be different in each case.

For many software projects, these framework activities are applied
iteratively as a project progresses. Each iteration produces a software
increment that provides a subset of overall software features and
functionality.
17
Umbrella Activities
Complement the five process framework activities and help team
manage and control progress, quality, change, and risk.
 Software project tracking and control: assess progress against the plan
and take actions to maintain the schedule.
 Risk management: assesses risks that may affect the outcome and
quality.
 Software quality assurance: defines and conduct activities to ensure
quality.
 Technical reviews: assesses work products to uncover and remove
errors before going to the next activity.
 Measurement: define and collects process, project, and product
measures to ensure stakeholder’s needs are met.
 Software configuration management: manage the effects of change
throughout the software process.
 Reusability management: defines criteria for work product reuse and
establishes mechanism to achieve reusable components.
 Work product preparation and production: create work products such
as models, documents, logs, forms and lists.
18
Software Myths
Erroneous beliefs about software and the process
that is used to build it.
Affect managers, customers (and other nontechnical stakeholders) and practitioners
Are believable because they often have elements
of truth,
but …
Invariably lead to bad decisions,
therefore …
Insist on reality as you navigate your way through
software engineering
19
Software
A set of machine-readable instructions
(programs) that directs a
computer's processor to perform specific
operations.
OR
A collection of instructions that enable a
user to interact with the computer or
have the computer perform specific tasks
for them.
INTRODUCTION TO SOFTWARE
ENGINEERING
20
Characteristics of Software

It is soft or intangible part of the computer
system.

Software deteriorates. So, Software is
constantly subject to change (alterations are
required with respect to time).

Software is not manufactured but developed
and customized.
INTRODUCTION TO SOFTWARE
ENGINEERING
21
Characteristics of Software
(cont..)

Software is costly to maintain.

Software is inherently Complex.
(Complex  complicated
Complex = composed of many simple parts
related to one another.
Complicated = not well understood, or explained)
INTRODUCTION TO SOFTWARE
ENGINEERING
22
Software Component
A software component is a modular
building block for computer software
◦ It is a modular, deployable, and
replaceable part of a system that
encapsulates implementation.
A
component communicates and
collaborates with
◦ Other components
◦ Entities outside the boundaries of the
system

INTRODUCTION TO SOFTWARE
ENGINEERING
23
Software Engineering

Software engineering is an engineering
discipline which is concerned with all
aspects of software production.

It is a process of solving customer’s
problem by the systematic development
and evolution of large, high quality
software systems within cost, time and
other constraints.
INTRODUCTION TO SOFTWARE
ENGINEERING
24
Evolution of Software
Engineering
Programming to Software Engineering
 Hardware- Software: From Coupling to
Congress
 Advent of High-Level languages
 Advent of the Personal computer
 Global Software Development
 Return of Open Source

INTRODUCTION TO SOFTWARE
ENGINEERING
25
Programming to Software
Engineering
Programming plays a significant role in
software development.
 This produces predictable results or
spectacular results at times. Programming
is more about creativity, about the
elegance and beauty of algorithms.
 From a pre-eminently central position,
programming has moved to be one of the
concerns for the software developer.

INTRODUCTION TO SOFTWARE
ENGINEERING
26
Repositioning of Programming in
the Software Development
Universe
INTRODUCTION TO SOFTWARE
ENGINEERING
27
Hardware-Software: From Coupling
to Congress
Earlier Software came with hardware; almost no
one sold or brought software by itself.
 Compare that with the present; probably the
operating system is the only piece of Software
now that comes with the hardware we buy.
 Every other application software is acquired and
installed separately , often downloaded from web
for free.
Coupling between hardware and software has
now loosened.

INTRODUCTION TO SOFTWARE
ENGINEERING
28
Advent of High-Level languages
What has changed over the past few
decades is how we communicate with
computer.
 What has brought about this change is the
vehicle of communication that is LANGUAGE.
 One of the main objectives of any language
is to support levels of abstraction in
communication.

INTRODUCTION TO SOFTWARE
ENGINEERING
29

High-level abstractions usually hide more
details and make it easier for the human
mind to broadly grasp an idea.

High-level programming languages let
one be a programmer without being able
to communicate in machine or assemble
language
INTRODUCTION TO SOFTWARE
ENGINEERING
30
Advent of Personal Computer
In the 1950s and 60s, a computer was a
considerably piece of equipment in price
and size. Academic departments or large
corporations owned them; it was really
unthinkable for individual users to have
their own computers
 But now a days, it is estimated that more
than one billion PCs are in use in the
world now.

INTRODUCTION TO SOFTWARE
ENGINEERING
31
Global Software Development



As the web’s presence increased throughout
the 1990s and then into the new
millennium, software engineering became a
truly global enterprise.
Global software development has deep
economic as well as social implications.
Global software development has put
demands of cultural sensitivity, professional
flexibility and political awareness on the
new breed of the global software engineer.
INTRODUCTION TO SOFTWARE
ENGINEERING
32
Open Source
Open source is about sharing the source code of
software developed by a particular group or
individual for free, so that others can use.
 Open source was nothing special in the initial era
of computing.
 Companies sold hardware, and the software with
it for free.
 When software become a commercial
commodity in its own right, large corporations
made every effort for the free flow of code.

INTRODUCTION TO SOFTWARE
ENGINEERING
33
Challenges in Software Engineering
Heterogeneity, Delivery and Trust



Heterogeneity
◦ Developing techniques for building software that can cope with
heterogeneous platforms and execution environments;
Delivery
◦ Developing techniques that lead to faster delivery of software;
Trust
◦ Developing techniques that demonstrate that software can be
trusted by its users.

Budgets and costs

Maintaining quality
Software Development
Methodologies/
Software Development
Life Cycle Models
INTRODUCTION TO SOFTWARE
ENGINEERING
35

The need for a software life cycle
model
The development team must identify a suitable life cycle model for the particular
project and then adhere to it. Without using of a particular life cycle model the
development of a software product would not be in a systematic and disciplined
manner. When a software product is being developed by a team there must be a
clear understanding among team members about when and what to do. Otherwise it
would lead to chaos and project failure.

This problem can be illustrated by using an example. Suppose a software
development problem is divided into several parts and the parts are assigned to the
team members. From then on, suppose the team members are allowed the freedom
to develop the parts assigned to them in whatever way they like. It is possible that
one member might start writing the code for his part, another might decide to
prepare the test documents first, and some other engineer might begin with the
design phase of the parts assigned to him. This would be one of the perfect recipes
for project failure.

A software life cycle model defines entry and exit criteria for every phase. A phase
can start only if its phase-entry criteria have been satisfied. So without software life
cycle model the entry and exit criteria for a phase cannot be recognized. Without
software life cycle models (such as classical waterfall model, iterative waterfall
model, prototyping model, evolutionary model, spiral model etc.) it becomes
difficult for software project managers to monitorINTRODUCTION
the progressTO
of SOFTWARE
the project.
ENGINEERING
36
SOFTWARE DEVELOPMENT
LIFE CYCLE MODELS
•A SDLC
model covers the entire lifetime of a product.
•From
birth of a commercial idea to final installation of last
release.
•A
SDLC model is a descriptive and diagrammatic
representation of the software life cycle.
•Represents
all the activities required to make a software
product transit through its life cycle phases.
•It
also captures the order in which these activities are to be
undertaken.
INTRODUCTION TO SOFTWARE
ENGINEERING
37
Software development
methodologies:
Water fall
 Prototyping
 Spiral Development
 Iterative & Incremental Development
 Agile Development.

INTRODUCTION TO SOFTWARE
ENGINEERING
38
Waterfall Model

Provides a systematic approach to software
development.

The process of software development is represented by
a sequence of steps.

The sequential phases are what make this model linear,
simple and systematic in nature.

Each phase must be completed before you can move to
next phase.

This model is also known as the linear sequential model
or classical life cycle .
INTRODUCTION TO SOFTWARE
ENGINEERING
39
Waterfall Model
INTRODUCTION TO SOFTWARE
ENGINEERING
40
INTRODUCTION TO SOFTWARE
ENGINEERING
41
Phases of Waterfall Model
Software requirement analysis:
In this Phase , the requirements for the software are
established through discussion with client and are then
documented.

Constraints are identified.

Requirements are analyzed.

Finally, a requirement specification document is created
which serves the purpose of guideline for the next phase of
the model.

INTRODUCTION TO SOFTWARE
ENGINEERING
42
Designing:
 If the first phase gets successfully completed and a
well thought out plan for the software development
has been laid then the next step involves
formulating the basic design of the software on
paper

After the basic design gets approved, then a more
elaborated technical design can be planned. Here the
functions of each of the part are decided.
INTRODUCTION TO SOFTWARE
ENGINEERING
43
System Design:

The system has to be properly designed before any
implementation is started.

This involves an architectural design which defines and
describes the main blocks and components of the system,
their interfaces and interactions.

Hardware and Software components are identified

E.g. this involves the definition or selection of a computer
platform, an operating system, other peripheral hardware, etc.
The software components have to be defined to meet the end
user requirements and to meet the need of possible scalability
of
the
system.
INTRODUCTION TO SOFTWARE
ENGINEERING
44
Software Design:

Based on the system architecture which defines the
main software blocks the software design will break
them further down into code modules.

All necessary system states like startup, shutdown,
error conditions and diagnostic modes have to be
considered and the activity and behaviour of the
software has to be defined.

The output of this phase is a Software Design
Document which is the base of the following
implementation work.
INTRODUCTION TO SOFTWARE
ENGINEERING
45
Implementation(Coding):
In this phase the actual coding of the software is done. The
design of the previous phase is converted into the code.
Testing:


In this phase, the output generated is checked to ensure
that it matches the requirements.
The programs developed in the previous phase are
checked for the logical and syntax errors.
INTRODUCTION TO SOFTWARE
ENGINEERING
46
Maintenance and Support:

The software developed needs
maintenance and support.
 To ensure that the system will continue to
perform as desired
 This refers to the changes as well as new
requirements in the software after
delivery.
INTRODUCTION TO SOFTWARE
ENGINEERING
47
Advantages of Waterfall Model
The Linear Sequential model offers the following
advantages:
 It is easy to understand and implement.
 It prohibits skipping any phase in the sequence.
 As everything is documented a new team member can
easily understand what's to be done.
 It is ideal for small projects and the requirements
and goals of the project are well established in
advance.
INTRODUCTION TO SOFTWARE
ENGINEERING
48
Disadvantages of Waterfall Model
The following are the disadvantages using Linear sequential
model:
 If requirements change the Waterfall model may not work.
 Difficult to estimate time and cost for each stage of the
development process.
 The working version of the software is available to the
customer after testing. Therefore, if there is any major error
it will remain till end of the testing.
 Due to linear nature if any phase is not completed , the
software analyst and developers cannot proceed further.
INTRODUCTION TO SOFTWARE
ENGINEERING
49

we can take real life examples for water fall model
like automobile companies make cars and bikes. when
they are building a car, the requirements are fixed,
pre-decided. there will be no change in the
requirements during the process of building a car.
Once we complete a stage, we proceed to the next
one. if there is any change in requirements come then
we have to go back and make those changes. then we
have to change our complete system that requires
extra time and extra money. this is a major
disadvantage
of
water
fall
model.
Material resource planning in a manufacturing unit.

We go for waterfall model if the requirement of a
problem are reasonably well understood for ex In
existing employ payroll system ,if the payroll
computing mechanism has to be changed we go for
waterfall model
INTRODUCTION TO SOFTWARE
ENGINEERING
50
Prototyping Model





In this model the developer and client interact to establish the
requirements of the software.
This is follow up by the quick design, in which the visible
elements of the software, the input and the output are
designed..
The final product of the design is a prototype.
The client then evaluates the prototype and provides its
recommendations and suggestion to the analyst.
The process continues in an iterative manner until all the user
requirements are met.
INTRODUCTION TO SOFTWARE
ENGINEERING
51
Need for a prototype in software
development
This is a valuable mechanism for gaining
better understanding of the customer’s
needs:

How the screens might look like

How the user interface would behave

How the system would produce outputs
INTRODUCTION TO SOFTWARE
ENGINEERING
52
Phases of Prototyping Model
INTRODUCTION TO SOFTWARE
ENGINEERING
53
Advantages of Prototyping Model
The following are the advantages of Prototyping model:
Due the interaction between the client and developer right
from the beginning , the objectives and requirements of the
software is well established.
 Suitable for the projects when client has not clear idea about
his requirements.
 The client can provide its input during development of the
prototype.
 The prototype serves as an aid for the development of the
final product.

INTRODUCTION TO SOFTWARE
ENGINEERING
54
Disadvantages of Prototyping Model
The prototyping model has the following
disadvantages.
 The quality of the software development is
compromised in the rush to present a working
version of the software to the client.

The client look at the working version of the
product at the outset and expect the final version of
the product to be deliver immediately. This cause
additional pressure over the developers to adopt
shortcut in order to meet the final product deadline.
INTRODUCTION TO SOFTWARE
ENGINEERING
55
Iterative & Incremental
Development Model

This is a combination
method and incremental
development.
of both iterative
build model for

Iteration refers to the cyclic nature of a process in
which activities are repeated in a structured
manner. And increment refers to the quantifiable
outcome of each iteration.

The basic idea behind this method is to develop a
system through repeated cycles (lterative) and in
smaller portions (increment).
INTRODUCTION TO SOFTWARE
ENGINEERING
56
Iterative & Incremental
Development Model(cont..)
Each iteration consists of all of the standard
Waterfall phases.
 At each iteration, design modifications are made
and new functional capabilities are added.
OR

Incremental development slices the system
functionality into increments (portions) by
prioritizing requirements. And, deliver a slice of
functionality in each increment.

INTRODUCTION TO SOFTWARE
ENGINEERING
57
Iterative & Incremental Development
Model(cont..)
•
In this model, the product is designed,
implemented, integrated and tested as a series of
incremental builds.
•
Two key things: iterative refinement, where the
process improves what already exists and is being
done, and incremental development, where the
process results in progress towards project
objectives.
INTRODUCTION TO SOFTWARE
ENGINEERING
58
Incremental Model (INM)
1-1
1-2
1-3
Final System
1-4
Basic process
Req.
Analysis
S/w Solution
Design
Coding
Coding
Test
Next
Increment
INTRODUCTION TO SOFTWARE
ENGINEERING
59
INTRODUCTION TO SOFTWARE
ENGINEERING
60
Iterative and Incremental Model
Strengths







Develop high-risk or major functions first
Each release delivers an operational product
Customer can respond to each build
Uses “divide and conquer” breakdown of tasks
Initial product delivery is faster
Customers get important functionality early
Risk of effect of changing requirements is
reduced
INTRODUCTION TO SOFTWARE
ENGINEERING
61
Iterative and Incremental Model
Weaknesses

Proper planning and designing is required.

Requires early definition of a complete and
fully functional system to allow for the
definition of increments

Total cost of the complete system is higher
than waterfall.

Not suitable for smaller projects
INTRODUCTION TO SOFTWARE
ENGINEERING
62
Spiral model
INTRODUCTION TO SOFTWARE
ENGINEERING
63

Each loop in a spiral represents a development phase (and
we can have any number of loops according to the project).
Each loop has four sections or quadrants :
1. To determine the objectives, alternatives and constraints.
2. Risk analysis and evaluation of alternatives.
3. Execution of that phase of development.
4. Planning the next phase.
INTRODUCTION TO SOFTWARE
ENGINEERING
64

First quadrant (Objective Setting)
◦ We try to understand the product objectives, alternatives in
design and constraints imposed because of cost, technology,
schedule, etc.

Second Quadrant (Risk Assessment and Reduction)
o
A detailed analysis is carried out for each
identified project risk.
o We try to find which other approaches can be
implemented in order to fulfil the identified
constraints. Risk mitigation is in focus in this phase
INTRODUCTION TO SOFTWARE
ENGINEERING
65

Third Quadrant (Development and Validation)
o
In this phase we develop the planned product. Testing
is also done. In order to do development, waterfall
approach can be implemented.
Fourth Quadrant (Review and Planning)
◦ Review the results achieved so far with the customer
and plan the next iteration around the spiral.
◦ Progressively more complete version of the software
gets built with each iteration around the spiral.
INTRODUCTION TO SOFTWARE
ENGINEERING
66
Why spiral model is called meta model?

Spiral model is also called as meta-model because in a way it
comprises of other models of SDLC.

Here we do software development systematically over the
loops (adhering to waterfall approach) and at the same time
we may make a prototype and show it to user after
completion of various phase (just in case of prototype model).

This way we are able to reduce risks as well as follow
systematic
approach.
INTRODUCTION TO SOFTWARE
ENGINEERING
67
Advantages of Spiral Model
1) Spiral Life Cycle Model is one of the most flexible SDLC models
in place.
2) Project monitoring is very easy and effective. Each phase, as
well as each loop, requires a review from concerned people. This
makes the model more transparent.
3) Risk management is one of the in-built features of the model,
which makes it extra attractive compared to other models.
4) Changes can be introduced later in the life cycle as well.
5) Project estimates in terms of schedule, cost etc become more and
more realistic.
6) It is suitable for projects where business needs may be unstable.
7)
A highly customized product can be developed using this.
INTRODUCTION TO SOFTWARE
ENGINEERING
68
Disadvantages of Spiral Model
1) Cost involved in this model is usually
high.
2) Skills required, to evaluate and review
project from time to time, need expertise.
3)
Management
is
Complex
4) It is not suitable for low risk projects.
5) Amount of documentation required in
intermediate stages makes management of
project very complex affair.
INTRODUCTION TO SOFTWARE
ENGINEERING
69
Download