BDSA Introduction to OOAD Jakob E. Bardram
Programming is Fun Developing Quality Software is Hard. Craig Larman in [OOAD] book 2
Object-Oriented Analysis & Design (OOAD) This Lecture Unified Modeling Language (UML) Iterative, Evolutionary, and Agile Approaches to SE Case Studies 3
Object-Oriented Analysis & Design 4
Objective Think in Objects Analyze requirements with use cases Create domain models Apply an iterative & agile Unified Process (UP) Relate analysis and design artifacts Read & write highfrequency UML Practice Apply agile modeling Design object solutions Assign responsi bilities to objects Design collaborations Design with patterns Design with architectural layers Understand OOP (e.g., Java/C#) mapping issues 5
Overview OOA/D Patterns UML notation Topics and Skills Principles and guidelines Requirements analysis Iterative development with an agile Unified Process 6
Analysis and Design? Analysis investigation what best qualified Design solution how best qualified Requirements analysis Domain analysis Architectural analysis Object design Pattern design Database design UI design 7
Object-Oriented Analysis and Design? Object-Oriented Analysis Object-Oriented Design Important domain concepts or objects? Design of software objects Vocabulary Visualized in the UP Domain Model Responsibilities Collaborations Design patterns Visualized in the UP Design Model 8
Flight Information System domain concept Plane tailnumber visualization of domain concept representation in an object-oriented programming language public class Plane { private String tailnumber; public List getflighthistory() {...} } 9
Look at example on p. 8 Dice Game A Short Example Define Use Cases Define the Domain Model Assign Object Responsibility Draw Interaction Diagrams Design Class Diagrams That s all folks! The rest are details ;-) 10
Unified Modeling Language UML 11
UML Object Management Group definition The Unified Modeling Language is a visual language for specifying, constructing and documenting the artifacts of systems [OMG] 12
Why UML? Provide users a expressive visual modeling language. Facilitate communication among developers UML became the lingua franca in modeling. Incorporate the object-oriented community s consensus on core modeling concepts. Provide extensibility and specialization mechanisms to extend the core concepts. Be independent of particular programming languages and development processes. Provide a formal basis for understanding the modeling language. Support the creation of object-oriented CASE tools. Support higher-level development concepts such as collaborations, frameworks, patterns, and components. Win the war of notations. 13
UML 3 views on UML UML as sketch UML as blueprint Before ~ specification After ~ documentation UML as a programming language In the OOAD book Just a diagramming notation standard. Trivial and relatively unimportant. Not a method, process, or design guide In this course you need to be able to draw syntactically correct UML diagrams important part of the exam 14
UML Examples Use Case Diagram NextGen POS Process Sale Cashier «includ e» «includ e» «includ e» «act or» Accounting System UML notation : the base use case points to the included use case Custom er Handle Check Payment Handle Cash Payment «includ e» «includ e» «includ e» Process Rental Handle Credit Payment «act or» Cred it Authorization Service Handle Return s Ma nage User s... 15
UML Examples Class Diagram amount : Money Payment Cash Payment Credit Payment Check Payment 16
UML Examples Interaction Diagram :Customer :NextGenPOS System «actor» :CreditAuthorization Service «actor» :Accounts makecreditpayment (crednum, expirydate) reply = requestapproval( request ) postreceivable( receivable ) postsale( sale ) 17
UML History Mid 90's 50 different Object-Oriented Analysis and Design (OOAD) notations and methods, incl. 2-3 Danish ones (!) Oct 95 Grady Booch and James Rumbaugh publish Unified Method 0.8 Ivar Jacobson joined Rational June 96 Unified Modeling Language 0.9 Nov 97 UML 1.1 was adopted as industry standard by Object Management Group June 98 First conference on UML (at that time a workshop) June 99 UML 1.3 (model interchange included) March 2003 UML 1.5 (Action Language included) 2005.. UML 2.0 UML 2.4.1 was formally released in August 2011. 18
Iterative, Evolutionary, and Agile Software Development Processes 19
The Rational Unified Process A modern process model derived from the work on the UML and associated process. Normally described from 3 perspectives A dynamic perspective that shows phases over time; A static perspective that shows process activities; A practice perspective that suggests good practice. 20
The Rational Unified Process development cycle iteration phase inc. elaboration construction transition milestone An iteration endpoint when some significant decision or evaluation occurs. release A stable executable subset of the final product. The end of each iteration is a minor release. increment The difference (delta) between the releases of 2 subsequent iterations. final production release At this point, the system is released for production use. 21
Inception Establish the business case for the system. Elaboration RUP phases Develop an understanding of the problem domain and the system architecture. Construction System design, programming and testing. Transition Deploy the system in its operating environment. 22
Develop software iteratively Manage requirements Use component-based architectures Visually model software Verify software quality Control changes to software RUP Good Practice Ea rly iter ation s ar e farther fr om the "tru e path" of the system. V ia feedback and adaptation, the system converges towards the most appr opriate requireme nts an d design. In late iterations, a significant change in requir ements is ra re, but can occur. Such late changes may give an organization a competitive business advantage. one iteration of de sign, implement, integrate, an d test 23
Less project failure Better productivity, lower defect rates Early mitigation of high risks Documented Benefits Technical, requirements, objectives, usability, Early visible progress Early feedback User engagement, adaptation while progressing Managed complexity Team not overwhelmed by Analysis Paralysis Short feedback loops Improve on learning, which can be applied in later iterations 24
RUP Guidelines Timeboxing Each iteration are timeboxed, i.e. has a fixed length (3 w) Don t let waterfall thinking invade an iterative/rup project It happens all the time! Especially if management or customers are involved Beware of things like Yes, we do RUP but let s do a thorough analysis first We need to make a complete requirement specification This tender requires us to plan all in details Let s do it properly no hacking If you can t specify it, you can t built it Iteration are only for stupid programmers who can t plan We cannot afford another iteration we ship what we have 25
Iterative Analysis & Design 1 2 3 4 5... 20 requirements workshops Imagine this will ultimately be a 20- iteration project. In evolutionary iterative development, the requirements evolve over a set of the early iterations, through a series of requirements workshops (for example). Perhaps after four iterations and workshops, 90% of the requirements are defined and refined. Nevertheless, only 10% of the software is built. requirements software requirements software 90% 90% 50% 20% 30% 2% 5% 8% 10% 20% Iteration 1 Iteration 2 Iteration 3 Iteration 4 Iteration 5 a 3-week iteration week 1 M T W Th F week 2 M T W Th F week 3 M T W Th F kickoff meeting clarifying iteration goals with the team. 1 hour team agile modeling & design, UML whiteboard sketching. 5 hours start coding & testing Most OOA/D and applying UML during this period de-scope iteration goals if too much work final check-in and codefreeze for the iteration baseline Use-case modeling during the workshop demo and 2-day requirements workshop next iteration planning meeting; 2 hours 26
Risk-driven Planning Identify and address high risk features first Client-driven Planning Build visible features that the client cares about Ask and encourage early feedback Agile modeling Visual modeling (UML) but sketching Agile Approach Architecture-centric development Start designing, building, and testing core architecture Test-driven development Continuously verify quality; test early, often, and realistically Configuration Management Carefully manage change requests and versions 27
RUP Phases & Disciplines RUP Phases Inception Elaboration Construction Transition OOAD SE/C# N/A Disciplines Business Modeling Requirements Design Implementation Test Deployment Configuration & Change Management Project Management Environment 28
RUP Phases development cycle iteration phase inc. elaboration construction transition milestone An iteration endpoint when some significant decision or evaluation occurs. release A stable executable subset of the final product. The end of each iteration is a minor release. increment The difference (delta) between the releases of 2 subsequent iterations. final production release At this point, the system is released for production use. 29
RUP Diciplines 30
Object-Oriented Analysis & Design (OOAD) Unified Modeling Language (UML) This Lecture Iterative, Evolutionary, and Agile Approaches to SE 31