SE - Unit - 1
SE - Unit - 1
UNIT – I
INTRODUCTION TO SOFTWARE
ENGINEERING
Today, software takes on a dual role. It is a product and, at the same time, the
vehicle for delivering a product.
As a product, it delivers the computing potential embodied by computer
hardware or, more broadly, a network of computers that are accessible by local
hardware.
Whether it resides within a cellular phone or operates inside a mainframe
computer, software is an information transformer—producing, managing, acquiring,
modifying, displaying, or transmitting information that can be as simple as a single bit
or as complex as a multimedia presentation.
As the vehicle used to deliver the product, software acts as the basis for the
control of the computer (operating systems), the communication of information
(networks), and the creation and control of other programs (software tools and
environments).
Software delivers the most important product of our time—information.
Software transforms personal data (e.g., an individual’s financial transactions) so that
the data can be more useful in a local context; it manages business information to
enhance competitiveness; it provides a gateway to worldwide information networks
(e.g., Internet) and provides the means for acquiring information in all of its forms.
1. As a product –
SOFTWARE
Software
Software is
(1) instructions (computer programs) that when executed provide desired
function and performance,
(2) data structures that enable the programs to adequately manipulate
information, and++
(3) documents that describe the operation and use of the programs.
Software Characteristics
To gain an understanding of software (and ultimately an understanding of
software engineering), it is important to examine the characteristics of software that
make it different from other things that human beings build.
Software is a logical rather than a physical system element.
Therefore, software has characteristics that are considerably different than those
of hardware:
❖ Functionality.
❖ Usability (User-friendly)
❖ Efficiency.
❖ Flexibility.
❖ Reliability.
❖ Maintainability.
❖ Portability.
❖ Integrity.
Functionality
The functionality of software refers to its ability to perform and function
according to design specification.
In simple terms, software systems should function correctly, i.e. perform all the
functions for which they are designed.
The functions refer to the features that the end user as well as the business
expect as basic facilities from the system.
All these functions must be integrated into the system. Many software
applications out there are designed for simplicity, but ultimately, the purpose of
software is to provide its users with the desired functionality.
In order to look like the best software product, it must have a clear appearance,
components, and functions. However, there are also those products out there that can
provide a great deal of value for your money.
Usability (User-friendly)
The user-friendliness of the software is characterized by its ease of use. In other
words, learning how to use the software should require less effort or time.
Navigating the software is extremely important since it helps determine the
journey the user takes within the software.
This is imperative to ensuring visitors remain on your website and have a
positive experience, which leads to an increase in sales and brand loyalty.
Efficiency
Essentially, it refers to the software’s ability to utilize human and system
resources such as time, effort, CPU, memory, computation power, network bandwidth,
files, databases, etc., as effectively and efficiently as possible.
For a software project to succeed, efficiency is crucial. In addition to meeting
the needs for which the software was made, it must also provide excellent features
designed to assist users in completing their tasks faster.
Software should make efficient use of storage space and execute commands
according to timing requirements.
Flexibility
Software Flexibility refers to the ability of the software solution to adapt to
potential or future changes in its requirements.
When evaluating the flexibility of software, look at how simple it is to add,
modify, or remove features without interfering with the current operation.
It is essential to keep up with rapidly changing markets, technologies, and
customer needs. In software development, change is inevitable; it can arise during the
development process itself or as the result of future requirements.
Flexibility is therefore highly valued. Consequently, any software product must
be scalable, flexible, and easily adaptable to future technology.
When designing or building a software product, be sure to plan for these
changes that are inevitably going to occur.
Loose coupling of components is the key to creating highly flexible systems.
Reliability
The reliability of a software product describes the likelihood it will operate
without failure over a specified period of time under certain conditions.
It determines the ability of software to maintain its level of performance
(provide desired functionality) under specified conditions for a specified period of
time. Generally speaking, software reliability is measured as the availability of the
software.
The value should not be less than 99%. In reliability testing, the goal is not
perfection, but achieving a level of reliability that is acceptable before a software
product is released to customers.
MTTF, MTTR, MTBR, etc., are some reliability metrics that can be used to
quantify the reliability of a software product.
Maintainability
Maintainability refers to how easily you can repair, improve and comprehend
software code.
In some ways, maintaining is similar to being flexible. Maintainability deals
with the modification of errors and minor alterations to software code, while
flexibility focuses on major functional extensions. It also involves maintaining the
services and functionality of the software.
Most of the time, developers are not the ones who maintain the software.
Therefore, good documentation is crucial, which includes code documentation,
interface definitions, etc.
Maintainability of software products is affected by the quality of the
documentation.
Typically, more than half of development budgets are spent on software
maintenance.
Maintenance should therefore be integrated into the development lifecycle for
effective software maintenance.
Portability
Software portability is a critical factor that cannot be ignored. Portability refers
to the ability to use software in different environments.
This is the ease with which software can be ported from one platform to
another without (or with minimal) changes, while obtaining similar results.
As simple as it may sound, it refers to the ability of software to work on
different hardware platforms without any (or little) modifications needed.
Furthermore, you should be aware that porting software to a new environment
is comparatively cheaper than developing an equivalent application from scratch.
There can be no doubt that portability is a crucial aspect of reducing
development costs.
Integrity
There are multiple interpretations of software integrity. Some people tend to
associate integrity with security, believing it is resistant to hacks and privacy
violations.
To others, high integrity means that the software cannot be modified without
authorization.
Integrity is key for demonstrating the safety, security, and maintainability of
your software.
In addition, software that needs to be compliant with industry regulations and
coding standards requires high code integrity.
Achieving software integrity can be difficult. Yet, with the right practices to
improve safety, security, and maintainability, the challenge can be easily overcome.
In these days of increased security threats, all software must include this factor.
LEGACY SOFTWARE
SOFTWARE MYTHS
Software myths – beliefs about software and the process used to build – can be
traced to the earliest days of computing.
Myths have number of attributes that have made them insidious.
Management myths
• Myth: If we get behind schedule, we can add more programmers and catch up
(sometimes called the Mongolian horde concept).
Reality: Software development is not a mechanistic process like manufacturing. As
new people are added, people who were working must spend time educating the
newcomers, thereby reducing the amount of time spent on productive development
effort. People can be added but only in a planned and well-coordinated manner.
• Myth: If I decide to outsource3 the software project to a third party, I can just relax
and let that firm build it.
Reality: If an organization does not understand how to manage and control software
projects internally, it will invariably struggle when it outsources software projects.
Customer myths
Customer myths lead to false expectations (by the customer) and ultimately,
dissatisfaction with the developer. Following are the customer myths:
• Myth: A general statement of objectives is sufficient to begin writing programs-we
can fill in the details later.
Reality: A poor up-front definition is the major cause of failed software efforts. A
formal and detailed description of the functions, behavior, performance, interfaces,
design constraints, and validation criteria is essential.
• Myth: Project requirements continually change, but change can be easily
accommodated because software is flexible.
Reality: It is true that software requirements change, but the impact of change varies
with the time at which it is introduced. When changes are requested during software
design, the cost impact grows rapidly. Resources have been committed and a design
framework has been established. Change can cause heavy additional costs. Change,
when requested after software is in production, can be much more expensive than the
same change requested earlier.
Practitioner’s myths
Practitioners have following myths:
• Myth: Once we write the program and get it to work, our job is done.
Reality: Industry data indicate that between 60 and 80 percent of all effort expended
on software will be expended after it is delivered to the customer for the first time.
• Myth: Until I get the program “running” I have no way of assessing its quality.
Reality: One of the most effective software quality assurance mechanisms can be
applied from the inception of a project—the formal technical review.
• Myth: The only deliverable work product for a successful project is the working
program.
Reality: A working program is only one part of a software configuration that includes
many elements. Documentation provides a foundation for successful engineering
and, more important, guidance for software support.
• Myth: Software engineering will make us create voluminous and unnecessary
documentation and will invariably slow us down.
Reality: Software engineering is not about creating documents. It is about creating
quality. Better quality leads to reduced rework. And reduced rework results in
faster delivery times.
Many software professionals recognize the fallacy of the myths just described.
Regrettably, habitual attitudes and methods foster poor management and technical
practices, even when reality dictates a better approach. Recognition of software
realities is the first step toward formulation of practical solutions for software
engineering.
SOFTWARE ENGINEERING PRACTICE
CORE PRINCIPLES
The dictionary defines the word principle as “an important underlying law or
assumption required in a system of thought.”
Throughout this book we discuss principles at many different levels of
abstraction. Some focus on software engineering as a whole, others consider a specific
generic framework activity (e.g., customer communication), and still others focus on
software engineering actions (e.g., architectural design) or technical tasks (e.g., write a
usage scenario).
Regardless of their level of focus, principles help us establish a mind set for
software engineering practice. They are important for that reason.
David Hooker has proposed seven core principles that focus on software engineering
practice as a whole. They are reproduced below.
Principle #8: (a) Once you agree to something, move on; (b) If you can’t agree to
something, move on; (c) If a feature or function is unclear and cannot be clarified
at the moment move on.
Communication, like any software engineering activity, takes time. Rather than
iterating endlessly, the people who participate should recognize that many topics
require discussion (see principle #2) and that “moving on” is sometimes the best way
to achieve communication agility.
Principle #9: Negotiation is not a contest or a game. It works best when both
parties win.
There are many instances in which the software engineer and the customer
must negotiate functions and features, priorities, and delivery dates.
If the team has collaborated well, all parties have a common goal.
Therefore, negotiation will demand compromise from all parties.
PLANNING PRACTICES
The communication activity helps a software team to define its overall goals
and objectives (subject, of course, to change as time passes).
However, understanding these goals and objectives is not the same as defining
a plan for getting there.
The planning activity encompasses a set of management and technical practices
that enable the software tam to define a road map as it travels towards its strategic
goal and technical objectives.
Dwight D. Eisenhower: “In preparing for battle I have always found that plants are
useless, but planning is indispensable.”
There are many different planning philosophies. Some people are “minimalists,
“arguing that change often obviates the need for a detailed plan.
Others are “traditionalists,” arguing that the plan provides an effective road
map, and the more detail it has, the less likely the team will become lost.
Still others are “agilists,” arguing that quick “planning game” may be
necessary, but that the road map will emerge as “real work” on the software begins.
What to do? On many projects, over planning is time consuming and fruitless
(too many things change), but under planning is a recipe for chaos. Like most things
in life, planning should be conducted in moderation, enough to provide useful
guidance for the team- no more, no less.
Regardless of the rigor with which planning is conducted, the following
principles always apply.
Principle #1: Understand the scope of the project. It’s impossible to use a road map
if you don’t know where you’re going. Scope provides the software.
Principle #2: Involve the customer in planning activity. The customer defines
priorities and establishes the project constraints.
Principle #3: Recognize that planning is iterative. As work begins, it is very likely
that things will change. As a consequence, the plan must be adjusted to accommodate
these changes. In addition, iterative and incremental process models dictate re-
planning based on feedback received from users.
Principle #4: Estimate based on what you know. The intent of estimation is to
provide an indication of effort, cost, and task duration, based on the team’s current
understanding of the work to be done.
Principle #5: Consider risk as you define the plan. If the team has defined risks that
have high impact and high probability, contingency planning is necessary.
Principle #6: Be realistic. People don’t work 100 percent every day. Noise always
enters into any human communication. Omission and ambiguity are facts of life.
Change will occur. Even the best software engineers make mistakes. These and other
realities should be considered as a project plan is established.
Principle #7: Adjust granularity as you define the plan. Granularity refers to the
level of detail that is introduced as a project plan is developed. A “fine granularity”
plan provides significant work detail that is planned over relatively short time
increments.
Principle #8: Define how you intend to ensure quality. The plan should identify
how the software team intends to ensure quality. If formal technical reviews are to be
conducted, they should be scheduled.
Principle #9: Describe how you intend to accommodate change. Even the best
planning can be obviated by uncontrolled change. The software team should identify
how changes are to be accommodated as software engineering work proceeds.
Principle #10: Track the plan frequently and make adjustments are
required. Software project falls behind schedule one day at a time. Therefore, it
makes sense to track progress on a daily basis, looking for a problem areas and
situation in which scheduled work does not confirm to actual work conducted. When
slippage is encountered, the plan is adjusted accordingly.
Why is the system being developed? All parties should assess the validity of
business reasons for the software work. Stated in another way, does the business
purpose justify the expenditure of people, time, and money?
What will be done? Identify the functionality to be built, and by implication, the task
required to get the job done.
When will it be accomplished? Establish a workflow and timeline for key project
tasks and identify the milestones required by the customer.
Who is responsible for a function? The role and responsibility of each member of
the software tam must be defined.
Where they are organizationally located? Not all roles and responsibilities reside
within the software tam itself. The customer, users, and other stakeholders also have
responsibilities.
How will the job be done technically and managerially? Once product scope is
established, a management and technical strategy for the project must be defined.
How much of each resource is needed? The answer to this question is derived by
developing estimates based on answers to earlier questions.
The answers to the above questions are important regardless of the size of complexity
of a software project. But how does the planning process begin?
Tom De Marco: “we think that software developers are missing a vital truth: most
organizations don’t know what they do. They think they know, but they don’t know.”
MODELING PRACTICE
The models are created to gain better understanding of actual entity to be built.
When the entity is a physical thing, we can build a model that is identical in
form of shape but smaller in scale.
However, when the entity is software, our model must take a different form.
It must be capable of representing the information that software transforms,
the architecture and functions that enable the transformation to occur, the features that
user’s desire, and the behavior of the system as the transformation is taking place.
Two classes of models are crated: Analysis models and design models.
Analysis models represent the customer requirements by depicting the software
in three different domains: the information domain, the functional domain, and the
behavioral domain.
Design models represent characteristics of the software that help practitioners
to construct it effectively.
Principle #2: The functions that the software performs must be defined. Software
functions provide direct benefit to visible end-user. Some functions transform data
that flow into the system; in other cases, functions effect some level of control over
internal software processing or external system elements.
Principle #3: The behavior of the software must be represented. The behavior of
computer software is driven by its interaction with the external environment. Input
provided by end-users, control data provided by an external system, or monitoring
data collected over a network all cause the software to behave in a specific way.
Principle #4: The models that depict information, function, and behavior must be
partitioned in a manner that uncovers detail in a layered fashion. Analysis
modeling is the first step in software engineering problem solving. It allows the
practitioner to understand the problem better and establishes a basis for the solution
(design). Complex problems are difficult to solve in their entirety. For this reason, we
use a divide and conquer strategy. A large, complex problem is divided into sub-
problems until each sub- problem is relatively easy to understand. This concept is
called partitioning, and it is a key strategy in analysis modeling.
Principle #5: The analysis task should move from essential information toward
implementation detail. Analysis modeling begins by describing the problem from the
end-user’s perspective. The “essence” of a problem is described without any
consideration of how a solution will be implemented.
The design model created for software provides a variety of different views of
system.
There is no shortage of methods for deriving various elements of a software
design. Some methods are data-driven, allowing the data structure to dictate the
program architecture and the resultant processing component.
Others are pattern-driven, using information about the problem domain (the
analysis model) to develop architectural styles and processing patterns- a set of design
principles that can be applied regardless of the method that is used.
Principle #1: Design should be traceable to the analysis model. The analysis model
describes the information domain of the problem, uses visible functions, system
behavior, and a set of analysis classes that package business objects with the methods
that service them. The design model translates this information into an architecture, a
set of subsystems that implement major functions, and a set of component- level
designs that realize analysis classes.
Principle #2: Always consider the architecture of the system to be built. Software
architecture is the skeleton of the system to be built. It affects interfaces, data
structures, program control flow behavior, the manner in which testing can be
conducted and the maintainability of resultant system.
Principle #4: Interfaces (both internal and external) must be designed with
care. The manner in which data flow between the components of a system has much
to do with processing efficiency, error propagation, and design simplicity, A well
designed interface integration easier and assists the tester in validating components
functions.
Principle #5: User interface design should be tuned the needs of the end-
user. However, in every case, it should be stress free and easy to use. The user
interface is the visible manifestation of the software. A poor interface design often
leads to the perception that the software is “bad”.
Principle #6: Components should be functionally independent. Functional
independence is a measure of the “single- mindedness” of a software component. The
functionally that is delivered by a component should be cohesive- that is, it should
focus on one and only on function or sub-function.
Principle #7: Components should be loosely coupled to one another and to the
external environment. Coupling is achieved in many ways-via component inter-face,
by messaging and through global data. As the level of coupling increases, the
likelihood of error propagation also increases and the overall maintainability of the
software decreases. Therefore, component coupling should be kept as low as is
reasonably possible.
Principle #9: The design should be developed iteratively. With each iteration, the
designer should strive for greater simplicity. Like most of the creative activities,
design occurs iteratively. The first iteration works to refine the design and correct
errors, but later iterations should strive to make the design as simple as is possible.
CONSTRUCTION PRACTICE
The construction activity encompasses a set of coding and testing task that lead
operational software that is ready for delivery to the customer or end-user.
In modern software engineering work, coding may be:
(1) the direct creation of programming language source code;
(2) the automatic generation of source code using an intermediate
design-like representation of the component to be built;
(3) the automatic generation of executable code using a fourth
generation programming language.
The principles and concepts that guide the coding task are closely aligned
programming style, programming languages, and programming methods. However,
there are a number of fundamental principles that can be stated:
Preparation principles: Before you write one line of code, be sure you:
1. Understand the problem you’re trying to solve.
2. Understand basic design principles and concepts.
3. Pick a programming language that meets the needs of the software to the hilt
and the environment in which it will operate.
4. Select a programming environment that provides tools that will make your
work easier.
5. Create a set of unit tests that will be applied once the component you code is
completed.
Validation principles: After you’ve completed your first coding pass, be sure you:
1. Build architectural infrastructure,
Review the architectural design.
Code and test the components that enable architectural infrastructure.
Acquire reusable architectural patterns.
Test the infrastructure to ensure interface integrity.
Testing Principles:
In a classic book on software testing, Glen Myers states a number of rules that
can serve well as testing objectives:
Davis suggests a set of testing principles that have been adapted for use in this book:
Principle #2: Tests should be planned long before testing begins. Test planning can
began as soon as the analysis model is complete. Detailed definition of test cases can
begin as soon as the design model has been solidified. Therefore, all tests can be
planned and designed before any code has been generated.
Principle #3: The pare to principle applies to software testing. Stated simply, the
Pareto principle implies that 80 percent of all errors uncovered during testing will
likely be traceable to 20 percent of all program components. The problem, of course,
is to isolate these suspect components and to thoroughly test them.
Principle #4: Testing should begin “in the small” and progress toward testing “in
the large”. The first tests planned and executed generally focus on individual
components. As testing progresses, focus shifts in an attempt to find error in
integrated clusters of components and ultimately in the entire system.
Principle #5: Exhaustive testing is not possible. The number of path permutations
for even a moderately sized program is exceptionally large. For this reason, it is
impossible to execute every combination of paths during testing. It is possible,
however, to adequately cover program logic and to ensure that all conditions in the
component- level design have been exercised.
DEPLOYMENT
Principle #1: Customer expectations for the software must be managed. The
customer expects more than the team has promised to deliver and disappointment
occurs immediately. This results in feedback that is not productive and which ruins
team morale.
Principle #5: Buggy software should be fixed first, delivered later. Under time
pressure, some software organizations deliver low-quality increments with a warning
to the customer that bugs “will be fixed in the next release”. This is a mistake. There’s
a saying in the software business: “Customer will forget you delivered a high- quality
product a few days late, but they will never the problems that a low-quality product
caused them. The software reminds them everyday.”