SlideShare une entreprise Scribd logo
1  sur  24
Object-Oriented Analysis and Design Using UML
Objectives


               In this session, you will learn to:
                – Apply framework and patterns to design the software system
                – Generate code from design model




    Ver. 1.0                                                          Slide 1 of 24
Object-Oriented Analysis and Design Using UML
Understanding Frameworks and Patterns


               A development team tends to reuse its existing solutions to
               reduce the development time and increase quality.
               Reusing an existing solution includes reusing the existing
               code, a component, a test case, or a concept that has been
               implemented in similar projects.
               Frameworks and patterns are standards, which are used to
               make the software components reusable.




    Ver. 1.0                                                       Slide 2 of 24
Object-Oriented Analysis and Design Using UML
Defining Patterns and Frameworks


               Frameworks:
                 Define features that are common to similar applications
                 belonging to a particular domain.
                 Increase reusability and reduce application development time.
                 Microsoft Foundation Classes (MFC) provided with Microsoft
                 VC++ is an example of a framework that allows you to develop
                 Graphical User Interfaces (GUI) having common
                 characteristics, such as command buttons.




    Ver. 1.0                                                          Slide 3 of 24
Object-Oriented Analysis and Design Using UML
Defining Patterns and Frameworks (Contd.)


               The characteristics of a framework are:
                  Represents a collection of classes or a library that enables you
                  to perform a particular function without developing the code
                  from scratch.
                  Contains abstract and concrete classes that realize interfaces
                  to conform to predefined specifications.
                  Contains classes that can be extended by subclassing.
                  Defines abstract methods that receive messages in the derived
                  class from the predefined classes.




    Ver. 1.0                                                             Slide 4 of 24
Object-Oriented Analysis and Design Using UML
Defining Patterns and Frameworks (Contd.)


               Pattern:
                  Is a set of principles and guidelines that provide the standard
                  solution to a given problem.
                  Enables you to create solutions that can be reused to fulfill new
                  requirements without making modifications in the existing
                  system.
                  Is useful in making communication better among software
                  components.
                  Is useful in making the design reusable, solving a problem in
                  the most efficient manner, and assigning responsibilities to the
                  classes.
                  Are generally categorized into the following categories:
                      General Responsibility Assignment Software Patterns (GRASP)
                      Gang of Four (GoF) patterns



    Ver. 1.0                                                               Slide 5 of 24
Object-Oriented Analysis and Design Using UML
GRASP


               GRASP is a set of patterns that provides the principles of
               assigning responsibilities to objects, such as creating and
               destroying an object.
               Consists of the following patterns:
                – Expert: Provides guidelines to assign responsibility to a class
                  that contains the relevant information.
                – Creator: Provides guidelines for assigning responsibility to a
                  new object of a particular class.
                – Controller: Provides guidelines for handling system events.
               The expert pattern provides guidelines to assign
               responsibility to a class that contains the relevant
               information.




    Ver. 1.0                                                              Slide 6 of 24
Object-Oriented Analysis and Design Using UML
GRASP (Contd.)


               According to the creator pattern, a class is responsible for
               creating objects if any of the following conditions are true:
                  A class contains another class.
                  A class records the instances of another class.
                  A class uses the objects of another class.
                  A class provides information to initialize the objects of another
                  class.
               According to the controller pattern, you assign the
               responsibility of handling the system event to the class that
               fulfills one or more of the following criteria:
                  Represents the overall system
                  Represents a use case handler




    Ver. 1.0                                                                Slide 7 of 24
Object-Oriented Analysis and Design Using UML
GoF Patterns


               The GoF patterns:
                  Are based on open-close principle, which suggests that the
                  design should be open to extension and close to modification.
                  Have the following features:
                   – Enables you to reuse existing solutions for common design
                     problems.
                   – Establishes common terminology for problems and their solutions
                     to improve understanding.
                  Are broadly categorized into three types:
                     Creational
                     Structural
                     Behavioral




    Ver. 1.0                                                                Slide 8 of 24
