Software Engineering Principles
Software Engineering Principles
Syllabus
• [Link]
Contents:
Introduction to Software Engineering, Software engineering principles,
Software Myths, Software Engineering - a Layered Technology,
Software Process Framework, , Requirement Engineering Process,
Eliciting Requirement: Software Requirements Specification. Software
Process Models: Waterfall Model, Incremental Process Models,
Evolutionary Process Models, Specialized Process Models.
Introduction to Software Engineering.
• Software Engineering is the process of designing, developing,
testing, and maintaining software. It is a systematic and disciplined
approach to software development that aims to create high-quality,
reliable, and maintainable software. Software engineering includes a
variety of techniques, tools, and methodologies, including
requirements analysis, design, testing, and maintenance.
Key principals of software Engineering
• Modularity: Breaking the software into smaller, reusable components
that can be developed and tested independently.
• Abstraction: Hiding the implementation details of a component and
exposing only the necessary functionality to other parts of the
software.
• Encapsulation: Wrapping up the data and functions of an object into a
single unit, and protecting the internal state of an object from external
modifications.
• Reusability: Creating components that can be used in multiple
projects, which can save time and resources.
Continued…
• Maintenance: Regularly updating and improving the software to fix bugs,
add new features, and address security vulnerabilities.
• Testing: Verifying that the software meets its requirements and is free of
bugs.
• Design Patterns: Solving recurring problems in software design by
providing templates for solving them.
• Agile methodologies: Using iterative and incremental development
processes that focus on customer satisfaction, rapid delivery, and flexibility.
• Continuous Integration & Deployment: Continuously integrating the code
changes and deploying them into the production environment.
Continued…
• Maintainability: It should be feasible for the software to evolve to
meet changing requirements.
• Efficiency: The software should not make wasteful use of computing
devices such as memory, processor cycles, etc.
• Correctness: A software product is correct if the different requirements
specified in the software development specification (SRS) Document
have been correctly implemented.
• Reusability: A software product has good reusability if the different
modules of the product can easily be reused to develop new products.
Continued…
• Testability: Here software facilitates both the establishment of test criteria
and the evaluation of the software with respect to those criteria.
• Reliability: It is an attribute of software quality. The extent to which a
program can be expected to perform its desired function, over an arbitrary
time period.
• Portability: In this case, the software can be transferred from one computer
system or environment to another.
• Adaptability: In this case, the software allows differing system constraints
and the user needs to be satisfied by making changes to the software.
• Interoperability: Capability of 2 or more functional units to process data
cooperatively.
Program vs Software Product
• Program • Software Product
1. A program is a set of 1. Software is when a program is
instructions that are given to a made available for commercial
computer in order to achieve a business and is properly
specific task. documented along with its
licensing.
Software Product = Program +
Documentation + Licensing.
Continued…
2. Program is one of the stages 2. Software Development usually
involved in the development of the follows a life cycle, which
software. involves the feasibility study of
the project, requirement gathering,
development of a prototype,
system design, coding, and testing.
Advantages of Software Engineering
There are several advantages to using a systematic and disciplined
approach to software development, such as:
• Improved Quality: By following established software engineering
principles and techniques, the software can be developed with fewer
bugs and higher reliability.
• Increased Productivity: Using modern tools and methodologies can
streamline the development process, allowing developers to be more
productive and complete projects faster.
• Better Maintainability: Software that is designed and developed using
sound software engineering practices is easier to maintain and update
over time.
Continued…
• Reduced Costs: By identifying and addressing potential problems early in
the development process, software engineering can help to reduce the cost
of fixing bugs and adding new features later on.
• Increased Customer Satisfaction: By involving customers in the
development process and developing software that meets their needs,
software engineering can help to increase customer satisfaction.
• Better Team Collaboration: By using Agile methodologies and continuous
integration, software engineering allows for better collaboration among
development teams.
• Better Scalability: By designing software with scalability in mind, software
engineering can help to ensure that software can handle an increasing
number of users and transactions.
Continued…
• Better Security: By following the Software Development Life Cycle
(SDLC) and performing security testing, software engineering can
help to prevent security breaches and protect sensitive data.
Software Myths
• Most, experienced experts have seen myths or superstitions (false
beliefs or interpretations) or misleading attitudes, which creates major
problems for management and technical people. The types of
software-related myths are listed below.
Continued…
(i) Management Myths:
Myth 1:
We have all the standards and procedures available for software
development.
Fact:
• Software experts do not know all the requirements for the software
development.
• And all existing processes are incomplete as new software
development is based on new and different problem.
Continued…
Myth 2:
• The addition of the latest hardware programs will improve the
software development.
Fact:
• The role of the latest hardware is not very high on standard software
development; instead computer aided software engineering (CASE)
tools help the computer, they are more important than hardware to
produce quality and productivity.
• Hence, the hardware resources are misused.
Continued…
Myth 3:
• With the addition of more people and program planners to Software
development can help meet project deadlines (If lagging behind).
Fact:
If software is late, adding more people will merely make the problem
worse. This is because the people already working on the project now
need to spend time educating the newcomers, and are thus taken away
from their work. The newcomers are also far less productive than the
existing software engineers, and so the work put into training them to
work on the software does not immediately meet with an appropriate
reduction in work.
Continued…
(ii)Customer Myths:
The customer can be the direct users of the software, the technical team,
marketing / sales department, or other company. Customer has myths
leading to false expectations (customer) & that’s why you create
dissatisfaction with the developer
Myth 1:
A general statement of intent is enough to start writing plans (software
development) and details of objectives can be done over time.
Continued…
Fact:
• Official and detailed description of the database function, ethical
performance, communication, structural issues and the verification
process are important.
• Unambiguous requirements (usually derived iteratively) are developed
only through effective and continuous communication between
customer and developer.
Continued…
Myth 2:
• Software requirements continually change, but change can be easily
accommodated because software is flexible.
Fact:
• It is true that software requirements change, but the impact of change varies
with the time at which it is introduced. When requirements changes are
requested early (before design or code has been started), the cost impact is
relatively small. However, as time passes, the cost impact grows rapidly—
resources have been committed, a design framework has been established,
and change can cause upheaval that requires additional resources and major
design modification.
Continued…
(iii)Practitioner’s Myths:
Myths 1:
They believe that their work has been completed with the writing of the
plan.
Fact:
It is true that every 60-80% effort goes into the maintenance phase (as
of the latter software release). Efforts are required, where the product is
available first delivered to customers.
Continued…
Myths 2:
• There is no other way to achieve system quality, until it is “running”.
Fact:
• Systematic review of project technology is the quality of effective
software verification method. These updates are quality filters and
more accessible than test.
Continued…
Myth 3:
• An operating system is the only product that can be successfully
exported project.
Fact:
• A working system is not enough, the right document brochures and
booklets are also required to provide guidance & software support.
Continued…
Myth 4:
• Engineering software will enable us to build powerful and unnecessary
document & always delay us.
Fact:
• Software engineering is not about creating documents. It is about
creating a quality product. Better quality leads to reduced rework. And
reduced rework results in faster delivery times
Software Engineering – A layered technology
• Software engineering is a layered technology because it uses
engineering principles to design, develop, test, deploy, and manage
systems. The layers are connected, and each layer requires the
previous layer to be fulfilled.
Fig. The diagram shows the layers of a
software development
Continued…
Layered technology is divided into four parts:
1. A quality focus: It defines the continuous process improvement
principles of software. It provides integrity that means providing security
to the software so that data can be accessed by only an authorized person,
no outsider can access the data. It also focuses on maintainability and
usability.
2. Process: It is the foundation or base layer of software engineering. It is
key that binds all the layers together which enables the development of
software before the deadline or on time. Process defines a framework that
must be established for the effective delivery of software engineering
technology. The software process covers all the activities, actions, and
tasks required to be carried out for software development.
Continued…
- Each iteration is a short mini project with a separate life cycle. Example
waterfall.
Continued…
Incremental Delivery
Continued…
• Here the entire increment is split into increments and the first
increment design, build, install, and customer feedback.
• And once the first increment customer feedback is obtained the second
instant increment is started, and then the third increment is started and
so on.
• And this time to develop on increment is typically called as a time
box.
Continued…
Which Increment first?
- Requirement are identified, split into several increments, there may be
n number of increments lets us say 10 increments are there but which
increment will be done first? How does the developer decide which
increment to be taken off first.
- One thing is that some increments have to be done because the other
one is depend on that, we have to do that first because the others might
have the dependency on that.
- But if some requirements are can be done on any order then we can
compute a value to cost ratio.
Continued…
V/C
where,
- V is the value to the customer. We can ask the customer to give a value
1 to 10.
- And the cost C is a cost of development can give a value 1 to 10
Continued…
V/C ratios: An example
Continued…
• Here in this example we have features (steps), values that the
customer specify that how valuable are the features.
• And we have the cost of development, the development team gives a
cost and then the ration is worked out.
• Here 9 is the largest ratio and this will be the first increment.
Evolutionary Process Models
• In any real project the requirements change during the development,
there are many reasons why the requirements change.
• One of the reason may be the customer is not able to view the software
in entirely before the software is built and therefore many
requirements are missed many requirements are given ambiguously,
there inconsistency.
• Cappers jones an established researcher he studied 8000 projects and
found that 40% of the requirements change during the development.
• This is a very significant issue because neither waterfall model not the
incremental model handle this satisfactory.
Continued…
• Waterfall model has no provision for requirement change during the
development.
• In Incremental model, identifies all the requirements upfront and then
slicing the requirements into incremental features to be deployed at the
customer side.
• While a features being installed the customer feedback is obtained
which may necessitate additional requirements or change of
requirements.
• Still the fact remains that the incremental model requires all the
requirements to be identified upfront as far as possible.
Continued…
• Evolutionary Model tries to overcome necessity of having to identify
all the requirements upfront.
• There are some similarities between the evolutionary model and the
incremental model in the sense that increments are deployed at the
client side but here in the evolutionary model no upfront requirement
specification is required.
• Initially some features are implemented which have been identified
and then as the customer experiments is those more and more features
get developed and deployed so the software actually evolves starting
with something very simple.
Continued…
• But the main difference with and the incremental model and purely
evolutionary model is that with respect to upfront identification of the
requirements.
• Promotes early risk mitigation:
- Breaks down the system into mini projects and focus on the riskier
issue first.
- “Plan a little, design a little, and code a little”
• Because each time only few features are identified plan for those features
design, develop, deployed at the customer site.
• Encourage all development participants to be involved earlier on unlike the
waterfall model.
- End users, Testers, integrators, and technical writer.
Continued…
• Evolutionary model with iterations:
A complex system is will be most successful if implemented in a small
steps. “Retreat” to a previous successful step on failure. Opportunity to
receive some feedback from the real world before throwing in all the
resources, and you can correct possible errors. – Tom glib in software
metrics.
• Identified the big advantage of evolutionary model that the client
feedback is obtained and the features are determined as the client
keeps on using the system evolves, and if some features the customer
does not like then that feature is simply discarded and new features
replacing that are built.
Continued…
• Evolutionary iterative development implies that the requirements,
plan, estimates and solution evolve or are refined over the course of
the iterations, rather than fully defined and frozen in a major upfront
specification effort before the development iterations begin.
Evolutionary methods are consistent with the pattern of unpredictable
discovery and change in new product development. ---Craig Larman
Continued…
What is involved in the evolutionary model?
• First develop the core modules of the software.
• The initial skeletal software is refined into increasing levels of
capability: (Iterations)
- Each iterations adds new functionalities in successive versions.
Continued..
Activities in an iteration
• Software developed over several “Mini Waterfalls”.
• The result of a single iteration:
- Ends with delivery of some tangible code.
- An incremental improvement to the software, leads to evolutionary
development.
- After a single iteration some code is deployed and the client expresses
what is required next and this leads to the evolutionary development.
Continued…
Evolutionary Model with iteration
• Outcome of each iteration: tested, integrated, executable system.
• Does not “Freeze” requirements and then conservatively design to
accommodate any feature changes.
• Iteration length is short and fixed.
- usually between 2 to 6 weeks.
- Development takes many iterations (10 – 15)
Continued…
• Successive Versions: Functioning systems capable of performing some
useful work. The customer can make use of them in real work.
Continued…
Evolutionary Model:
Evolves an initial implementation with user feedback:
- multiple versions until the final version.
Continued…
Advantages of Evolutionary Model
• Users get a chance to experiment with a partially developed system:
much before the full working version is released.
• Helps find exact user requirements: Software more likely to meet
exact user requirements.
• Core module get tested thoroughly: Reduces chances of errors in final
delivered software.
• Better management of complexity by developing one increment at a
time.
• Better management of changing requirements.
Continued…
• Can get customer feedback and incorporate them much more
efficiently.
• Training can start on an earlier release: Customer feedback taken into
account.
• Frequent releases allow developers to fix unanticipated problems
quicker.
Continued…
Evolutionary Model Problems:
• The process is intangible, no regular well defined deliverables.
• The process is unpredictable: hard to manage, e.g. scheduling etc.
• Systems are rather poorly structured: Continual, unpredictable changes
tend to degrade the software structure.
• Systems may not even converge to final versions.
Specialized Process Models
• Specialized process models take on many of the characteristics of one
or more of the traditional models. However, these models tend to be
applied when a specialized or narrowly defined software engineering
approach is chosen.
• It is important to note, however, that being the first to reach a market
is no guarantee of success. In fact, many very successful software
products have been second or even third to reach the market (learning
from the mistakes of their predecessors).
• In this context software quality is defined quite broadly to encompass
not only customer satisfaction, but also a variety of technical criteria
discussed.
Continued…
• In some cases, these specialized process models might better be
characterized as a collection of techniques or a "methodology for
accomplishing a specific software development goals However, they
do imply a process.
• In this specialized process model we have to study three different
models, such as:
1. Component – Based Development.
2. The formal methods model.
3. Aspect Oriented software development.
1. Component-Based Development
• Commercial off-the-shelf (COTS) software components, developed by
vendors who offer them as products, provide targeted functionality
with well-defined interfaces that enable the component to be
integrated into the software that is to be built.
• It is evolutionary in nature demanding an iterative approach to the
creation of software.
• However, the component- based development model comprises
applications from prepackaged software components.
Continued…
• Regardless of the technology that is used to create the components, the
component-based development model incorporates the following steps
(implemented using an evolutionary approach):
1. Available component-based products are researched and evaluated
for the application domain in question.
2. Component integration issues are considered.
3. A software architecture is designed to accommodate the
components.
4. Components are integrated into the architecture.
5. Comprehensive testing is conducted to ensure proper functionality.
Continued…
• The component-based development model leads to software reuse, and
re- usability provides software engineers with a number of measurable
benefits including a reduction in development cycle time and a
reduction in project cost if component reuse becomes part of your
organization's culture.
2. The Formal Methods Model
• The formal methods model encompasses a set of activities that leads to
formal mathematical specification of computer software.
• Formal methods enable you to specify, develop, and verify a
computer-based system by applying a rigorous, mathematical notation.
• A variation on this approach, called cleanroom software engineering,
is currently applied by some software development organizations.
• In clean room software engineering, an efficient and good quality
software product is delivered to the client as QA (Quality Assurance)
is performed each and every phase of software development.
Continued…
• When formal methods are used during development, they provide a
mechanism for eliminating many of the problems that are difficult to
over come using other software engineering paradigms Ambiguity,
incompleteness, and inconsistency can be discovered and corrected
more easily not through ad hoc review, but through the application of
mathematical analysis.
• When formal methods are used during design, they serve as a basis for
program verification and therefore enable you to discover and correct
errors that might otherwise go undetected.
Continued…
• Although not a mainstream approach, the formal methods model offers
the promise of defect-free software.
• Yet, concern about its applicability in a business environment has been
voiced:
➢The development of formal models is currently quite time consuming and
expensive.
➢Because few software developers have the necessary background to apply
formal methods, extensive training is required.
➢It is difficult to use the models as a communication mechanism for techni cally
unsophisticated customers
Continued…
• These concerns notwithstanding, the formal methods approach has
gained adherents among software developers who must build safety-
critical software (e.g., developers of aircraft avionics and medical
devices)
3. Aspect-Oriented Software Development
• Aspect-Oriented Software Development Regardless of the software
process that is chosen, the builders of complex software invariably
implement a set of localized features, functions, and information
content.
• These localized software characteristics are modeled as components
(e.g., object-oriented classes) and then constructed within the context
of a system architecture.
• As modern computer-based systems become more sophisticated (and
complex), certain concerns-customer required properties or areas of
technical interest-span the entire architecture.
Continued…
• Some concerns are high-level properties of a system (e.g., security,
fault tolerance). Other concerns affect functions (eg, the application of
business rules), while others are systemic (e.g.. task synchronization or
memory management).
• When concerns cut across multiple system functions, features, and
information, they are often referred to as crosscutting concerns.
Aspectual requirements define those crosscutting concerns that have
an impact across the software architecture.
Continued…
• Aspect-oriented software development (AOSD), often referred to as
aspect-oriented programming (AOP) or aspect-oriented component
engineering (AOCE) IGru021, is a relatively new software
engineering paradigm that provides a process and methodological
approach for defining, specifying, designing, and Constructing
aspects.
• Example:
To provide a security to the three application layer UI layer, Business
Layer and Data access layer we can use the common snippet of code
such as (security, transaction management) hence there code are written
in a classes and these classes are called as aspects.
End of the Unit 1