SlideShare une entreprise Scribd logo
1  sur  82
Télécharger pour lire hors ligne
Intro to OOD
  Oleg Yaroshevych, 2012
Why
What
Scope
The Process
Process




Object-Oriented Analysis
Process




Object-Oriented Design
Process


    Why OOD
 Simplifies System Evolution
Define Likely to Change Aspects
 A Common Design Vocabulary
         Anti Patterns
Process


OOD Process
 Context And Modes
    Architecture
  Principal Objects
   Design Models
  Object Interfaces
Process: OOD Principles



Design Quality in From
      The Start
Process: OOD Principles


Clarity and Simplicity
Process: OOD Principles



Separate Mutable and
 Immutable Aspects
Process: OOD Principles


Single Responsibility
Process: OOD Principles


Data Abstraction
Process: OOD Principles


Loose Coupling
Process: OOD Principles


Dependency Inversion
Process: OOD Principles

Dependency Injection and
  Inversion of Control
Process: OOD Principles


Interface Segregation
Process




OOD Examples
Process


OOD Problems
    Redundant Models
 Premature Optimization
 Lack of Abstract Thinking
Process




OOP
Process


     Why OOP
Ability to Design Big-Ass Systems
            Stability
           Reusability
Process


         OOP Principles
  Objects Are Independent and Encapsulate State
Functionality is Expressed in Terms of Object Services
     Objects Communicate by Message Passing
Process


Proc vs OOP
Process


Summary
UML
UML


        Why UML
      Same Models in All Stages
             Abstraction
Model The Concept, Not Implementation
 “Big Picture" of The System is Useful
UML


Sequence Diagram
UML


State Diagram
UML


Class Diagram
UML


      Problems
No One Knows How to Draw Properly
      Stick to Code for Code
      It Is a Huge Language
Patterns
Patterns


Why Patterns
Keep It Simple, Do Not Comment
   Talk Patterns, Not Objects
       Name The Thing
GOF Patterns
GOF Patterns


Observer
GOF Patterns




Template Method
GOF Patterns


Strategy
GOF Patterns




 Proxy
GOF Patterns




Iterator and Visitor
GOF Patterns


Facade
GOF Patterns


Decorator
Enterprise Patterns
Enterprise Patterns


Domain Logic Patterns
       Transaction Script
         Active Record
        Domain Model
Enterprise Patterns




  ID Field
Enterprise Patterns




Identity Map
Enterprise Patterns




Repository
Enterprise Patterns


Embedded Value
Enterprise Patterns




Query Object
Enterprise Patterns




Lazy Loading
Enterprise Patterns




Unit Of Work
Enterprise Patterns


Data Mapper
Enterprise Patterns


Table Inheritance
   Single Table Inheritance
   Class Table Inheritance
  Concrete Table Inheritance
Enterprise Patterns



 Null Object
(Special Case)
Enterprise Patterns




Separated Interface
Enterprise Patterns


 Gateway
Enterprise Patterns


Record Set
Enterprise Patterns




Service Locator
Enterprise Patterns



     Immutable
(Read-Only Interface)
Enterprise Patterns




Marker Interface
Enterprise Patterns




Object Pool
Enterprise Patterns




 Registry
Enterprise Patterns


Layered Architecture
Enterprise Patterns




Layer Supertype
Enterprise Patterns




Dynamic Linkage
Enterprise Patterns




Concurrency
Enterprise Patterns




Producer-Consumer
Patterns


MVC
Patterns


MVC in Web Apps
Patterns


Domain-Specific Patterns
         User Interface
         Secure Design
          Web Design
        Business Model
Patterns


      Problems
         Keep It Simple
     You Ain't Gonna Need It
Some Patterns Are Not Appropriate
Architecture
Architecture




 DDD
Architecture


DDD Principles
 The Ubiquitous Language
      Serialization
        Services
        Layering
Architecture


  SOA
Architecture


   When to use SOA
     Advanced security, logging, quotas
          Services Are Autonomous
Services Share Schema and Contract, Not Class
Architecture




Onion
Architecture




Why Onion?
Architecture


