Object Oriented Design, Unified Process and UML A presentation on the methodologies and techniques we will use to develop the Great Education Books website system.
What is ‘Object Oriented Design’?
Imagine you are driving to work.. Thank god its Friday.. This is a person ‘object’ – you
Imagine you are driving to work..This is a person ‘object’ – you This is a car ‘object’ – your car
Imagine you are driving to work..The person object (you) interacts with the car object bysitting inside the car, activating the ignition and usingthe driving controls.
The person object (you) manipulates the car objects functions To get to the person object’s destination… work
The car object manages its functionsStarting the engine Turning the wheels Managing velocity Ignition Steering wheel Pedals The car object only responds to its controls – it can not drive itself.
The car object is only responsible for manipulating its sub-systemsIt DOES• Talk to its sub-systems (engine, brakes, steering axle etc)It DOES NOT• Manipulate its controls, decide to drive to work.
The person object is only reponsible for manipulating the car controlsIt DOES• Decide to go to work• Manage the car controls in order to operate the carIt DOES NOT• Turn the car wheels himself• Propel the car
Objects should only act in the scope of their design
How is it possible?• Objects have similarities Order 1 Order 2 5 Items 2 Items Customer: Bill Gates Customer: Steve Jobs• Objects similarities are due to a structure. This structure is known as a Class.
How does a ‘class’ fit into Object Oriented Design?• Classes are the ‘blueprints’ for objects. – What an object can do (methods) – What attributes an object can have (attributes) – How an object relates to another object Example: Order class Mailing address
To recap…• Classes are the structure given to objects.• Objects are an instance of a class that exists with actual data applied to the structure.• Objects/Classes are only responsible for what they’re designed for.• Classes and Objects are the two ‘building blocks’ of Object Oriented Design.
Object Oriented Design concepts• Inheritance• Polymorphism• Abstraction• Encapsulation• Information Hiding• Modularity The concepts make object oriented design a very powerful concept.
Inheritance• Classes can be the parents of objects Super Class – ‘Parent’ class Item Sub Class – ‘Child’ class CD Book
Inheritance• Can be multiple Super class 1 super-classes Super class 2 This is a UML Diagram(Domain Class Diagram),which will be explainedlater in the presentation
Polymorphism• Allows different items to behave the same in some circumstances• If we add an E-book and a physical book to a shopping cart, they will both be treated as an ‘Item’ and can be used in that manner.
Abstraction• Used to give important structure to sub-classes• An example of a possible abstract class is the Book class, because a book may be either a physical book or an e-book, but never just a ‘book’ in the eyes of the system, it must be one or the other.
Encapsulation Customer Object
Encapsulation Age restrictionCustomer Object Book Object
Encapsulation AGE Age restriction Customer Object Book ObjectThe date of birth can be given in either Age format or Dateformat as it is encapsulated – the only data that is stored isthe date of birth, but this structure is hidden from otherobjects by encapsulation.
Encapsulation … Mailing Address? Customer Object Order Object MAILING ADDRESSFirst Name Last Name City Street Address
Encapsulation Email AddressFirst Name Customer Object Last NameCity Date Of Birth Street Address Suburb
Information Hiding• Similar to encapsulation due to the way it hides the structure of data from the user What do I change? Does it store AGE Or does it the date of store the age? birth? Customer Object
Information Hiding • Similar to encapsulation due to the way it hides the structure of data from the user What do I change? Useful because the object should be responsible for managing the changing of a date of birth. AGE Other functions should not be able to directly interfere with the data- structure of the object!Customer Object
Modularity• The art of splitting large objects into smaller objects, and combining smaller systems into appropriately sized objects.• Allows the system to easily adapt to changes.. For instance, adding a new item type to the Great Education Books selection..
Modularity• Allows the system to easily adapt to changes.. For instance, adding a new item type to the Great Education Books selection..
Object Oriented is the smart approach• Future-proof• Inter-operability with other systems• The standard of design today
Unified ProcessWhat is Unified Process (UP)?
Unified Process• Iterative• Object-oriented• Software development methodology
Unified Process – Phases and Disciplines
Business Modelling• Not always used in projects• Not iterated: is done at the start of a project• Part of the Inception phase• Goal: To get an understanding of the business environment the system is being developed for OutputsBusiness Use Cases Business Object Model Class Diagram
Requirements• What the system needs to accomplish.• Agreement from both business and software engineers.• Crucial part of the Inception and Elaboration phases, minor part of construction phase.• Is a process that is scheduled for iteration over the life-time of the project.
Requirements OutputsVision Document Business Analysis Use case diagrams Document (Stakeholders, Actors, Processes)
Design • How the system will be realized when it is time for implementation. • Is a process that is scheduled for iteration over the life-time of the project. • Crucial part of the Elaboration phase, and parts of the Inception and Construction phases OutputsClass Diagrams (Domain, System Sequence System DevelopmentDesign) Diagrams
Example domain class diagram work in progress
Implementation• Implements the features identified in the previous disciplines• Utilized extensively in the Construction phase, and to a lesser extent in the Elaboration phase.• Is a process that is scheduled for iteration over the life-time of the project. Outputs System Documentation System Development
Testing• Ensures the quality is up to a certain standard• Mostly utilized during the Construction phase, but happens in each phase• Is a process that is scheduled for iteration over the life-time of the project. Outputs System Development
Deployment• Making the system operational• Migrating old information into new system• Training users• Is not iterative – it happens at the end of a project.• Utilized at the end of a construction phase and at the start of a transition phase Outputs Data Migration User Training System Deployment
Project Management• Project management is a support discipline• Utilized extensively throughout a project, in every phase• Ensures the project is delivered on schedule and meets the needs of stakeholders• Manages – Objective prioritization – Project and iteration schedules – Risk identification and management – Constraint identification and management – Project plan management / maintenance.
Configuration and change management• Ensures that processes are in place for updating systems during iterations• Maintaining different branches of system development• Ensures each developer is operating from the latest configuration / revision of the system.
Environment• Ensures the work environment for system developers is uniform and supported properly with appropriate tools and processes.
UMLStandardized modelling language to modelbusiness and software structure, behaviour, process and architecture.
Behavioural ModellingBehavioural modelling captures what musthappen throughout a system for it toaccomplish its purpose.Example diagrams are Activity Diagrams, Usecase diagrams, and System sequence diagrams.
Activity Diagram: Checkout
Use case diagram
Static ModellingStatic modelling shows fixed relationshipsbetween objects and the data-structure ofobjects within the system.Example diagrams utilized are Domain/DesignClass Diagrams, Object Diagrams, and PackageDiagrams
Example: UnfinishedDomain Class Diagram
Project Plan• Finished documentation: – Top level use case diagram (v2) – Events Table documentation (v2) – First revision Structure diagrams for: Checkout, Manage Cart, Manage Account• To be finished mid-September: – Systems sequence diagrams – Second revision structure diagrams – Relating to: Checkout, Manage Cart, Manage Account