Object-Oriented Analysis and Design Using UML
Creational Patterns


               Creational patterns provide techniques for creating objects
               and managing the life cycle of the objects.
               Commonly used creational patterns are:
                  Factory
                  Builder
                  Singleton
               Factory Pattern:
                  Provides a class known as factory class, which controls the
                  lifetime of the objects of the subclasses of an abstract base
                  class.
                  Is required in the following cases:
                          When you are not able to anticipate which type of objects are
                          required at runtime.
                          When the base class is abstract and the pattern must return
                          an initialized object.

    Ver. 1.0                                                                   Slide 9 of 24
Object-Oriented Analysis and Design Using UML
Creational Patterns (Contd.)


               Builder Pattern:
                  Separates the creation and construction of a complex object
                  from its representation.
                  Enables you to create several representations of the same
                  complex object with a flexibility of modifying the alignment of
                  the objects.
                  Is similar to abstract factory method because both create
                  family of objects.
                  Assembles or structures the simple objects to represent a
                  complex object.




    Ver. 1.0                                                               Slide 10 of 24
Object-Oriented Analysis and Design Using UML
Creational Patterns (Contd.)


               Singleton Pattern:
                  Is a class that allows you to create only one instance of itself.
                  Is useful when you need to access a single object representing
                  a real life object, such as a printer or a mouse.
                  Is defined using a static data member that keeps track of the
                  life of the created object.




    Ver. 1.0                                                              Slide 11 of 24
Object-Oriented Analysis and Design Using UML
Structural Patterns


               Structural design pattern describes how classes and objects
               can be combined to form larger structures using object
               composition.
               The most commonly used structural patterns are:
                  Composite
                  Proxy
                  Decorator
                  Facade




    Ver. 1.0                                                      Slide 12 of 24
Object-Oriented Analysis and Design Using UML
Structural Patterns (Contd.)


               Composite Pattern:
                  Represents a complex object, which can further consists of
                  simple objects and complex objects.
                  Provides you with interfaces to access the composite and
                  simple objects within the composite object.
                  Is represented as a tree in which the composite objects
                  represent the nodes and simple objects represent leaves of the
                  tree.




    Ver. 1.0                                                           Slide 13 of 24
Object-Oriented Analysis and Design Using UML
Structural Patterns (Contd.)


                   Proxy pattern:
                      Is used to represent the complex objects as simple objects.
                      Allows you to postpone the creation of an object until you
                      require it.
                   Decorator pattern:
                      Allows you to modify the behavior of individual objects without
                      creating a new derived class.
                      Is used to define the additional functionality for the existing
                      objects.
               •   Facade pattern:
                      Simplifies the software development by providing simplified
                      interfaces.
                      Is also useful in implementing layered architecture.



    Ver. 1.0                                                                 Slide 14 of 24
Object-Oriented Analysis and Design Using UML
Behavioral Patterns


               Behavioral patterns provide guidelines for enabling
               communication between two objects.
               The most commonly used behavioral patterns are:
                – Chain of Responsibility: Describes how various classes
                  should handle a request. Each class contains the logic that
                  describes the types of requests it can handle. It also describes
                  how to pass off the requests that the class cannot handle to
                  another class.
                – Command: Describes how a request of method invocation is
                  transferred only to a specific module.
                – Observer: Enables you to create separate objects for
                  displaying the information in various forms.




    Ver. 1.0                                                              Slide 15 of 24
Object-Oriented Analysis and Design Using UML
Modeling Design Patterns


               Design patterns are modeled with respect to the real world
               scenarios and with respect to the developer who creates the
               design pattern.
               The various views in which you model the design patterns
               are:
                – Outside view: Represents the structure of the design pattern
                  as a parameterized collaboration.
                – Inside view: Represents the structure of the design pattern as
                  seen by the creator of the pattern, such as the developer. The
                  inside view is depicted as a collaboration without parameters.




    Ver. 1.0                                                            Slide 16 of 24
Object-Oriented Analysis and Design Using UML
Associating Patterns with Tiered Architecture


               Design patterns are implemented in tiered applications,
               which are developed to support companies in their business
               operations.
               The following table lists the design patterns and the tiers on
               which they are generally implemented.
                      Pattern                   Tier

                      Façade                    Business Tier

                      Builder                   Business Tier

                      Singleton                 Business Tier

                      Composite                 Presentation Tier

                      Decorator                 Presentation Tier

                      Chain of Responsibility   Business Tier

                      Command                   Business Tier

                      Observer                  Presentation Tier


    Ver. 1.0                                                         Slide 17 of 24