Onion Diagram
Architecture


  Onion Problems
       It Ain’t Universal Pattern
Requires Knowledge of Complex Concepts
      Hard to Define System Core
Summary
   Process
  Patterns
 Architecture
   Simple!
Reference
                                                Books

                                   Bishop J. - C# 3.0 Design Patterns

                   Design Patterns Elements of Reusable Object-Oriented Software

                      Mark Priestley - Practical Object-oriented Design with UML

                  Object-Oriented Analysis and Design Using UML. Sun microsystems

                     Object Oriented Design Standards. The Corelinux Consortium

                          Scott Millett - Professional ASP.NET Design Patterns

Elisabeth Freeman, Eric Freeman, Bert Bates, Kathy Sierra, Elisabeth Robson - Head First Design Patterns

                                            Presentations

               http://www.slideshare.net/spriebsch/advanced-oop-and-design-patterns

                      http://www.slideshare.net/sudarsun/object-oriented-design

                               http://www.slideshare.net/elfuchs/o-o-d
Links
                                           Demo Code

                          https://github.com/yaroshevych/OnionReference

                                My Github and Slideshare profiles

                                    http://yaroshevy.ch/about

                                             Images

          David Gallard http://www.flickr.com/photos/mrguep/4203634376/in/photostream/

Joanjo Aguar Matoses http://www.flickr.com/photos/joanjo_aguar_matoses/4624775173/in/photostream/

     Adam Wyles http://www.flickr.com/photos/the-travelling-bum/5262087254/in/photostream/

         Don Buciak II http://www.flickr.com/photos/donbuciak/5448599489/in/photostream/

          David Gallard http://www.flickr.com/photos/mrguep/4202876501/in/photostream/

  Francisco Gonzalez http://www.flickr.com/photos/franciscojgonzalez/8087008004/in/photostream/

          David Gallard http://www.flickr.com/photos/mrguep/4203635248/in/photostream/

                                            License

                CC BY-NC-ND 2.0 http://creativecommons.org/licenses/by-nc-nd/2.0/

Contenu connexe

Tendances

Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo designConfiz
 
SOLID Principles and Design Patterns
SOLID Principles and Design PatternsSOLID Principles and Design Patterns
SOLID Principles and Design PatternsGanesh Samarthyam
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questionsjbashask
 
The Smells Of Bad Design
The Smells Of Bad DesignThe Smells Of Bad Design
The Smells Of Bad Designguest446c0
 
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupAdnan Masood
 
SOLID Design Principles applied in Java
SOLID Design Principles applied in JavaSOLID Design Principles applied in Java
SOLID Design Principles applied in JavaIonut Bilica
 
Design for Testability
Design for Testability Design for Testability
Design for Testability Pawel Kalbrun
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDDnunick
 
Design Patterns Course
Design Patterns CourseDesign Patterns Course
Design Patterns CourseAhmed Soliman
 
Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeGanesh Samarthyam
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETjbandi
 
Brief introduction into dependencies
Brief introduction into dependenciesBrief introduction into dependencies
Brief introduction into dependenciesJoel Krebs
 
C++ & Design Patterns Quicky
C++ & Design Patterns QuickyC++ & Design Patterns Quicky
C++ & Design Patterns QuickyNikunj Parekh
 

Tendances (20)

Solid Principle
Solid PrincipleSolid Principle
Solid Principle
 
Design Smells
Design SmellsDesign Smells
Design Smells
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
 
SOLID Principles and Design Patterns
SOLID Principles and Design PatternsSOLID Principles and Design Patterns
SOLID Principles and Design Patterns
 
Java Design Pattern Interview Questions
Java Design Pattern Interview QuestionsJava Design Pattern Interview Questions
Java Design Pattern Interview Questions
 
Software Design patterns on Android English
Software Design patterns on Android EnglishSoftware Design patterns on Android English
Software Design patterns on Android English
 
The Smells Of Bad Design
The Smells Of Bad DesignThe Smells Of Bad Design
The Smells Of Bad Design
 
SOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User GroupSOLID Principles of Refactoring Presentation - Inland Empire User Group
SOLID Principles of Refactoring Presentation - Inland Empire User Group
 
