Documente Academic
Documente Profesional
Documente Cultură
Software Quality
Introduction
Introduction
Programming is fun, but developing quality
software is hard.
In between nice ideas, the requirement or
vision and working software product, there is
much more than programming.
Aim is not just to develop working programs,
but to develop good quality maintainable
programs!
Software Engineering vs Programming.
Software engineering is a discipline for solving
business problems.
software engineering require great emphasis
on
methodology or method for managing the
development process
great skill with tools and techniques.
Why Software Engineering Is Difficult
Need to know about software domain
Need to know about the problem domain
Some problems require extensive periods of dedicated research
(years, decades, or even longer)
Software is a formal domain(inputs and goal states well
defined).
The real world is informal (ill-defined inputs and goal states)
Software engineering is mainly about modeling the physical
world and finding good abstractions.
Finding abstractions in a problem domain involves certain level of
coarse graining. We cannot describe the problem domain in
perfect detail. Given that every physical system has very many
parts, the best we can do is to describe it in terms of only some of
its variables.
we live in a changing world: things wear out and break, business
practices change, government regulations change, etc.
Change is inevitable in all large software projects.
The system requirements change as the business procuring
the system responds to external pressures and
management priorities change.
As new technologies become available, new design and
implementation possibilities emerge. Therefore whatever
software process model is used, it is essential that it can
accommodate changes to the software being developed.
Peculiar nature of the problems (wicked problems)
solved by software engineering.
A wicked problem is a problem that is difficult or
impossible to solve because of incomplete, contradictory,
and changing requirements that are often difficult to
recognize.
These wicked problems can be properly defined only
after being solved.
Software and entropy
A virtue of software: relatively easy to change than
hardware.
But the more complex a software system gets, the harder
it is to change. why?
Larger software systems are harder to understand
The more changes get introduced into a system, the more it
tends toward entropy
I.e., its internal order breaks down
Change adds to the costs of software
development
It usually means that work that has been completed has to be redone
If the relationships between the requirements in a system have been analyzed
and new requirements are then identified, some or all of the requirements
analysis has to be repeated. It may then be necessary to redesign the system to
deliver the new requirements, change any programs that have been developed,
and re-test the system.
There are two related approaches that may be used to reduce the costs of
rework:
Change avoidance, where the software process includes activities that can
anticipate possible changes before significant rework is required.
For example, a prototype system may be developed to show some key features of the
system to customers. They can experiment with the prototype and refine their
requirements before committing to high software production costs.
Change tolerance, where the process is designed so that changes can be
accommodated at relatively low cost. This normally involves some form of
incremental development. Proposed changes may be implemented in
increments that have not yet been developed. If this is impossible, then only a
single increment (a small part of the system) may have to be altered to
incorporate the change.
Planning for change
How can good comments facilitate and reduce
the cost of software maintenance?
Hint: think about invariants, things that dont
change.
Comments describe meaning of code
Assuming programmers maintain comments
when they change the code!
How can modularity help manage change?
Modules help to isolate and localize change
Triple constraints for software projects.
Aim is to deliver quality product, keeping the cost within
budget and deliver the project as per scheduled.
There are several factors, both internal and external, which
may impact this triple constrain triangle.
Any of three factor can severely impact the other two.
Therefore, software project management is essential to
incorporate user requirements along with budget and time
constraints.
4 P model of successful project
People
People (Team members)
The most important element in success
The one who gets the job done
What to consider
Skills, abilities, talents
Motivation, Interest
Temperament
Reliability
The Other People
Senior Management
Keep informed of your work, the senior managers expertise can smooth out
bumps (technical or managerial) in the path from start to finish
Customers
Sometimes these people are the same as the end user and sometimes they
are the sponsor of the project. Know the difference, because you need to
support both parties.
End Users
Those wholl actually use your product. They wield the power of acceptance.
Product
Its why youre in business
Determine what are you building
(market/customer research)
How big a job (scope)
What do you have to accomplish task (resources)
How hard (effort + ability + resources = feasibility)
Process
The framework organizing tasks of your
development work
Provides structure and context for
development effort
Gives guidance on best practices for s/w
development
Identifies common concerns, e.g.,
organization, resources, risks
Project
Architecture
System Test
Why Process/SDLC
Planning Phase of SDLC
Define business problem and scope
Produce project estimation and schedule
Confirm project feasibility
Economic, organizational, technical, resource, and
schedule
Prioritize requirements
Architecture
System Test
Architecture Drives
Architecture serves as the blueprint for the
system but also the project:
Team structure
Documentation organization
Work breakdown structure
Scheduling, planning, budgeting
Unit testing, integration
Architectural Feasibility
The designers might have concerns about a systems ability to meet
its performance targets, work within resource limitations, or be
adequately supported by the implementation environments.
The architecture should demonstrate that the system is technically
feasible.
If infeasibility in any area could render the project unworkable, the
architecture should indicate how those issues have been investigated
through proof-of-concept prototypes, research, or other means. These
risks should be resolved before full-scale construction begins.
Release 1
Design Coding Test Deployment
Requirements
Release 2
Design Coding Test Deployment
Release 3
Design Coding Test Deployment
time
Inception
Define the scope of project
Plan the project.
Evaluate risk
Elaboration
Understand problem domain.
Design system architecture.
Plan development.
Construction
Build the product (Design, programming and test)
Transition
Moving system from developer to user environment.
Acceptance testing, release of full system.
RUP Overview
Phases
Process Workflows Inception Elaboration Construction Transition
Business Modeling
Requirements
Architecture & Design
Implementation
Test
Deployment In an iteration,
you walk through
Supporting Workflows all workflows
Configuration Mgmt
Workflows group
Management
activities logically Environment
Preliminary Iter. Iter. Iter. Iter. Iter. Iter. Iter.
Iteration(s) #1 #2 #n #n+1 #n+2 #m #m+1
Iterations
Agile Model
Agile Methods break the product into small
incremental builds.
These builds are provided in iterations.
Each iteration typically lasts from about one to three
weeks.
Every iteration involves cross functional teams working
simultaneously on various areas like planning,
requirements analysis, design, coding, unit testing, and
acceptance testing.
At the end of the iteration a working product is
displayed to the customer and important stakeholders.
Popular agile methodologies
Scrum
Extreme Programming
Adaptive Software Development
Feature Driven Development
Dynamic Systems Development Method
(DSDM)
Thank You
Architectural design
Architecture
System Test
Architecture vs. Design
Architecture: where non-functional decisions are cast, and
functional requirements are partitioned
Design: where functional requirements are accomplished
non-functional architecture
requirements
(ilities)
functional
requirements design
(domains)
System Quality Attribute
Performance
Time To Market
Availability
End Users view Cost and Benefits
Usability Business
Projected life
Security time Community
view
Targeted Market
Integration with
Maintainability
Legacy System
Portability Roll back
Reusability Developers view Schedule
Testability
Representing Architecture: The 4+1
View Model
Logical Implementation
View View
Analysts/
End-user Programmers
Designers
Structure Functionality Software management
Use-Case
View
Process Deployment
View View
System Integrators System Engineering
Performance System topology
Scalability Delivery, installation
Throughput communication
Use Case View
Use Case Analysis is a technique to capture business
process from users perspective.
Encompasses the behavior as seen by users, analysts
and testers.
Static aspects in use case diagrams; Dynamic aspects in
interaction (state-chart and activity) diagrams.
Architecturally significant use cases:
critical use cases, those that are most important to the
users of the system (from a functionality perspective)
use cases that carry the major risks
use cases that have the most important quality
requirements, such as performance, security, usability, etc.
Use-case View : Example
Design(Logical) View
Encompasses classes, interfaces, and collaborations
that define the vocabulary of a system.
Supports functional requirements of the system.
Static aspects in class and object diagrams;
Dynamic aspects in interaction diagrams.
The Logical View is a subset of the Design Model which
presents architecturally significant design elements
describes the most important classes
their organization in packages and subsystems
organization of these packages and subsystems into layers
It also describes the most important use-case realizations,
for example, the dynamic aspects of the architecture
Logical View : Class Diagram
Logical View : Collaboration Diagram
Deposit Use case
Logical View : Package Diagram
Logical View: Sequence diagram
Process View
Consists of the processes and threads that
form the systems concurrency and
synchronization mechanisms, as well as their
interactions
Addresses performance, scalability, and
throughput.
Static and dynamic aspects captured as in
design view; emphasis on active classes.
Implementation View
Describes the organization of static software modules
(source code, data files, executables, documentation etc.)
in the development environment in terms of Packaging
and layering
Encompasses components and files used to assemble and
release a physical system.
Addresses configuration management.
Static aspects in component diagrams;
Deployment View
Encompasses the nodes that form the system hardware
topology.
Addresses distribution, delivery, and installation.
Static aspects in deployment diagrams; Dynamic aspects in
interaction diagrams.
Component diagram
Deployment diagram
Deployment diagram
Architectural patterns
Architectural patterns are a means of reusing
knowledge about generic system architectures.
They describe the architecture, explain when it
may be used, and discuss its advantages and
disadvantages.
Commonly used architectural patterns include
Model-View-Controller,
Layered Architecture,
Repository,
Clientserver
Pipe and Filter
External Quality
External quality consists of those highly desirable
attributes perceived during the execution of the
software.
They are highly visible and rarely requested. But,
their absence quickly causes dissatisfaction.
Fortunately, not all of them are of equal
importance.
Ignoring those nonfunctional requirements is one
of the shortcomings found abundantly in many
software applications.
The lack of expertise regarding architecture.
Affect the entire system and difficult to isolate.
Nonfunctional Requirements
known as technical requirements, quality attributes, or
quality of service requirements, enforce the structural
quality of the software
Desirable characteristics of the software. These
characteristics include usability, reliability, maintainability,
security, portability, testability, and many others.
These quality requirements can be divided into two main
categories:
1. External quality such as performance, reliability, correctness,
scalability, robustness, security, and usability, which carry out
the softwares functions at run time, and as such, is not only
visible to stakeholders but is also highly desirable.
2. Internal quality such as maintainability, modifiability, and
testability, which are barely visible to stakeholders but simplify
how to build and evolve the software.
Dependability
The dependability of systems is more important
than their detailed functionality
Availability - up and running and able to deliver
useful services to users at any given time.
Reliability - over a given period of time, the system
will correctly deliver services as expected by the user.
Robustness to cope to with errors during execution.
Safety - how likely it is that the system will cause
damage to people or its environment.
Security - how likely it is that the system can resist
accidental or deliberate intrusions.
Other External qualities
Accessibility
Ease with which software can be accessed by as many
people as possible
Performance
Measured as response time or throughput
Scalability
Capability of the software to handle growing amount of
work in graceful manner.
Usability
Ease with which the software can be used by specified
users to achieve specified goals.
Architecture
The issue is so critical that teams should formalize
the role of the architect and ensure that at least
one team member takes ownership of this role.
The architect specifies an emergent architecture
in two ways:
By addressing nonfunctional requirements in small
chunks and in a timely manner
By designing technical abstractions through
thoughtful reduction and organization. The architect
leads the design of the structural foundation upon
which the solution is built by the team. The architect
works collaboratively with every team member to
remove accidental complexity and pursues simplicity
in the design.
Architect
Correctly addressing quality attributes is one of the
most visible areas of architects work.
Learning to master the nonfunctional requirements is a
skill that architects acquire with experience.
Translate nonfunctional requirements into restrictions
and make them explicit knowledge shared by the
whole team.
A factor often underestimated is that explicit and
highly visible elements are always taken into
consideration by the team. As such, restrictions are the
visible elements that guide the work and help
determine whether the team has satisfied the
nonfunctional requirements.
Improving External Quality Using
Restrictions
The most common mistake when specifying software is the lack of a
clearly defined set of restrictions that summarize the required quality.
A restriction imposes conditions that set a limit to comply with.
SMART principle suggests that a restriction should be:
Specific: It should target a piece of functionality that is small, consistent, and
simple.
Measurable: It imposes a limit that is measurable; otherwise, how would you
know when youve addressed it?
Attainable: It is recognized as achievable by the team.
Relevant: It is directly related, connected, and pertinent to the nonfunctional
requirement.
Traceable: It is linked with a functional requirement that justifies why it exists.
Explicitly setting restrictions is a simple and obvious step to start with.
This simplifies the design by setting a goal that will be recognized and
shared by the whole team. When this first step is done correctly, those
restrictions can guide the team to successfully address nonfunctional
requirements.
Example
Given the buyer is a student, Restrict with response time
less than 5 seconds.
Given the buyer is user 'KnownBuyer' Restrict with the
buyer to be authenticated positively
Given the buyer is user 'UnknownBuyer' Restrict with the
buyer to be authenticated negatively Then issue is saved in
security database and user is redirected to "Login" page
Imagine that the software should not handle more than
10,000 concurrent users. You could express the restriction
as this: Restrict after 10001 occurrences with a failed login
Then user is redirected to page "Server unavailable. Please
try later.
Testing Restrictions with Proven
Practices
Non functional Requirement Testing practice
Correctness Acceptance testing
Performance Measure response time and inspect throughput