Object-Oriented Analysis and Design Using UML
Mapping Design to Code


               Using CASE tools, such as Rational Rose, Jude, and Visio,
               you can automatically generate code from class and
               communication diagrams.
               CASE tools use various thumb rules and heuristic principles
               to generate code from the designed model.
               You need to optimize the code generated using CASE tools
               according to the operating system.
               You can also reverse engineer the code into the design
               model to measure the deviation from the designed model
               after the code is modified.




    Ver. 1.0                                                      Slide 18 of 24
Object-Oriented Analysis and Design Using UML
Generating Code from a Design Model


               CASE tools, such as Rational Rose and Visio:
                  Automatically generate code from class and collaboration
                  diagrams.
                  Support reverse engineering that enables you to generate
                  design models from the code that may be modified during the
                  course of implementation and testing phases of the project.
                  Support reverse engineering the code into the design model to
                  measure the deviation from the designed model after the code
                  is modified.
               You focus on the class diagrams and communication
               diagrams while generating code because code is generated
               from class methods and variables.




    Ver. 1.0                                                           Slide 19 of 24
Object-Oriented Analysis and Design Using UML
Refactoring Design


               Refactoring Design:
                  Is a technique for restructuring internal structure of the existing
                  code without changing its external behavior.
                  Alters the class model without altering the architecture of a
                  system.
               The factors that may lead to refactoring are:
                  Identification of new methods in the implementation phase due
                  to the platform on which the design is implemented.
                  The methods that are derived from the communication diagram
                  are not present in the class diagram.




    Ver. 1.0                                                                Slide 20 of 24
Object-Oriented Analysis and Design Using UML
Applying Session Facade


               A session facade is a design pattern that is used to create
               enterprise applications, such as applications that use
               Enterprise Java Beans (EJB).
               In an enterprise application, a session facade pattern is
               defined as a high-level business component such as a
               session bean.
               The high-level business component defines the complete
               interaction among low-level business components, such as
               entity beans.
               The session facade pattern acts as an interface to the
               low-level business components.
               It decouples low-level business components from one
               another, making the design of enterprise applications more
               reusable and manageable.

    Ver. 1.0                                                       Slide 21 of 24
Object-Oriented Analysis and Design Using UML
Demo: Generating C# Code for Bank ATM System


               •   Problem Statement:
                      Generate the C# code of the Bank ATM model using the Visio.




    Ver. 1.0                                                             Slide 22 of 24
Object-Oriented Analysis and Design Using UML
Summary


               In this session, you learned that:
                  A framework is a unit of architecture that provides a reusable
                  and extensible solution to a group of problems.
                  A pattern is a named problem-solution pair that enables you to
                  apply standard solution to reoccurring problems in the design
                  and implementation phases of SDLC.
                  GRASP represents a set of patterns that are used to assign
                  responsibilities to different identified classes.
                  A design pattern provides standard approach for performing
                  tasks so that the solution becomes reusable and maintainable.
                  The three types of GoF are:
                       Structural
                       Creational
                       Behavioral



    Ver. 1.0                                                            Slide 23 of 24
Object-Oriented Analysis and Design Using UML
Summary (Contd.)


               Creational patterns deal with the creation and lifetime of
               objects of other classes.
               Structural patters deal with the structure of the system.
               Behavioral patterns deal with the behavior of the system.
               Code generation is the process of deriving code from the
               design model.
               Refactoring design is a technique for restructuring internal
               structure of the existing code without changing its external
               behavior.




    Ver. 1.0                                                           Slide 24 of 24

Contenu connexe

Tendances

Sequence diagram
Sequence diagramSequence diagram
Sequence diagramRahul Pola
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction ModelingHemant Sharma
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLMalek Sumaiya
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specificationlavanya marichamy
 
Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5koolkampus
 
Ch6-Software Engineering 9
Ch6-Software Engineering 9Ch6-Software Engineering 9
Ch6-Software Engineering 9Ian Sommerville
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineeringMubashir Jutt
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)Manoj Reddy
 
state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UMLKumar
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram Rahul Pola
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagramsSwathy T
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineeringDarshit Metaliya
 

Tendances (20)