Dtacs
DtacsDtacs
Dtacs
 
SOLID Design principles
SOLID Design principlesSOLID Design principles
SOLID Design principles
 
SOLID Design Principles applied in Java
SOLID Design Principles applied in JavaSOLID Design Principles applied in Java
SOLID Design Principles applied in Java
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Design for Testability
Design for Testability Design for Testability
Design for Testability
 
Dependency injection
Dependency injectionDependency injection
Dependency injection
 
TorontoRb Intro to BDD
TorontoRb   Intro to BDDTorontoRb   Intro to BDD
TorontoRb Intro to BDD
 
Design Patterns Course
Design Patterns CourseDesign Patterns Course
Design Patterns Course
 
Applying Refactoring Tools in Practice
Applying Refactoring Tools in PracticeApplying Refactoring Tools in Practice
Applying Refactoring Tools in Practice
 
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NETNDC 2011 - SpecFlow: Pragmatic BDD for .NET
NDC 2011 - SpecFlow: Pragmatic BDD for .NET
 
Brief introduction into dependencies
Brief introduction into dependenciesBrief introduction into dependencies
Brief introduction into dependencies
 
C++ & Design Patterns Quicky
C++ & Design Patterns QuickyC++ & Design Patterns Quicky
C++ & Design Patterns Quicky
 

En vedette

Sigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentSigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentKingsley Uyi Idehen
 
Object Oriented Design And Programing
Object Oriented Design And ProgramingObject Oriented Design And Programing
Object Oriented Design And ProgramingEmmanuel Fuchs
 
Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Shahadat Hossain Shakil
 
Mypresentation
MypresentationMypresentation
MypresentationSukh14
 
Structured systems analysis and design methodology
Structured systems analysis and design methodologyStructured systems analysis and design methodology
Structured systems analysis and design methodologyVatsana Technologies Pte Ltd
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using ComputerDavid Livingston J
 
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYFINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYnishimanglani
 
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Vytautas Čyras
 
Machine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewMachine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewVincenzo Lomonaco
 
Artificial Intelligence
Artificial Intelligence Artificial Intelligence
Artificial Intelligence Muhammad Ahad
 
Akka Finite State Machine
Akka Finite State MachineAkka Finite State Machine
Akka Finite State MachineKnoldus Inc.
 
Finite State Machine | Computer Science
Finite State Machine | Computer ScienceFinite State Machine | Computer Science
Finite State Machine | Computer ScienceTransweb Global Inc
 

En vedette (19)

Sigma Knowledge Engineering Environment
Sigma Knowledge Engineering EnvironmentSigma Knowledge Engineering Environment
Sigma Knowledge Engineering Environment
 
Slide 3 musfique
Slide 3 musfiqueSlide 3 musfique
Slide 3 musfique
 
Object Oriented Design And Programing
Object Oriented Design And ProgramingObject Oriented Design And Programing
Object Oriented Design And Programing
 
Thinking and language
Thinking and languageThinking and language
Thinking and language
 
Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”Solving a “Transportation Planning” Problem through the Programming Language “C”
Solving a “Transportation Planning” Problem through the Programming Language “C”
 
Mypresentation
MypresentationMypresentation
Mypresentation
 
Structured systems analysis and design methodology
Structured systems analysis and design methodologyStructured systems analysis and design methodology
Structured systems analysis and design methodology
 
Problem solving using Computer
Problem solving using ComputerProblem solving using Computer
Problem solving using Computer
 
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHYFINITE STATE MACHINE AND CHOMSKY HIERARCHY
FINITE STATE MACHINE AND CHOMSKY HIERARCHY
 
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
Visualization of Hajime Yoshino’s Logical Jurisprudence. IRIS 2017
 
Machine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An OverviewMachine Learning for Automated Reasoning: An Overview
Machine Learning for Automated Reasoning: An Overview
 
Artificial Intelligence
Artificial Intelligence Artificial Intelligence
Artificial Intelligence
 
Akka Finite State Machine
Akka Finite State MachineAkka Finite State Machine
Akka Finite State Machine
 
