SE Unit I
SE Unit I
SE Unit I
UNIT I
UNIT-I:
Introduction to Software Engineering:
A Generic view of process: Software engineering, Process Framework, CMM,
Process patterns, process assessment, Personal and Team process, Process
Technology, Product and process.
Process models: Perspective Models, The waterfall model, Incremental process
models, Evolutionary process models, Specialized Process Models, The Unified
process.
An Agile View of Process: What is agility, Agile Process, and Agile Process
Models
Instructions
- Programs that when executed provide desired function
Data structures
-Enable the programs to adequately manipulate information
Documents
-Describe the operation and use of the programs
Characteristics of software
Categories of Software
Legacy software are older programs that are developed decades ago. The quality of
legacy software is poor because it has inextensible design, convoluted code, poor and
nonexistent documentation, test cases and results that are not achieved.
Management Myths
Managers with software responsibility, like managers in most disciplines, are often
under pressure to maintain budgets, keep schedules from slipping, and improve quality.
A software manager often grasps at belief in a software myth, If the Belief will lessen the
pressure.
Myth : We already have a book that’s full of standards and procedures for building
software. Won’t that provide my people with everything they need to know?
Reality : The book of standards may very well exist, but is it used?
- Are software practitioners aware of its existence?
- Does it reflect modern software engineering practice?
- Is it complete? Is it adaptable?
- Is it streamlined to improve time to delivery while still maintaining a focus on
Quality?
In many cases, the answer to these entire question is no.
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. In the
words of Brooks ―Adding people to a late software project makes it later.‖ At first,
this statement may seem counterintuitive. However, 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
Myth : If we decide to outsource 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
project internally, it will invariably struggle when it out sources software project.
Customer Myths
A customer who requests computer software may be a person at the next desk, a
technical group down the hall, the marketing /sales department, or an outside company
that has requested software under contract. In many cases, the customer believes
myths about software because software managers and practitioners do little to correct
misinformation. Myths led to false expectations and ultimately, dissatisfaction with the
developers.
Practitioner Myths
Process: A set of activities, methods, practices, and transformations that people use to
develop and maintain software and the associated products (e.g., project plans, design
documents, code, test cases, and user manuals)
tools
methods
process model
a “quality” focus
The foundation for software engineering is the process layer. It is the glue that
holds the technology layers together and enables rational and timely
development of computer software.
Process defines a framework that must be established for effective delivery of
software engineering technology.
The software process forms the basis for management control of software
projects and establishes the context in which technical methods are applied,
work products (models, documents, data, reports, etc.) are produced, milestones
are established, quality is ensured, and change is properly managed.
Software engineering methods provide the technical ―how to’s‖ for building
software. Methods encompass a broad array of tasks that include
communication, req. analysis, design, coding, testing and support.
Software engineering tools provide automated or semi-automated support for the
process and the methods.
When tools are integrated so that info. Created by one tool can be used by
another, a system for the support of software development called computer-aided
software engineering is established
A PROCESS FRAMEWORK
Communication activity
Planning activity
Modeling activity
o analysis action
o requirements gathering work task
o elaboration work task
o negotiation work task
o specification work task
o validation work task
o design action
o data design work task
o architectural design work task
o interface design work task
o component-level design work task
o Construction activity
o Deployment activity
CMM Levels.
Level 1: Initial.
Level 2: Repeatable
At this level, the basic project management practices such as tracking cost and
schedule are established.
Size and cost estimation techniques like function point analysis, COCOMO, etc.
are used.
The necessary process discipline is in place to repeat earlier success on projects
with similar applications. Opportunity to repeat a process exists only when a
company produces a family of products
Level 3: Defined
At this level the processes for both management and development activities are
defined and documented.
There is a common organization-wide understanding of activities, roles, and
responsibilities.
The processes though defined, the process and product qualities are not
measured.
ISO 9000 aims at achieving this level.
Level 4: Managed
Level 5: Optimizing
Process and product measurement data are analyzed for continuous process
improvement.
The process may be fine tuned to make the review more effective.
The lessons learned from specific projects are incorporated in to the process.
Continuous process improvement is achieved both by carefully analyzing the
quantitative feedback from the process measurements and also from application
of innovative ideas and technologies.
These best practices are transferred throughout the organization.
Each maturity level is characterized by several Key Process Areas (KPAs) except for SEI CMM
level 1 that includes the areas an organization should focus to improve its software process to
the next level.
Process Patterns
Process patterns define a set of activities, actions, work tasks, work products
and/or related behaviors
A template is used to define a pattern
Typical examples:
o Customer communication (a process activity)
o Analysis (an action)
o Requirements gathering (a process task)
o Reviewing a work product (a process task)
o Design model (a work product)
Process Assessment
The process should be assessed to ensure that it meets a set of basic process
criteria that have been shown to be essential for a successful software
engineering.
Communication
Planning
Modeling
Construction
Deployment
Communication Practices
Principles
Listen
Prepare before you communicate
Facilitate the communication
Face-to-face is best
Take notes and document decisions
Collaborate with the customer
Stay focused
Draw pictures when things are unclear
Move on …
Negotiation works best when both parties win.
Initiation
o The parties should be physically close to one another
o Make sure communication is interactive
o Create solid team ―ecosystems‖
o Use the right team structure
An abbreviated task set
o Identify who it is you need to speak with
o Define the best mechanism for communication
o Establish overall goals and objectives and define the scope
o Get more detailed
Have stakeholders define scenarios for usage
Extract major functions/features
o Review the results with all stakeholders
Planning Practices
Principles
Understand the project scope
Involve the customer (and other stakeholders)
Recognize that planning is iterative
Estimate based on what you know
Consider risk
Be realistic
Adjust granularity as you plan
Define how quality will be achieved
Define how you’ll accommodate changes
Track what you’ve planned
Initiation
o Ask Boehm’s questions
Why is the system begin developed?
What will be done?
When will it be accomplished?
Who is responsible?
Where are they located (organizationally)?
How will the job be done technically and managerially?
How much of each resource is needed?
An abbreviated task set
o Re-assess project scope
o Assess risks
o Evaluate functions/features
o Consider infrastructure functions/features
o Create a coarse granularity plan
Number of software increments
Overall schedule
Delivery dates for increments
o Create fine granularity plan for first increment
o Track progress
Modeling Practices
We create models to gain a better understanding of the actual entity to be built
Analysis models represent the customer requirements by depicting the software
in three different domains: the information domain, the functional domain, and the
behavioral domain.
Pick a programming language that meets the needs of the software to be built
and the environment in which it will operate.
Select a programming environment that provides tools that will make your work
easier.
Create a set of unit tests that will be applied once the component you code is
completed.
Coding principles: After started writing code
Constrain your algorithms by following structured programming practice.
Select data structures that will meet the needs of the design.
Understand the software architecture and create interfaces that are consistent
with it.
Keep conditional logic as simple as possible.
Create nested loops in a way that makes them easily testable.
Select meaningful variable names and follow other local coding standards.
Write code that is self-documenting.
Create a visual layout (e.g., indentation and blank lines) that aids understanding.
Validation Principles: After completing first coding pass:
o Conduct a code walkthrough when appropriate.
o Perform unit tests and correct errors you’ve uncovered.
o Refactor the code
Testing Principles
Deployment Practices
Principles
Softwar e Pr ocess
Asses sment
Software Process
Software Process
PSP TSP
o Planning
o High-level design
o High-level design review
o Development
o Postmortem
stresses the need for each software engineer to identify errors early and as
important, to understand the types of errors
PROCESS MODELS
1. PRESCRIPTIVE MODEL
2. WATERFALL MODEL
Process Models
A software life cycle model also called process model is a descriptive and diagrammatic
representation of the software life cycle. A life cycle model 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. In other words, a life cycle
model maps the different activities performed on a software product from its inception to
retirement.
Different life cycle models may map the basic development activities to phases in
different ways. Thus, no matter which life cycle model is followed, the basic activities
are included in all life cycle models though the activities may be carried out in different
orders in different life cycle models. During any life cycle phase, more than one activity
may also be carried out.
Advantages:
It is very simple
It divides the large task of building a software system into a seri es of clearly
divided phases.
Each phase is well documented
Problems
Doesn't support iteration, so changes can cause confusion
Difficult for customers to state all requirements explicitly and up front
Requires customer patience because a working version of the program doesn't
occur until the final phase
Problems can be somewhat alleviated in the model through the addition of
feedback loops
1. Incremental Model
o In this life cycle model, the software is first broken down into several modules which
can be incrementally constructed and delivered.
o Used when requirements are well understood
o Multiple independent deliveries are identified
o Work flow is in a linear (i.e., sequential) fashion within an increment and is staggered
between increments
o Iterative in nature; focuses on an operational product with each increment
o The development team first develops the core modules of the system.
o This initial product skeleton is refined into increasing levels of capability adding new
functionalities in successive versions.
o Each evolutionary version may be developed using an iterative waterfall model of
development.
o Provides a needed set of functionality sooner while delivering optional components
later
o Useful also when staffing is too short for a full-scale development
• Business Modeling:
In this phase, define the flow of information within the organization, so that it
covers all the functions. This helps in clearly understand the nature, type
source and process of information.
• Data Modeling:
In this phase, convert the component of the information flow into a set of data
objects. Each object is referred as an Entity.
• Process Modeling:
In this phase, the data objects defined in the previous phase are used to
depict the flow of information . In addition adding , deleting, modifying and
retrieving the data objects are included in process modeling.
• Application Designing:
In this phase, the generation of the application and coding take place. Using
fourth generation programming languages or 4 GL tools is the preferred choice
for the software developers.
• Testing:
In this phase, test the new program components.
Prototype Models:
There are several uses of a prototype. An important purpose is to illustrate the input
data formats, messages, reports, and the interactive dialogues to the customer. This is
a valuable mechanism for gaining better understanding of the customer’s needs:
Another reason for developing a prototype is that it is impossible to get the perfect
product in the first attempt. Many researchers and engineers advocate that if you want
to develop a good product you must plan to throw away the first version. The
experience gained in developing the prototype can be used to develop the final product.
Disadvantages
The customer sees a "working version" of the software, wants to stop all
development and then buy the prototype after a "few fixes" are made
Developers often make implementation compromises to get the software running
quickly (e.g., language choice, user interface, operating system choice, inefficient
algorithms)
Lesson learned
o Define the rules up front on the final disposition of the prototype before it is
built
o In most circumstances, plan to discard the prototype and engineer the
actual production software with a goal toward quality
o
Spiral Model
• During the first quadrant, it is needed to identify the objectives of the phase.
• Examine the risks associated with these objectives.
Disadvantages:
• Contractual development often specifies process model
• and deliverables in advance.
• Requires risk assessment expertise.
The spiral model is called a meta model since it encompasses all other life cycle
models. Risk handling is inherently built into this model. The spiral model is suitable for
development of technically challenging software products that are prone to several
kinds of risks. However, this model is much more complex than the other models – this
is probably a factor deterring its use in ordinary projects.
The classical waterfall model can be considered as the basic model and all other life
cycle models as embellishments of this model. However, the classical waterfall model
can not be used in practical development projects, since this model supports no
mechanism to handle the errors committed during any of the phases.
This problem is overcome in the iterative waterfall model. The iterative waterfall model
is probably the most widely used software development model evolved so far. This
model is simple to understand and use. However, this model is suitable only for well-
understood problems; it is not suitable for very large projects and for projects that are
subject to many risks.
The prototyping model is suitable for projects for which either the user requirements
or the underlying technical aspects are not well understood. This model is especially
popular for development of the user-interface part of the projects.
The Incremental approach is suitable for large problems which can be decomposed
into a set of modules for incremental development and delivery. This model is also
widely used for object-oriented development projects. Of course, this model can only be
used if the incremental delivery of the system is acceptable to the customer.
The spiral model is called a meta model since it encompasses all other life cycle
models. Risk handling is inherently built into this model. The spiral model is suitable for
development of technically challenging software products that are prone to several
kinds of risks. However, this model is much more complex than the other models – this
is probably a factor deterring its use in ordinary projects.
The different software life cycle models can be compared from the viewpoint of the
customer. Initially, customer confidence in the development team is usually high
irrespective of the development model followed. During the lengthy development
process, customer confidence normally drops off, as no working product is immediately
visible.
• Birthed during the late 1980's and early 1990s when object-oriented languages
were gaining wide-spread use
• Many object-oriented analysis and design methods were proposed; three top
authors were Grady Booch, Ivar Jacobson, and James Rumbaugh
• They eventually worked together on a unified method, called the Unified
Modeling Language (UML)
– UML is a robust notation for the modeling and development of object-
oriented systems
Inception Phase
Elaboration Phase
• Encompasses both the planning and modelling activities of the generic process
• Refines and expands the preliminary use cases
• Expands the architectural representation to include five views
– Use-case model
– Analysis model
– Design model
– Implementation model
– Deployment model
• Often results in an executable architectural baseline that represents a first cut
executable system
• The baseline demonstrates the viability of the architecture but does not provide
all features and functions required to use the system
Construction Phase
• Analysis and design models from the previous phase are completed to reflect the
final version of the increment
• Use cases are used to derive a set of acceptance tests that are executed prior to
the next phase
Transition Phase
• Encompasses the last part of the construction activity and the first part of the
deployment activity of the generic process
• Software is given to end users for beta testing and user feedback reports on
defects and necessary changes
• The software teams create necessary support documentation (user manuals,
trouble-shooting guides, installation procedures)
• At the conclusion of this phase, the software increment becomes a usable
software release
Production Phase
• Encompasses the last part of the deployment activity of the generic process
• On-going use of the software is monitored
• Support for the operating environment (infrastructure) is provided
• Defect reports and requests for changes are submitted and evaluated
Agile Processing
What is Agility
Agility
• The most widely used agile process, originally proposed by Kent Beck [BEC99]
• XP uses an object-oriented approach as its preferred development paradigm
• Defines four (4) framework activities
– Planning
– Design
– Coding
– Testing
XP Planning
– Begins with the creation of ―user stories‖ and then placed on an index
card.
– The customer assigns a value to the story based on the overall business
value of the function.
– Agile team assesses each story and assigns a cost ―measured in
development weeks.‖
– Stories are grouped to form a deliverable increment
– A commitment is made on delivery date
Once a commitment is made on delivery date, the XP team orders the stories that will
be developed in one of three ways:
1. All stories will be implemented immediately within a few weeks.
2. The stories with the highest value will be moved up in the schedule and
implemented first.
3. The riskiest stories will be moved up in the schedule and implemented
first.
– After the first increment (project release), ―project velocity‖ is used to help
define subsequent delivery dates for other increments.
– Project velocity is the number of customer stories implemented during the
first release
XP – Design
XP – Coding
• Recommends the construction of a series of unit tests for each of the stories
before coding commences
• Encourages ―pair programming‖
– Mechanism for real-time problem solving and real-time quality assurance
– Keeps the developers focused on the problem at hand
• Needs continuous integration with other portions (stories) of the s/w, which
provides a ―smoke testing‖ environment
XP – Testing
Advantages
• Customer focus increase the chance that the software produced will actually
meet the needs of the users
• The focus on small, incremental release decreases the risk on your project:
– by showing that your approach works and
– by putting functionality in the hands of your users, enabling them to
provide timely feedback regarding your work.
• Continuous testing and integration helps to increase the quality of your work
• XP is attractive to programmers who normally are unwilling to adopt a software
process, enabling your organization to manage its software efforts better.
Disadvantages
• XP is geared toward a single project, developed and maintained by a single
team.
• XP is particularly vulnerable to "bad apple" developers who:
– don't work well with others
– who think they know it all, and/or
– who are not willing to share their "superior‖ code
• XP will not work in an environment where a customer or manager insists on a
complete specification or design before they begin programming.
• XP will not work in an environment where programmers are separated
geographically.
• XP has not been proven to work with systems that have scalability issues (new
applications must integrate into existing systems).
Crystal