Sequence diagram
Sequence diagramSequence diagram
Sequence diagram
 
Interaction Modeling
Interaction ModelingInteraction Modeling
Interaction Modeling
 
unit testing and debugging
unit testing and debuggingunit testing and debugging
unit testing and debugging
 
Object Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UMLObject Oriented Modeling and Design with UML
Object Oriented Modeling and Design with UML
 
Software requirements specification
Software requirements specificationSoftware requirements specification
Software requirements specification
 
Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5Software Requirements in Software Engineering SE5
Software Requirements in Software Engineering SE5
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Ch6-Software Engineering 9
Ch6-Software Engineering 9Ch6-Software Engineering 9
Ch6-Software Engineering 9
 
Uml in software engineering
Uml in software engineeringUml in software engineering
Uml in software engineering
 
Unit 3(advanced state modeling & interaction meodelling)
Unit  3(advanced state modeling & interaction meodelling)Unit  3(advanced state modeling & interaction meodelling)
Unit 3(advanced state modeling & interaction meodelling)
 
Software design
Software designSoftware design
Software design
 
Case Study Uml
Case Study UmlCase Study Uml
Case Study Uml
 
Ooad
OoadOoad
Ooad
 
state modeling In UML
state modeling In UMLstate modeling In UML
state modeling In UML
 
Use case Diagram
Use case Diagram Use case Diagram
Use case Diagram
 
Uml structural diagrams
Uml structural diagramsUml structural diagrams
Uml structural diagrams
 
UML
UMLUML
UML
 
Design Concept software engineering
Design Concept software engineeringDesign Concept software engineering
Design Concept software engineering
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 

En vedette

5.state diagrams
5.state diagrams5.state diagrams
5.state diagramsAPU
 
Developing graphical user interface for analysis of beam by using matlab soft...
Developing graphical user interface for analysis of beam by using matlab soft...Developing graphical user interface for analysis of beam by using matlab soft...
Developing graphical user interface for analysis of beam by using matlab soft...eSAT Journals
 
Architecture Description Languages
Architecture Description LanguagesArchitecture Description Languages
Architecture Description LanguagesHenry Muccini
 
Application of programming languages in civil engineering
Application of programming languages in civil engineeringApplication of programming languages in civil engineering
Application of programming languages in civil engineeringMuhammad Usama Umer
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And RefactoringNaresh Jain
 
UML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionUML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionRamakant Soni
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship DiagramGaurav Gupta
 
Mis ppt unit 3 & 4
Mis ppt unit 3 & 4Mis ppt unit 3 & 4
Mis ppt unit 3 & 4Jay Patel
 
Latest trends in database management
Latest trends in database managementLatest trends in database management
Latest trends in database managementBcomBT
 
Unit 3 Management Information System
Unit 3 Management Information SystemUnit 3 Management Information System
Unit 3 Management Information SystemAbhishek Iyer
 
GRASP Principles
GRASP PrinciplesGRASP Principles
GRASP PrinciplesRaheel Arif
 

En vedette (20)

(OOAD) UML Slides
(OOAD) UML Slides(OOAD) UML Slides
(OOAD) UML Slides
 
8. operation contracts
8. operation contracts8. operation contracts
8. operation contracts
 
5.state diagrams
5.state diagrams5.state diagrams
5.state diagrams
 
Developing graphical user interface for analysis of beam by using matlab soft...
Developing graphical user interface for analysis of beam by using matlab soft...Developing graphical user interface for analysis of beam by using matlab soft...
Developing graphical user interface for analysis of beam by using matlab soft...
 
Architecture Description Languages
Architecture Description LanguagesArchitecture Description Languages
Architecture Description Languages
 
Dbms
DbmsDbms
Dbms
 
Application of programming languages in civil engineering
Application of programming languages in civil engineeringApplication of programming languages in civil engineering
Application of programming languages in civil engineering
 
Dbms Lecture Notes
Dbms Lecture NotesDbms Lecture Notes
Dbms Lecture Notes
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And Refactoring
 
UML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language IntroductionUML Diagrams- Unified Modeling Language Introduction
UML Diagrams- Unified Modeling Language Introduction
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Mis ppt unit 3 & 4
Mis ppt unit 3 & 4Mis ppt unit 3 & 4
Mis ppt unit 3 & 4
 
