SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering arvind pandey
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1Abhimanyu Mishra
 
Model Based Software Architectures
Model Based Software ArchitecturesModel Based Software Architectures
Model Based Software ArchitecturesMunazza-Mah-Jabeen
 
unit 5 Architectural design
 unit 5 Architectural design unit 5 Architectural design
unit 5 Architectural designdevika g
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagramBaskarkncet
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering conceptsKomal Singh
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design PatternSanae BEKKAR
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbolsKumar
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualizationDr.Neeraj Kumar Pandey
 
Unit 5 usability and satisfaction test
Unit 5 usability and satisfaction testUnit 5 usability and satisfaction test
Unit 5 usability and satisfaction testgopal10scs185
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)Er. Shiva K. Shrestha
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented DesignAMITJain879
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system modelHarshad Umredkar
 
Workgroup vs domain
Workgroup vs domainWorkgroup vs domain
Workgroup vs domaintameemyousaf
 
Implementation levels of virtualization
Implementation levels of virtualizationImplementation levels of virtualization
Implementation levels of virtualizationGokulnath S
 

Mais procurados (20)

Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering Unit 5- Architectural Design in software engineering
Unit 5- Architectural Design in software engineering
 
Software Engineering Unit 1
Software Engineering Unit 1Software Engineering Unit 1
Software Engineering Unit 1
 
Model Based Software Architectures
Model Based Software ArchitecturesModel Based Software Architectures
Model Based Software Architectures
 
unit 5 Architectural design
 unit 5 Architectural design unit 5 Architectural design
unit 5 Architectural design
 
08 state diagram and activity diagram
08 state diagram and activity diagram08 state diagram and activity diagram
08 state diagram and activity diagram
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Object oriented software engineering concepts
Object oriented software engineering conceptsObject oriented software engineering concepts
Object oriented software engineering concepts
 
Software quality
Software qualitySoftware quality
Software quality
 
Introduction to Design Pattern
Introduction to Design  PatternIntroduction to Design  Pattern
Introduction to Design Pattern
 
UML diagrams and symbols
UML diagrams and symbolsUML diagrams and symbols
UML diagrams and symbols
 
cloud computing:Types of virtualization
cloud computing:Types of virtualizationcloud computing:Types of virtualization
cloud computing:Types of virtualization
 
Virtualization Basics
Virtualization BasicsVirtualization Basics
Virtualization Basics
 
Introduction to UML
Introduction to UMLIntroduction to UML
Introduction to UML
 
Unit 5 usability and satisfaction test
Unit 5 usability and satisfaction testUnit 5 usability and satisfaction test
Unit 5 usability and satisfaction test
 
Software Configuration Management (SCM)
Software Configuration Management (SCM)Software Configuration Management (SCM)
Software Configuration Management (SCM)
 
Unit 4
Unit 4Unit 4
Unit 4
 
Object Oriented Design
Object Oriented DesignObject Oriented Design
Object Oriented Design
 
distributed Computing system model
distributed Computing system modeldistributed Computing system model
distributed Computing system model
 
Workgroup vs domain
Workgroup vs domainWorkgroup vs domain
Workgroup vs domain
 
Implementation levels of virtualization
Implementation levels of virtualizationImplementation levels of virtualization
Implementation levels of virtualization
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais 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
 

Último

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
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
 
"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
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Último (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
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
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
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
 
"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...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
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
 

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

Notas do Editor

  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.