Structured Analysis and Structured Design
Structured Analysis and Structured DesignStructured Analysis and Structured Design
Structured Analysis and Structured Design
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
Introduction to Prolog
Introduction to PrologIntroduction to Prolog
Introduction to Prolog
 
Finite State Machines - Why the fear?
Finite State Machines - Why the fear?Finite State Machines - Why the fear?
Finite State Machines - Why the fear?
 
Finite State Machine | Computer Science
Finite State Machine | Computer ScienceFinite State Machine | Computer Science
Finite State Machine | Computer Science
 
Cldch8
Cldch8Cldch8
Cldch8
 

Similaire à Introduction to Object Oriented Design

.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for EnterprisesWade Wegner
 
Evolutionary Design Solid
Evolutionary Design SolidEvolutionary Design Solid
Evolutionary Design SolidSai Venkat
 
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - LectureSurvive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - LectureRainer Winkler
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
Zoom as a Paradigm for Linked Open Usable Data
Zoom as a Paradigm for Linked Open Usable DataZoom as a Paradigm for Linked Open Usable Data
Zoom as a Paradigm for Linked Open Usable DataRobert Sanderson
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014Endava
 
No Feature Solutions with SharePoint
No Feature Solutions with SharePointNo Feature Solutions with SharePoint
No Feature Solutions with SharePointmikehuguet
 
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"Sergii Bielskyi "Azure Logic App and building modern cloud native apps"
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"Fwdays
 
Odi course curriculumn
Odi course curriculumnOdi course curriculumn
Odi course curriculumnAmit Sharma
 
From Website To Webapp Shane Morris
From Website To Webapp   Shane MorrisFrom Website To Webapp   Shane Morris
From Website To Webapp Shane MorrisShane Morris
 
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...Alexandr Savchenko
 
"Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa..."Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa...Fwdays
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical coursesMontek1Learning
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarShubhra Kar
 

Similaire à Introduction to Object Oriented Design (20)

.NET Architecture for Enterprises
.NET Architecture for Enterprises.NET Architecture for Enterprises
.NET Architecture for Enterprises
 
Evolutionary Design Solid
Evolutionary Design SolidEvolutionary Design Solid
Evolutionary Design Solid
 
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - LectureSurvive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
Survive the Chaos - S4H151 - SAP TechED Barcelona 2017 - Lecture
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
Zoom as a Paradigm for Linked Open Usable Data
Zoom as a Paradigm for Linked Open Usable DataZoom as a Paradigm for Linked Open Usable Data
Zoom as a Paradigm for Linked Open Usable Data
 
CG_CS25010_Lecture
CG_CS25010_LectureCG_CS25010_Lecture
CG_CS25010_Lecture
 
Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014
LogiLogicless UI prototyping with Node.js | SuperSpeaker@CodeCamp Iasi, 2014
 
No Feature Solutions with SharePoint
No Feature Solutions with SharePointNo Feature Solutions with SharePoint
No Feature Solutions with SharePoint
 
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"Sergii Bielskyi "Azure Logic App and building modern cloud native apps"
Sergii Bielskyi "Azure Logic App and building modern cloud native apps"
 
Odi course curriculumn
Odi course curriculumnOdi course curriculumn
Odi course curriculumn
 
From Website To Webapp Shane Morris
From Website To Webapp   Shane MorrisFrom Website To Webapp   Shane Morris
From Website To Webapp Shane Morris
 
Design pattern
Design patternDesign pattern
Design pattern
 
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
PHPFrameworkDay 2020 - Different software evolutions from Start till Release ...
 
"Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa..."Different software evolutions from Start till Release in PHP product" Oleksa...
"Different software evolutions from Start till Release in PHP product" Oleksa...
 
Software Design
Software DesignSoftware Design
Software Design
 
Design patterns
Design patternsDesign patterns
Design patterns
 
Syllabus for Technical courses
Syllabus for Technical coursesSyllabus for Technical courses
Syllabus for Technical courses
 
Node.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns WebinarNode.js Frameworks & Design Patterns Webinar
Node.js Frameworks & Design Patterns Webinar
 
Django
DjangoDjango
Django
 

Introduction to Object Oriented Design