09 grasp
09 grasp09 grasp
09 grasp
 
Latest trends in database management
Latest trends in database managementLatest trends in database management
Latest trends in database management
 
Unit 3 Management Information System
Unit 3 Management Information SystemUnit 3 Management Information System
Unit 3 Management Information System
 
GRASP Principles
GRASP PrinciplesGRASP Principles
GRASP Principles
 
Ooad
OoadOoad
Ooad
 
Current trends in DBMS
Current trends in DBMSCurrent trends in DBMS
Current trends in DBMS
 

Similaire à 11 ooad uml-14

07 ooad uml-08
07 ooad uml-0807 ooad uml-08
07 ooad uml-08Niit Care
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - AnalysisRandy Connolly
 
05 ooad uml-05
05 ooad uml-0505 ooad uml-05
05 ooad uml-05Niit Care
 
01 ooad uml-01
01 ooad uml-0101 ooad uml-01
01 ooad uml-01Niit Care
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manualPraseela R
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patternssukumarraju6
 
04 ooad uml-04
04 ooad uml-0404 ooad uml-04
04 ooad uml-04Niit Care
 
Architecture and design
Architecture and designArchitecture and design
Architecture and designhimanshu_airon
 
02 ooad uml-02
02 ooad uml-0202 ooad uml-02
02 ooad uml-02Niit Care
 
06 ooad uml-07
06 ooad uml-0706 ooad uml-07
06 ooad uml-07Niit Care
 
Assignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audioAssignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audioRickNZ
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...Anil Sharma
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdfSHIVAM691605
 
Object Oriented Database
Object Oriented DatabaseObject Oriented Database
Object Oriented DatabaseMegan Espinoza
 
08 ooad uml-10
08 ooad uml-1008 ooad uml-10
08 ooad uml-10Niit Care
 
OO Development 6 - Software Design
OO Development 6 - Software DesignOO Development 6 - Software Design
OO Development 6 - Software DesignRandy Connolly
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software EngineeringKourosh Sajjadi
 

Similaire à 11 ooad uml-14 (20)

07 ooad uml-08
07 ooad uml-0807 ooad uml-08
07 ooad uml-08
 
OO Development 5 - Analysis
OO Development 5 - AnalysisOO Development 5 - Analysis
OO Development 5 - Analysis
 
05 ooad uml-05
05 ooad uml-0505 ooad uml-05
05 ooad uml-05
 
01 ooad uml-01
01 ooad uml-0101 ooad uml-01
01 ooad uml-01
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
Introduction To Design Patterns
Introduction To Design PatternsIntroduction To Design Patterns
Introduction To Design Patterns
 
04 ooad uml-04
04 ooad uml-0404 ooad uml-04
04 ooad uml-04
 
Architecture and design
Architecture and designArchitecture and design
Architecture and design
 
02 ooad uml-02
02 ooad uml-0202 ooad uml-02
02 ooad uml-02
 
06 ooad uml-07
06 ooad uml-0706 ooad uml-07
06 ooad uml-07
 
Chapter1
Chapter1Chapter1
Chapter1
 
Assignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audioAssignment 1 SYD601 2012 rick_danby completed with audio
Assignment 1 SYD601 2012 rick_danby completed with audio
 
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
dotnet stuff.com tutorials-design-patterns_exploring-net-design-patterns-in-s...
 
Object-oriented modeling and design.pdf
Object-oriented modeling and  design.pdfObject-oriented modeling and  design.pdf
Object-oriented modeling and design.pdf
 
Object Oriented Database
Object Oriented DatabaseObject Oriented Database
Object Oriented Database
 
Object oriented analysis and design unit- ii
Object oriented analysis and design unit- iiObject oriented analysis and design unit- ii
Object oriented analysis and design unit- ii
 
08 ooad uml-10
08 ooad uml-1008 ooad uml-10
08 ooad uml-10
 
OO Development 6 - Software Design
OO Development 6 - Software DesignOO Development 6 - Software Design
OO Development 6 - Software Design
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
 
What is design pattern
What is design patternWhat is design pattern
What is design pattern
 

Plus de Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Dernier

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Dernier (20)

SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

