Software Engineering A systematic approach to the analysis, design, implementation and maintenance of software.
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.
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 – Two Processes at the Same Time 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). The management process is putting the development process “into system”.
Heavy-weight And Light-weight Software Processes 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 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 Requirements Analysis and Capture Purpose: Understand the problem domain and the system to be implemented; communicate with end users and document the requirements. 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. Requirements Analysis and Capture: “Defining the right project”. The result of each phase is one or more documents that are approved. In theory the next phase should not start before the previous phase has finished (it is not iterative) – in practice the phases overlap. A premature freezing of requirements will lead to problems later. Testing and Integration System Testing Operation and Maintenance
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. Functional req. are about specifying “which functions” the system should have – while nonfunctional is about properties concerning these functions, like about the quality of the functions. Non-functional requirements are often called qualities of a system - "quality of service" .
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.
Requirements Analysis and Capture - 3 Nonfunctional Requirements From Wikipedia: Reliability, Security (observable at run time ) Testability, maintainability, extensibility and scalability (embodied in the static structure of the software system )
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.
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
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. when you make a design model you specify the software types/classes you need to solve the problem Purpose: Describe and understand the main concepts within the domain and how these concepts relates to each other and the context of the system.
Reality Domain Model The Domain Person Car Concepts From The Domain owner Car DESCRIBE AND UNDERSTAND THE MAIN CONCEPTS WITHIN THE DOMAIN It is a sort of “thinking model”
Requirements Analysis and Capture - 5 Domain Model - A Simple OO Model 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!
Design 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 / Implementation Model 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.
Relationships Between The Different Models - 1 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 - 2 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.
Models – An Example 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
What is needed in the system Domain Model (an analysis model) What is needed in the system Analysis/Type Model How should the system work Design Model Understand Refine Implementation Model Problem Domain Map to code Code / Implemented System Install
Requirements Analysis Static path Requirements Analysis and Capture Design Implementation Testing Use Cases Domain Model Design level Diagrams void func1() {......} ...... Methods class X{ .... } ..... Coding class X class Y use case 1 class X attribut1 .... attribut1 .... attribut1 .... Test Cases method() Sequence Diagrams obj1 met1() Obj2 use case 1 use case 2 Use Case Texts use case 2 <x>does<y> .... Functional path
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.” Slides gives motivation for iterative development.
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
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.
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.
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. R/A = Requirements / Analysis D = Design I = Implementation T = Testing Example of development process: R/A R/A R/A D A D I D I T I T Inception Elaboration Construction Transition
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