Software Engineering
Software Engineering
Software Engineering
[Type the abstract of the document here. The abstract is typically a short
summary of the contents of the document. Type the abstract of the document
here. The abstract is typically a short summary of the contents of the document.]
2
Overview
• Why can’t we find all errors before we give the software to our
customers?
Software
• System software
• Application software
• Embedded software
• Web-Applications
• Open-world computing
○ Creating software to allow machines of all sizes to
communicate with each other across vast networks
• Netsourcing
○ Architecting simple and sophisticated applications that
benefit targeted end-user markets worldwide
• Open Source
○ Distributing source code for computing applications so
customers can make local modifications easily and
reliably
• Network intensive
• Concurrency
• Unpredictable load
• Availability (24/7/365)
5
• Data driven
• Content sensitive
• Continuous evolution
• Security
• Aesthetics
Software Engineering
Essence of Practice
Software Creation
Overview
Software Process
• Communication
• Planning
• Modeling
• Construction
• Deployment
• Risk management
• Measurement
• Reusability management
Process Flow
Task Sets
• Small one person projects do not require task sets that are as
large and detailed as complex projects team oriented project
task sets
Process Patterns
14
• Type
○ Stage patterns (define problems with a framework
activity for the process)
○ Task patterns (define problems associated with
engineering action or work task relevant to successful
software engineering practice)
○ Phase patterns (define the sequence or flow of
framework activities that occur within a process)
• Evolutionary Models
○ Prototyping Model (good first step when customer has a
legitimate need, but is clueless about the details, developer
needs to resist pressure to extend a rough prototype into a
production product)
○ Spiral Model (couples iterative nature of prototyping with
the controlled and systematic aspects of the Waterfall
Model)
Unified Process
• Phases
○ Inception phase (customer communication and planning)
• Framework activities
○ Planning (size and resource estimates based on
requirements)
○ High-level design (external specifications developed for
components and component level design is created)
○ High-level design review (formal verification methods
used to uncover design errors, metrics maintained for
important tasks)
○ Development (component level design refined, code is
generated, reviewed, compiled, and tested, metric
maintained for important tasks and work results)
○ Postmortem (effectiveness of processes is determined
using measures and metrics collected, results of analysis
should provide guidance for modifying the process to
improve its effectiveness)
• Objectives
○ Build self-directed teams that plan and track their work,
establish goals, and own their processes and plans
19
○ Implementation
○ Integration and system testing
○ Postmortem
Overview
• While the items on the right are still important the items on
the left are more valuable under this philosophy
Agility
Agile Processes
Agility Principles
Human Factors
○ Collaboration
○ Decision-making ability
○ Self-organization
• Scrum
• Crystal
Extreme Programming
• Values
○ Communication (close, informal between developers and
stakeholders)
○ Simplicity (developers design for current needs, not
future needs)
25
• Key activities
○ Planning (user stories created and ordered by customer
values)
○ Design (simple designs preferred, CRC cards and design
prototypes are only work products, encourages use of
refactoring)
○ Coding (focuses on unit tests to exercise stories,
emphasizes use of pairs programming to create story
code, continuous integration and smoke testing is
utilized)
○ Testing (unit tests created before coding are
implemented using an automated testing framework to
encourage use of regression testing, integration and
validation testing done on daily basis, acceptance tests
focus on system features and functions viewable by the
customer)
Industrial XP
• Readiness acceptance
○ Does an appropriate development environment exists to
support IXP?
○ Will the team be populated by stakeholders?
26
XP Issues
○ Iterative
○ Time-boxed
• Phases
○ Speculation (project initiated and adaptive cycle planning
takes place)
○ Collaboration (requires teamwork from a jelled team,
joint application development is preferred requirements
gathering approach)
28
Scrum
• Scrum principles
○ Small working team used to maximize communication,
minimize overhead, and maximize sharing of informal
knowledge
○ Process must be adaptable to both technical and
business challenges to ensure best product produced
○ Process yields frequent increments that can be
inspected, adjusted, tested, documented and built on
○ Development work and people performing it are
partitioned into clean, low coupling partitions
○ Testing and documentation is performed as the product is
built
○ Provides the ability to declare the product done
whenever required
• Guiding principles
○ Active user involvement
○ Teams empowered to make decisions
Crystal
• FDD Philosophy
○ Emphasizes collaboration among team members
○ Manages problem and project complexity using feature-
based decomposition followed integration of software
increments
○ Technical communication using verbal, graphical, and
textual means
○ Software quality encouraged by using incremental
development, design and code inspections, SQA audits,
metric collection, and use of patterns (analysis, design,
construction)
• Framework activities
○ Develop overall model (contains set of classes depicting
business model of application to be built)
○ Build features list (features extracted from domain
model, features are categorized and prioritized, work is
broken up into two week chunks)
○ Plan by feature (features assessed based on priority,
effort, technical issues, schedule dependencies)
○ Design by feature (classes relevant to feature are
chosen, class and method prologs are written,
preliminary design detail developed, owner assigned to
32
• Eliminate waste
• Build quality in
• Create knowledge
• Defer commitment
• Deliver fast
• Respect people
Agile Modeling
• Modeling principles
○ Model with a purpose
○ Use multiple models
• Architectural modeling
○ Derives preliminary architecture from analysis model
○ Architectural model mist be realistic for the environment
and must be understandable by developers
Overview
1. Be agile
2. Focus on quality at every step
3. Be ready to adapt
4. Build an effective team
5. Establish mechanisms for communications and control
6. Manage change
7. Assess risk
8. Create work products that provide value for others
1. Listen
2. Prepare before you communicate
3. Have a facilitator for any communication meeting
4. Face-to-face communication is best
5. Take notes and document decisions
6. Strive for collaboration
7. Stay focused and modularize your discussion
8. Draw a picture if something is unclear
9. Move on once you agree, move on when you can’t agree,
move on if something unclear can’t be clarified at the moment
10.Negotiation is not a contest or game
Planning Principles
Modeling Classes
Construction Activities
• Coding includes
○ Direct creation of programming language source code
• Testing levels
○ Unit testing
○ Integration testing
○ Validation testing
○ Acceptance testing
41
Coding Principles
Testing Objectives
Testing Principles
Deployment Actions
43
• Delivery
• Support
• Feedback
Deployment Principles
Overview
Requirements Engineering
• Identify stakeholders
Eliciting Requirements
Elicitation Problems
Developing Use-Cases
Use-case template
• Primary actor
• Goal in context
• Preconditions
• Trigger
• Scenario details
• Exceptions
• Priority
• When available
• Frequency of use
• Channel to actor
• Secondary actors
• Open issues
Analysis Model
Analysis Patterns
Negotiating Requirements
• Negotiation activities
○ Identification of system key stakeholders
○ Determination of stakeholders’ “win conditions”
Requirements Models
Domain Analysis
56
Scenario-Based Modeling
• Continue this process for each actor and each system function
Exceptions
Data Objects
Class-based Modeling
• Examine the problem statement and try to find nouns that fit
the following categories and produce or consume information
(i.e. grammatical parse)
○ External entities (systems, devices, people)
60
Defining Operations
Classes
Collaborations
Analysis Packages
Flow-oriented Modeling
• Begin by stripping all the data flow arrows form the DFD
Behavioral Modeling
• Guards limiting the transition from one state to the next may
be specified as Boolean conditions involving object attributes
in the use-case narratives
Analysis Patterns
Content Model
71
Interaction Model
Functional Model
Configuration Model
Navigation Model
Overview
Software Design
A design should
• be modular
Design Concepts
Design Classes
80
Design Model
○ Interface elements
○ Component-level elements
○ Deployment-level elements
Data Design
Architectural Design
• Derived from
○ Information about the application domain relevant to
software
○ Relationships and collaborations among specific analysis
model elements
○ Availability of architectural patterns and styles
Interface Design
• Important elements
○ User interface (UI)
83
Component-Level Design
• Defines
○ Data structures for all local data objects
○ Algorithmic detail for all component processing functions
Deployment-Level Design
Overview
Importance of Architecture
87
Architectural Descriptions
○ Category
88
○ Assumptions
○ Constraints
○ Alternatives
○ Argument
○ Implications
○ Related decisions
○ Related concerns
○ Work products
○ Notes
Architectural Genres
• Artificial intelligence
• Communications
• Content authoring
• Devices
• Financial
• Games
• Government
• Industrial
• Legal
89
• Medical
• Military
• Operating systems
• Platforms
• Scientific
• Tools
• Transportation
• Utilities
• Set of components
Architectural Styles
Architectural Patterns
• Control questions
○ How is control managed within the architecture?
○ Does a distinct control hierarchy exist?
• Data questions
○ How are data communicated between components?
Architectural Design
• All the data that flow into or out of the target system must be
identified
Defining Archetypes
1. Collect scenarios
2. Elicit requirements, constraints, and environmental description
3. Describe architectural styles/patterns chosen to address
scenarios and requirements (module view, process view, data
flow view)
4. Evaluate quality attributes independently (e.g. reliability,
performance, security, maintainability, flexibility, testability,
portability, reusability, interoperability)
5. Identify sensitivity points for architecture (any attributes
significantly affected by variation in the architecture)
6. Critique candidate architectures (from step 3) using the
sensitivity analysis (conducted in step 5)
Architectural Complexity
Transform Mapping
Transaction Mapping
Overview
Component Definitions
• Components
○ Establish naming conventions in during architectural
modeling
○ Architectural component names should have meaning to
stakeholders
101
• Interfaces
○ Use lollipop representation rather than formal UML box
and arrow notation
○ For consistency interfaces should flow from the left-hand
side of the component box
○ Show only the interfaces relevant to the component
under construction
Coupling
Design Notation
• Graphical
○ UML activity diagrams
• Tabular
○ Decision table – subsets of system conditions and actions
are associated with each other to define the rules for
processing inputs and events
Component-Based Development
107
Domain Engineering
Component Qualification
• Factors to consider
○ Application programming interface (API)
○ Development and integration tools required by the
component
○ Run-time requirements (resource usage or performance)
Component Adaptation
Overview
• Define interaction in such a way that the user is not forced into
performing unnecessary or undesired actions
User Categories
• Interface design
• Interface construction
• Interface validation
Validation Considerations
• Use-cases
○ What work will the user perform in specific
circumstances?
• Task elaboration
○ What tasks and subtasks will be performed as the user
does the work?
• Object elaboration
○ What specific problem domain objects will the user
manipulate as work is performed?
• Workflow analysis
○ What is the sequence of work tasks?
• Hierarchical representation
○ What is the hierarchy of tasks?
Interface Design
• Define events (user actions) that will cause the state of the
user interface to change and model this behavior
• Indicate how the user interprets the state of the system from
information provided through the interface
• Where am I?
○ Interface should indicate which WebApp is running
○ Interface should indicate user’s location in content hierarchy
1. Preliminary design
2. Build first interface prototype
3. User evaluates interface
4. Evaluation studied by designer
5. Design modifications made
6. Build next prototype
122
Overview
Design Patterns
Pattern Types
Frameworks
• Name
• Intent
• Aliases
• Motivation
• Applicability
• Structure
• Participants
126
• Collaborators
• Consequences
• Related patterns
Thinking in Patterns
Design Tasks
Common Mistakes
Architectural Patterns
• Top-level navigation
• Card stack
• Fill-in-the-blanks
• Sortable table
• Bread crumbs
• Edit-in-place
• Simple search
• Wizard
• Shopping cart
• Progress indicator
Overview
• Usability
• Functionality
• Reliability
• Efficiency
• Maintainability
• Security
132
• Availability
• Scalability
• Time-to-market
• Simplicity
• Consistency
• Identity
• Robustness
• Navigability
• Visual appeal
• Compatibility
Aesthetic Design
• Layout issues
○ Use white space generously
○ Emphasize content
○ Color schemes
○ Text fonts, sizes, and styles
Content Design
Architecture Design
Navigation Design
Navigation Semantics
138
Navigation Syntax
• Conceptual design
Creates representation of subsystems, classes, and
relationships that define WebApp application domain
UML class and collaboration diagrams may be used
• Navigational design
Identifies navigational objects derived from conceptual
design classes
UML use-cases, state diagrams, and sequence diagrams
may be used
Use of CRC cards may also be helpful
Overview
What is Quality?
Software Quality
• Performance quality
• Feature quality
• Reliability
• Conformance
142
• Durability
• Serviceability
• Aesthetics
• Perception
• Functionality
• Reliability
• Usability
• Efficiency
• Maintainability
• Portability
Measuring Quality
Cost of Quality
Overview
Review Goals
Review Metrics
Review Formality
Informal Reviews
Overview
SQA Questions
SQA Tasks
SQA Goals
• Requirements quality
○ Ambiguity
○ Completeness
○ Volatility
157
○ Traceability
○ Model clarity
• Design quality
○ Architectural integrity
○ Component completeness
○ Interface complexity
○ Patterns
• Code quality
○ Complexity
○ Maintainability
○ Understandability
○ Reusability
○ Documentation
○ Completion rate
○ Review effectiveness
○ Testing effectiveness
Formal SQA
Software Reliability
• Measures of Reliability
Software Safety
160
SQA Plan
161
Overview
Unit Testing
Integration Testing
• Smoke testing
1. Software components already translated into code are
integrated into a build.
2. A series of tests designed to expose errors that will keep the
build from performing its functions are created.
3. The build is integrated with the other builds and the entire
product is smoke tested daily (either top-down or bottom
integration may be used).
Validation Testing
Acceptance Testing
System Testing
Bug Causes
Debugging Strategies
• What could have been done to prevent this bug in the first
place?
174
Overview
• Can you exercise all logical decisions on their true and false
branches?
• Prepare test cases that will force the execution of each path in
the basis set.
• What data rates and data volume can the system tolerate?
• Data flow modeling – nodes are data objects and links are
transformations from one data object to another
Equivalence Partitioning
• BVA guidelines:
1. If input condition specifies a range bounded by values a and b,
test cases should include a and b, values just above and just
below a and b
2. If an input condition specifies and number of values, test cases
should be exercise the minimum and maximum numbers, as
well as values just above and just below the minimum and
maximum values
3. Apply guidelines 1 and 2 to output conditions, test cases
should be designed to produce the minimum and maxim
output reports
180
Model-Based Testing
Specialized Testing
• Real-Time Systems
1. Task testing – test each task independently
182
Testing Patterns
Overview
OO Testing
OO Model Consistency
Comparison Testing
186
OO Fault-Based Testing
187
OO Scenario-Based Testing
• Uncovers errors that occur when any actor interacts with the
OO software
Overview
Dimensions of Quality
• Questions to be answered
○ Is the information factually accurate?
Usability Testing
Compatibility Testing
198
Navigation Testing
• Navigational Links
• Redirects
• Bookmarks
• Site maps
Configuration Testing
• Server-side Issues
Compatibility of WebApp with server OS
Correct file and directory creation by WebApp
System security measures do not degrade user service by
WebApp
Testing WebApp with distributed server configuration
WebApp properly integrated with database software
Correct execution of WebApp scripts
Examination system administration errors for impact on
WebApp
On-site testing of proxy servers
• Client-side issues
Hardware
Operating systems
Browser software
User interface components
Plug-ins
Connectivity
• Firewalls
201
• Authentication
• Encryption
• Authorization
Performance Testing