11 ooad uml-14

  • 1. Object-Oriented Analysis and Design Using UML Objectives In this session, you will learn to: – Apply framework and patterns to design the software system – Generate code from design model Ver. 1.0 Slide 1 of 24
  • 2. Object-Oriented Analysis and Design Using UML Understanding Frameworks and Patterns A development team tends to reuse its existing solutions to reduce the development time and increase quality. Reusing an existing solution includes reusing the existing code, a component, a test case, or a concept that has been implemented in similar projects. Frameworks and patterns are standards, which are used to make the software components reusable. Ver. 1.0 Slide 2 of 24
  • 3. Object-Oriented Analysis and Design Using UML Defining Patterns and Frameworks Frameworks: Define features that are common to similar applications belonging to a particular domain. Increase reusability and reduce application development time. Microsoft Foundation Classes (MFC) provided with Microsoft VC++ is an example of a framework that allows you to develop Graphical User Interfaces (GUI) having common characteristics, such as command buttons. Ver. 1.0 Slide 3 of 24
  • 4. Object-Oriented Analysis and Design Using UML Defining Patterns and Frameworks (Contd.) The characteristics of a framework are: Represents a collection of classes or a library that enables you to perform a particular function without developing the code from scratch. Contains abstract and concrete classes that realize interfaces to conform to predefined specifications. Contains classes that can be extended by subclassing. Defines abstract methods that receive messages in the derived class from the predefined classes. Ver. 1.0 Slide 4 of 24
  • 5. Object-Oriented Analysis and Design Using UML Defining Patterns and Frameworks (Contd.) Pattern: Is a set of principles and guidelines that provide the standard solution to a given problem. Enables you to create solutions that can be reused to fulfill new requirements without making modifications in the existing system. Is useful in making communication better among software components. Is useful in making the design reusable, solving a problem in the most efficient manner, and assigning responsibilities to the classes. Are generally categorized into the following categories: General Responsibility Assignment Software Patterns (GRASP) Gang of Four (GoF) patterns Ver. 1.0 Slide 5 of 24
  • 6. Object-Oriented Analysis and Design Using UML GRASP GRASP is a set of patterns that provides the principles of assigning responsibilities to objects, such as creating and destroying an object. Consists of the following patterns: – Expert: Provides guidelines to assign responsibility to a class that contains the relevant information. – Creator: Provides guidelines for assigning responsibility to a new object of a particular class. – Controller: Provides guidelines for handling system events. The expert pattern provides guidelines to assign responsibility to a class that contains the relevant information. Ver. 1.0 Slide 6 of 24
  • 7. Object-Oriented Analysis and Design Using UML GRASP (Contd.) According to the creator pattern, a class is responsible for creating objects if any of the following conditions are true: A class contains another class. A class records the instances of another class. A class uses the objects of another class. A class provides information to initialize the objects of another class. According to the controller pattern, you assign the responsibility of handling the system event to the class that fulfills one or more of the following criteria: Represents the overall system Represents a use case handler Ver. 1.0 Slide 7 of 24
  • 8. Object-Oriented Analysis and Design Using UML GoF Patterns The GoF patterns: Are based on open-close principle, which suggests that the design should be open to extension and close to modification. Have the following features: – Enables you to reuse existing solutions for common design problems. – Establishes common terminology for problems and their solutions to improve understanding. Are broadly categorized into three types: Creational Structural Behavioral Ver. 1.0 Slide 8 of 24
  • 9. Object-Oriented Analysis and Design Using UML Creational Patterns Creational patterns provide techniques for creating objects and managing the life cycle of the objects. Commonly used creational patterns are: Factory Builder Singleton Factory Pattern: Provides a class known as factory class, which controls the lifetime of the objects of the subclasses of an abstract base class. Is required in the following cases: When you are not able to anticipate which type of objects are required at runtime. When the base class is abstract and the pattern must return an initialized object. Ver. 1.0 Slide 9 of 24
  • 10. Object-Oriented Analysis and Design Using UML Creational Patterns (Contd.) Builder Pattern: Separates the creation and construction of a complex object from its representation. Enables you to create several representations of the same complex object with a flexibility of modifying the alignment of the objects. Is similar to abstract factory method because both create family of objects. Assembles or structures the simple objects to represent a complex object. Ver. 1.0 Slide 10 of 24
  • 11. Object-Oriented Analysis and Design Using UML Creational Patterns (Contd.) Singleton Pattern: Is a class that allows you to create only one instance of itself. Is useful when you need to access a single object representing a real life object, such as a printer or a mouse. Is defined using a static data member that keeps track of the life of the created object. Ver. 1.0 Slide 11 of 24
  • 12. Object-Oriented Analysis and Design Using UML Structural Patterns Structural design pattern describes how classes and objects can be combined to form larger structures using object composition. The most commonly used structural patterns are: Composite Proxy Decorator Facade Ver. 1.0 Slide 12 of 24
  • 13. Object-Oriented Analysis and Design Using UML Structural Patterns (Contd.) Composite Pattern: Represents a complex object, which can further consists of simple objects and complex objects. Provides you with interfaces to access the composite and simple objects within the composite object. Is represented as a tree in which the composite objects represent the nodes and simple objects represent leaves of the tree. Ver. 1.0 Slide 13 of 24
  • 14. Object-Oriented Analysis and Design Using UML Structural Patterns (Contd.) Proxy pattern: Is used to represent the complex objects as simple objects. Allows you to postpone the creation of an object until you require it. Decorator pattern: Allows you to modify the behavior of individual objects without creating a new derived class. Is used to define the additional functionality for the existing objects. • Facade pattern: Simplifies the software development by providing simplified interfaces. Is also useful in implementing layered architecture. Ver. 1.0 Slide 14 of 24
  • 15. Object-Oriented Analysis and Design Using UML Behavioral Patterns Behavioral patterns provide guidelines for enabling communication between two objects. The most commonly used behavioral patterns are: – Chain of Responsibility: Describes how various classes should handle a request. Each class contains the logic that describes the types of requests it can handle. It also describes how to pass off the requests that the class cannot handle to another class. – Command: Describes how a request of method invocation is transferred only to a specific module. – Observer: Enables you to create separate objects for displaying the information in various forms. Ver. 1.0 Slide 15 of 24
  • 16. Object-Oriented Analysis and Design Using UML Modeling Design Patterns Design patterns are modeled with respect to the real world scenarios and with respect to the developer who creates the design pattern. The various views in which you model the design patterns are: – Outside view: Represents the structure of the design pattern as a parameterized collaboration. – Inside view: Represents the structure of the design pattern as seen by the creator of the pattern, such as the developer. The inside view is depicted as a collaboration without parameters. Ver. 1.0 Slide 16 of 24
  • 17. Object-Oriented Analysis and Design Using UML Associating Patterns with Tiered Architecture Design patterns are implemented in tiered applications, which are developed to support companies in their business operations. The following table lists the design patterns and the tiers on which they are generally implemented. Pattern Tier Façade Business Tier Builder Business Tier Singleton Business Tier Composite Presentation Tier Decorator Presentation Tier Chain of Responsibility Business Tier Command Business Tier Observer Presentation Tier Ver. 1.0 Slide 17 of 24
  • 18. Object-Oriented Analysis and Design Using UML Mapping Design to Code Using CASE tools, such as Rational Rose, Jude, and Visio, you can automatically generate code from class and communication diagrams. CASE tools use various thumb rules and heuristic principles to generate code from the designed model. You need to optimize the code generated using CASE tools according to the operating system. You can also reverse engineer the code into the design model to measure the deviation from the designed model after the code is modified. Ver. 1.0 Slide 18 of 24
  • 19. Object-Oriented Analysis and Design Using UML Generating Code from a Design Model CASE tools, such as Rational Rose and Visio: Automatically generate code from class and collaboration diagrams. Support reverse engineering that enables you to generate design models from the code that may be modified during the course of implementation and testing phases of the project. Support reverse engineering the code into the design model to measure the deviation from the designed model after the code is modified. You focus on the class diagrams and communication diagrams while generating code because code is generated from class methods and variables. Ver. 1.0 Slide 19 of 24
  • 20. Object-Oriented Analysis and Design Using UML Refactoring Design Refactoring Design: Is a technique for restructuring internal structure of the existing code without changing its external behavior. Alters the class model without altering the architecture of a system. The factors that may lead to refactoring are: Identification of new methods in the implementation phase due to the platform on which the design is implemented. The methods that are derived from the communication diagram are not present in the class diagram. Ver. 1.0 Slide 20 of 24
  • 21. Object-Oriented Analysis and Design Using UML Applying Session Facade A session facade is a design pattern that is used to create enterprise applications, such as applications that use Enterprise Java Beans (EJB). In an enterprise application, a session facade pattern is defined as a high-level business component such as a session bean. The high-level business component defines the complete interaction among low-level business components, such as entity beans. The session facade pattern acts as an interface to the low-level business components. It decouples low-level business components from one another, making the design of enterprise applications more reusable and manageable. Ver. 1.0 Slide 21 of 24
  • 22. Object-Oriented Analysis and Design Using UML Demo: Generating C# Code for Bank ATM System • Problem Statement: Generate the C# code of the Bank ATM model using the Visio. Ver. 1.0 Slide 22 of 24
  • 23. Object-Oriented Analysis and Design Using UML Summary In this session, you learned that: A framework is a unit of architecture that provides a reusable and extensible solution to a group of problems. A pattern is a named problem-solution pair that enables you to apply standard solution to reoccurring problems in the design and implementation phases of SDLC. GRASP represents a set of patterns that are used to assign responsibilities to different identified classes. A design pattern provides standard approach for performing tasks so that the solution becomes reusable and maintainable. The three types of GoF are: Structural Creational Behavioral Ver. 1.0 Slide 23 of 24
  • 24. Object-Oriented Analysis and Design Using UML Summary (Contd.) Creational patterns deal with the creation and lifetime of objects of other classes. Structural patters deal with the structure of the system. Behavioral patterns deal with the behavior of the system. Code generation is the process of deriving code from the design model. Refactoring design is a technique for restructuring internal structure of the existing code without changing its external behavior. Ver. 1.0 Slide 24 of 24

