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.
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..
This is a person ‘object’ – you
Thank god its Friday..
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 by sitting inside the car, activating the ignition and using the driving controls.
To get to the person object’s destination… work
The person object (you) manipulates the car objects functions
The car object manages its functions
Starting the engine
Ignition
Turning the wheels
Steering wheel
Managing velocity
Pedals
The car object only responds to its controls – it can not drive itself.
The car object is only responsible for manipulating its sub-systems
It 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 reponsiblefor manipulating the car controls
It DOES
• Decide to go to work
• Manage the car controls in order to operate the car
It 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
• Objects similarities are due to a structure. This structure is known as a Class.
Order 15 Items
Customer: Bill Gates
Order 22 Items
Customer: Steve Jobs
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
Item
CD Book
Super Class – ‘Parent’ class
Sub Class – ‘Child’ class
Inheritance
• Can be multiple super-classes
This is a UML Diagram (Domain Class Diagram), which will be explained later in the presentation
Super class 1
Super class 2
Polymorphism
• Allows different items to behave the same in some circumstances
• If we add an E-book and aphysical book to a shoppingcart, they will both be treatedas an ‘Item’ and can be used in that manner.
Abstraction
• Used to give important structure to sub-classes
• An example of a possible abstractclass 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
Customer ObjectBook Object
Age restriction
Encapsulation
Customer ObjectBook Object
Age restriction
AGE
The date of birth can be given in either Age format or Date format as it is encapsulated – the only data that is stored is the date of birth, but this structure is hidden from other objects by encapsulation.
Encapsulation
Customer Object Order Object
Mailing Address?
…
First Name Last Name
City Street Address
MAILING ADDRESS
Encapsulation
Customer Object
First Name
Last Name
City
Street AddressSuburb
Date Of Birth
Email Address
Information Hiding
• Similar to encapsulation due to the way it hides the structure of data from the user
Customer Object
AGEDoes it store the date of birth?
Or does it store the age?
What do I change?
Information Hiding
• Similar to encapsulation due to the way it hides the structure of data from the user
Customer Object
AGE
What do I change? Useful because the object should be
responsible for managing the changing of a date of birth.
Other functions should not be able to directly interfere with the data-structure of the 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 GreatEducation Books selection..
Object Oriented is the smart approach
• Future-proof
• Inter-operability with other systems
• The standard of design today
Unified Process
What 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
Outputs
Business 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
Outputs
Vision Document Business Analysis Document (Stakeholders, Actors, Processes)
Use case diagrams
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
Outputs
Class Diagrams (Domain, Design)
System Sequence Diagrams
System Development
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 System DeploymentUser Training
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.
UML
Standardized modelling language to model business and software structure, behaviour,
process and architecture.
Behavioural Modelling
Behavioural modelling captures what must happen throughout a system for it to accomplish its purpose.
Example diagrams are Activity Diagrams, Use case diagrams, and System sequence diagrams.
Activity Diagram: Checkout
Use case diagram
Static Modelling
Static modelling shows fixed relationships between objects and the data-structure of objects within the system.
Example diagrams utilized are Domain/Design Class Diagrams, Object Diagrams, and Package Diagrams
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