Software Engineering - Universitetet i...
Transcript of Software Engineering - Universitetet i...
Software Development Method by Jan Pettersen Nytun, page 1
Software Engineering
A systematic approach to the analysis, design, implementation
and maintenance of software.
Software Development Method by Jan Pettersen Nytun, page 2
Software Engineering Methods
• Most methods consist of both a modelling language and a process (who is doing what and when).
• The modelling language - the notation - typically includes some visual language (different types of diagrams).
• A tool to support the method is also crucial.
Software Development Method by Jan Pettersen Nytun, page 3
UML Is Not a Process • The UML is intentionally process independent - Different domain
may require different processes.
• But the UML authors promote a development process that is (examples of methods: The Unified Software Development Process and RUP)
• use-case-driven
• incremental and iterative
• architecture centric
Software Development Method by Jan Pettersen Nytun, page 4
• The Management Process - schedules work, deliveries and resources, monitor progress.
• The management process is controlling The Development Process – which is about developing software from requirements.
• Some methods contains both processes, e.g. RUP; others
are mostly development processes, like Catalysis, and others again are management processes, e.g. Dynamic Systems Development Method (DSDM).
Software Development – Two Processes at the Same Time
Software Development Method by Jan Pettersen Nytun, page 5
Heavy-weight And Light-weight Software Processes
• Heavy-weight: – many rules, practices and documents. Example: Standard
RUP (RUP can also be adapted to be a light-weight process).
• Light-weight: – few rules and practices or some that are easy to follow.
• Agile processes are examples of light-weight processes:
– Customer collaboration, responding to change, and focus on working software over documentation.
Software Development Method by Jan Pettersen Nytun, page 6
Software Process Models
• The waterfall model (the “original” version): Requirements are defined first and each phase is ended before moving to the next phase.
• Evolutionary, incremental and iterative development: Requirements are covered gradually and the system is delivered in releases.
The waterfall model of software development
Operation and Maintenance
Design Purpose: Transform the products of
the analysis phase into a more precise description that can be refined into an
executable program.
Implementation Purpose: Transform the products of the
design phase into concepts that can be executed on the computer.
Unit testing.
Testing and Integration System Testing
Requirements Analysis and Capture Purpose: Understand the problem domain and the system to be implemented; communicate with end
users and document the requirements.
Software Development Method by Jan Pettersen Nytun, page 8
Requirements Analysis and Capture - 1
A requirement is a wanted property or behavior of a system.
There are two types of requirements: – Functional – Nonfunctional
From Wikipedia In requirements engineering, a nonfunctional
requirement is a requirement that specifies criteria that can be used to judge the operation of a system, rather than specific behaviours. This should be contrasted with functional requirements that define specific behaviours or functions.
Software Development Method by Jan Pettersen Nytun, page 9
Requirements Analysis and Capture – 2
Functional Requirements
• Functional requirements are often modeled with use cases. – A use case is a short story describing a particular use of
the system; a dialogue between an actor and the system. – Visualized with a use case diagram and a descriptive text!
• Sometimes the user interface is developed or a prototype of the system is made.
Software Development Method by Jan Pettersen Nytun, page 10
Requirements Analysis and Capture - 3
Nonfunctional Requirements
• Reliability, Security (observable at run time )
• Testability, maintainability, extensibility and scalability (embodied in the static structure of the software system )
From Wikipedia:
Software Development Method by Jan Pettersen Nytun, page 11
Requirements Analysis and Capture - 3
Nonfunctional Requirements
• Examples: – From Wikipedia: A system may be required to present the
user with a display of the number of records in a database. This is a functional requirement. How up-to-date this number needs to be is a non-functional requirement.
– The data should be stored on ASCII files.
Software Development Method by Jan Pettersen Nytun, page 12
Perspectives when it comes to diagrams - one possible way to classify this
• Conceptual: – The concepts of the problem domain are addressed. – Analysis class diagrams – PIMs.
• Specification: – This perspective is typically employed under (early)
design (PIM/PSM). – Interfaces is typically specified, but not the
implementation.
• Implementation: – Class diagrams reflects the classes to implement – PSMs.
closer to the actual software solution
Software Development Method by Jan Pettersen Nytun, page 13
Requirements Analysis and Capture - 4 Domain Model
High Level Conceptual Model
• When you make a domain model you capture/understand the key concepts of the problem domain.
• A domain model is typically visualized with class diagrams.
Software Development Method by Jan Pettersen Nytun, page 14
Car
Person owner
Reality The Domain
Domain Model Concepts From The Domain
DESCRIBE AND UNDERSTAND THE MAIN CONCEPTS WITHIN THE DOMAIN
It is a sort of “thinking model”
Software Development Method by Jan Pettersen Nytun, page 15
• The domain model is less detailed and precise than a design model, e.g., use only a subset of UML, it is not large.
• The same domain model may be used as basis for many applications - so keep the latest version…
• Often there is a glossary of terms that describes the domain classes and other classes. It is important to have a common vocabulary!
Requirements Analysis and Capture - 5 Domain Model -
A Simple OO Model
Software Development Method by Jan Pettersen Nytun, page 16
• Deals with objects and functions that will be programmed.
• Some classes from the Domain Model may be used and extended with operations.
• Classes necessary for the implementation are added.
• The operations can be modeled with sequence diagrams – showing responsibility and interaction.
Design
Software Development Method by Jan Pettersen Nytun, page 17
• The design ends up with an implementation model.
• Automatic or manual mapping to code. • The implementation model is a full specification
of the system. • You can trace back from this model to the
models on higher levels of abstraction.
Design / Implementation Model
Software Development Method by Jan Pettersen Nytun, page 18
• The number of models and which abstraction levels to operation on is a matter of choice – there is no “completely right or wrong“.
• The larger (complex) the system, the more time should be spent on modeling.
Relationships Between The Different Models - 1
Software Development Method by Jan Pettersen Nytun, page 19
• Generally (waterfall):
– You go from more abstract models and end up with implementation models.
– More and more details are added. – You go from more logical models to more
concrete ones. You go from PIMs to PSMs.
– You go from a user point of view to an implementation point of view.
Relationships Between The Different Models - 2
Software Development Method by Jan Pettersen Nytun, page 20
• Domain Model (conceptual model/PIM): – Concepts of the domain (real world classes) – Analysis (requirement)
• Type Model (conceptual/specification model/PIM): – Software types that should be covered by the system – Analysis / preliminary design
• Design Model (specification/PIM/PSM): – Classes (with operations) that will be implemented
• Implementation Model (PSM): – A fully specified system that can be mapped to code
Models – An Example
Software Development Method by Jan Pettersen Nytun, page 21
Problem Domain
Domain Model (an analysis model)
Analysis/Type Model
Design Model
Implementation Model
Code / Implemented System
Map to code
Refine
What is needed in the system
How should the system work
Install
Understand
Static path
use case 1
use case 2
class X
attribut1 ....
<x>does<y>
....
Domain Model
Use Case Texts
Test Cases
use case 1
use case 2
void func1() {......} ......
Methods
class X{ .... }
.....
Coding
class X
attribut1 ....
method()
Design level Diagrams
class Y
attribut1 ....
Sequence Diagrams
obj1
met1() Obj2
Functional path
Use Cases
Requirements Analysis and Capture Design Implementation Testing
Software Development Method by Jan Pettersen Nytun, page 23
Iterative Development • [2] “The waterfall method should only be used
when the requirements are well understood and unlikely to change radically during system development.”
• [1] “As the developer work with a system and understand it better, the model must be iterated at all levels to capture that understanding; it is impossible to understand a large system in a single, linear pass.”
Software Development Method by Jan Pettersen Nytun, page 24
Iterative and incremental development. • Each cycle consist of one or more of the process components
(requirement, design,...), typically only a part (an increment) of the required functionality is implemented through each cycle.
• At each cycle the requirements are verified and validated, this can lead to changed requirements.
• In each cycle the most risky functionality is addressed, the cycle is aimed at eliminating the risk. In this way serious problems is exposed at an early stage, in some cases this can lead to termination of the project.
Requirements / Analysis Design Implementation Testing Requirements .... First Cycle ....
Software Development Method by Jan Pettersen Nytun, page 25
Types of risks • The requirements do not specify the right system.
• The selected technology is not adequate for solving the given types of problems.
• People with the right skills are not available to the project.
• There are political forces that will try to stop or delay the project.
Software Development Method by Jan Pettersen Nytun, page 26
High-level View Of The Development Phases (Unified Modeling Process)
• Inception - the vision of the project is received; initial ideas are discussed; a go-ahead of the project is given.
• Elaboration - the project is planned. Features and architecture is elaborated.
• Construction - the system is developed through a series of iterations.
• Transition - the product is set in production. User training is given.
• Analysis, design,… are called modeling stages, these are not synchronized with the development phases. In each phase the cycle of requirement, design, implementation and testing is preformed repeatedly.
Software Development Method by Jan Pettersen Nytun, page 27
The Development Process
At each phase several complete cycles are possible.
In the beginning requirements capture and analysis is focused, the other process components are more important later on.
Inception
R/A = Requirements / Analysis
D = Design
I = Implementation
T = Testing
R/A R/A R/A D A D I I T I T
Elaboration Construction Transition
Example of development process:
D
Software Development Method by Jan Pettersen Nytun, page 28
References • [1] James Rumbaugh , Ivar Jacobson, Grady Booch: The Unified Modeling Language
Reference Manual. Addison-Wesley, 1999
• [2] Ian Sommerville: Software Engineering, Eight Edition. Addison-Wesley, 2007
• Grady Booch, James Rumbaugh and Ivar Jacobson: The Unified Modeling Language User Guide. Addison-Wesley, 1999
• James Rumbaugh, Michael Blaha, William Premerlani, Frederick Eddy and William Lorenzen: Object-Oriented Modeling and Design. Prentice Hall, 1991
• Martin Fowler with Kendall Scott: UML Distilled. Addison-Wesley, 1997
• Terry Quatrani: Visual Modeling with Rational Rose and UML. Addison-Wesley, 1998
• Ari Jaaksi: A Method for Your First Object-Oriented Project. JOOP - The Journal of Object-Oriented Programming, Januar 1998
• Rational software: http://www.rational.com/uml/documentation.html