Notes de l'éditeur

  1. Initiate the session by explaining the session objectives. Tell the students that the success of a software solution depends largely on how well its various components have been designed. An effort should be made to ensure that the components of the existing software solution can be reused. This can be done by using frameworks and patterns. You need to elaborate the concept of applying patterns and frameworks by using the case study of BlueSeas Inc. This will help students to relate their programming skills with the actual practices followed in the software industry.
  2. Explain what frameworks and features are and how they help in making software components reusable. Explain the concept of frameworks by using the example of Microsoft Foundation Classes (MFC).
  3. Explain what frameworks and features are and how they help in making software components reusable. Explain the concept of frameworks by using the example of Microsoft Foundation Classes (MFC).
  4. Explain the characteristics of a framework.
  5. Define patterns and their advantages. Also enumerate the two types of patterns.
  6. Explain the concept behind GRASP patterns. Explain the types of patterns included in GRASP. Explain how the expert pattern assigns responsibilities to classes.
  7. Explain how the creator pattern assigns responsibilities to classes. Next, explain how the controller pattern assigns responsibilities to classes.
  8. Explain the concept and features of GoF patterns. Also enumerate the three types of GoF patterns.
  9. Explain the concept of creational patterns. Enumerate the three types of creational design patterns. Explain in detail the factory pattern by using the Shape example given in the student guide.
  10. Explain in detail the buider pattern by using the example of the RAS application given in the student guide.
  11. Explain in detail the singleton pattern by using the example given in the student guide.
  12. Explain the concept of structural design patterns and enumerate the commonly used structural patterns.
  13. Explain in detail the composite pattern by using the example of the RAS application given in the student guide.
  14. Explain in detail the proxy, decorator, and facade patterns by using the example of the RAS application given in the student guide.
  15. Explain the concept of behavioral patterns and enumerate the commonly used behavioral patterns.
  16. Explain the various views for modeling design patterns. Explain the concept of modeling design patterns by using the example given in the student guide.
  17. Explain the design patterns associated with the three types of tiers.
  18. Use the examples given in the student guide to explain how the design maps to the code.
  19. Use the examples given in the student guide to explain how the design maps to the code.
  20. Explain the concept of refactoring design. Also explain the factors that may lead to refactoring by using the example given in the student guide.
  21. Explain the concept of session façade by using the example given in the student guide.
  22. Summarize the session by using the summary points given on the slide.
  23. Summarize the session by using the summary points given on the slide.