SlideShare uma empresa Scribd logo
1 de 24
Collaborate


Knowledge Byte
    In this section, you will learn about:


         •   Selecting a design pattern depending on the business requirements.
         •   The various design patterns that form a part of the TheServerSide.com
             catalog.




 ©NIIT                          Collaborate                 Lesson 1C / Slide 1 of 24
Collaborate


Selecting a Design Pattern
    •    Design patterns enable you to design robust software by identifying the key
         steps undertaken during the application design phase, such as:
           • Identifying components and their internal structure and relationship
             among various components that constitutes a distributed application.
           • Determining and analyzing the level of communication among the
             components.
           • Defining the architecture of the presentation layer that is robust
    •    The guidelines for selecting a design pattern are.
           • You need to identify the need for each type of design pattern. Once the
             purpose of each group of pattern is identified, choose the appropriate
             design pattern that helps to solve your problem.
           • You need to identify the type of problem that a design pattern solves and
             helps in narrowing the list of suitable design patterns that are applied to
             the given problem.



 ©NIIT                           Collaborate                   Lesson 1C / Slide 2 of 24
Collaborate


Selecting a Design Pattern(Contd.)
    •    You need to understand the problem and the related solution of each pattern,
         which enables you to select appropriate patterns. Based on the solution of
         each patterns, a final choice can be made to select a final design pattern.
    •    You need to analyze and understand interrelations among patterns. The
         relevant patterns are grouped together to analyze the complete design and
         flow of applications.




 ©NIIT                          Collaborate                  Lesson 1C / Slide 3 of 24
Collaborate


The TheServerSide.com Patterns
    •    The TheServerSide.com is an independent online Java community for
         enterprise developers and architects.
    •    The TheServerSide community includes TheServerSide.NET,
         TheServerSide.com, and TheServerSide Symposiums.
    •    TheServerSide.NET community focuses on enterprise development using
         Microsoft .NET framework.
    •    TheServerSide Symposium discusses development issues that are related to an
         enterprise development environment.
    •    TheServerSide.com organizes design patterns in different catalogs based on
         their functionality.




 ©NIIT                         Collaborate                 Lesson 1C / Slide 4 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    The TheServerSide.com patterns catalog includes:
           • EJB Layer architectural Patterns
           • Inter-tier data-Transfer Patterns
           • Transaction and Persistence Patterns
           • Client-side EJB Interaction Patterns
    •    The EJB layer architectural category patterns include:
           • Session Facade: Provides an abstraction layer hiding all the underlying
             communication complexities in an EJB application. The use of session
             façade in an EJB application reduces remote method overhead by
             providing business components to act as interfaces to the clients.
           • Message Façade: Uses message-driven beans instead of session beans to
             enable asynchronous and fault-tolerant access.


 ©NIIT                         Collaborate                  Lesson 1C / Slide 5 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    EJB Command: Encapsulates the business logic in command beans and
         implements loose-coupling between the client and the business-logic tier.
         This loose coupling results in reducing the number of remote invocations.
    •    Data Transfer Object Factory: Enables transferring of data objects by
         providing a factory.
    •    Generic Attribute Access: Provides the technique to dynamically set and
         retrieve attributes of an entity bean using HashMaps.
    •    Business Interface: Enables consistency checking of EJB interfaces during
         compile time. This pattern provides business interface to enable consistency
         checking, which needs to be implemented by both the local/remote interface
         and by the enterprise bean class.




 ©NIIT                        Collaborate                   Lesson 1C / Slide 6 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    The inter-tier data-transfer category patterns include:
          • Data-Transfer Object: Enables bulk transfer of data using serializable
               objects.
          • Domain Data-Transfer Object: Is an extension of Data-Transfer Object
               that enables transfer of data for a specific domain.
          • Custom Data-Transfer Object: Provides guidelines to transfer data as
               per the client requirements.
          • Data-Transfer HashMap: Enables grouping of arbitrary data between
               client and EJB tier using HashMaps.
          • Data-Transfer RowSet: Enables the use of RowSets to transfer
               relational data from ResultSet in the EJB tier to the client tier.




 ©NIIT                       Collaborate                 Lesson 1C / Slide 7 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    The transaction and persistence category patterns include:
          • Version Number: Provides a solution to maintain consistency and
               checks concurrency problems in the usage of use cases in an
               application.
          • JDBC for Reading: Performs listing of data in relational databases
               using JDBC.
          • Data-Access Command Beans: Is similar to EJB Command pattern
               that enables data access using Command beans.
          • Dual Persistent Entity Bean: Enables creation of entity bean that
               supports both Bean Managed Persistence (BMP) and Container
               Managed Persistence (CMP) through inheritance.




 ©NIIT                       Collaborate                 Lesson 1C / Slide 8 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    The client-side EJB interaction category patterns include:
          • EJB Home Factory: Improves the performance of EJB Home Interface
                by implementing caching with the use of EJB Home Factory.
          • Business Delegate: Reduces the coupling between the presentation
                and the business-tier. Business delegate pattern provides a proxy
                object to serve as an entry point to access business-logics and
                integration-tier data.




 ©NIIT                       Collaborate                 Lesson 1C / Slide 9 of 24
Collaborate


The TheServerSide.com Patterns
(Contd.)
    •    Following are the design patterns that are similar between J2EE pattern
         catalog and TheServerSide.com pattern catalog:
          • Service provided to Worker and Dispatcher View
          • Session Façade, Message Façade, and EJB Command
          • Service Locator and EJB Home Factory
          • Domain Data-Transfer Object, Custom Data-Transfer Object, Data-
               Transfer HashMap, and Data-Transfer RowSet
          • Value Object Assembler and Data-Transfer Object Factory
          • Data-Access Object and Data-Access Command Bean




 ©NIIT                       Collaborate                 Lesson 1C / Slide 10 of 24
Collaborate


From the Expert’s Desk

    In this section, you will learn:


         •    Best Practice on:
              • Guidelines for Developing Class Diagrams
              • Using Proven Design Patterns
         •    FAQs on Legacy Systems




 ©NIIT                           Collaborate           Lesson 1C / Slide 11 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams
    •    A UML class diagram depicts the static view of a system.
    •    The view includes the classes and interfaces of the system, their inter-
         relationships along with the operations and attributes of the classes.
    •    A Class diagram is used to analyze the requirements of the given system in
         the form of a conceptual model.
    •    As class diagrams plays a vital role to identify the requirements for
         designing a software system, different styles are applied at different stages
         of software design.




 ©NIIT                        Collaborate                   Lesson 1C / Slide 12 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)
    •    General Guidelines
          • The general guidelines for developing class diagrams include:
          • Focus should be given on identifying the responsibilities for classes
              instead of the specific attributes or operations, while creating a
              domain class diagram.
          • Visibility of operations and attributes should be depicted in the
              detailed design model of the system.
          • The design model of a class diagram should reflect the naming
              convention of the implementing language, as it depicts the source
              code of the structure.
          • Depict the association classes in the analysis diagram so that it can be
              re-enforced in the design phase to enable implementation in
              languages that do not support native code for this concept.



 ©NIIT                       Collaborate                  Lesson 1C / Slide 13 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)
    •    Class Style Guidelines
          • Certain guidelines relating to naming a class are:
                 • Class name should be realistic and should depict the real world
                      object, for which the class is being made.
                 • Class name should be a proper complete noun to make it more
                      descriptive and easier to understand.
                 • Operations should be named in a manner that clearly depicts
                      the functionality that the operations represent.




 ©NIIT                       Collaborate                 Lesson 1C / Slide 14 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)

    •    Class Style Guidelines(contd.)
         • Certain guidelines relating to naming a class are(contd.):
              • Attributes should also be named precisely and clearly, so that the
                   characteristics that the attributes represented are understandable.
              • The static operations/attributes should be listed before instance
                   operations/attributes.
              • Operations names should be consistent among each other, to
                   make the design easier to learn and understand. In addition,
                   names of the parameter variables should be consistent.




 ©NIIT                        Collaborate                  Lesson 1C / Slide 15 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)
    •    Relationship Guidelines
         • Following are some guidelines regarding depicting relationships in class
              diagrams:
              • Dependency should be depicted when the relationship is transitory.
              • Depict the relationship as a tree, when both the classes have
                   dependency relationship over the same class.
              • Avoid using ‘*’ to depict multiplicity on UML diagrams.
              • To simplify the diagram, it is always a good practice to depict the
                   type of the attribute instead of depicting the relationship in the
                   diagram.
              • Implied relationship should not be modeled that runs the risk of
                   maintaining additional code.




 ©NIIT                        Collaborate                 Lesson 1C / Slide 16 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)

    •    Association Guidelines
         • The association guidelines to depict association relationship in a class
             diagram include:
             • A general convention is to center the name of the association over
                   the association path, and the name of the association should be in
                   active voice.
             • The reading direction of an association name should be same as
                   the unidirectional relationship, to maintain consistency.
             • Role names should be indicated for the classes having multiple
                   association relationships.




 ©NIIT                        Collaborate                  Lesson 1C / Slide 17 of 24
Collaborate


Best Practices
Guidelines for Developing Class Diagrams (Contd.)

    •    Inheritance Guidelines
         • Inheritance enables reuse of code and data. It models ‘is a’ and ‘is like’
              relationships in a UML diagram.
         • Some of the guidelines are as follows:
              • It is a general convention to place a subclass under superclass in
                    the diagram.
              • A subclass should inherit all the attributes and operations from its
                    superclass.




 ©NIIT                        Collaborate                  Lesson 1C / Slide 18 of 24
Collaborate


Best Practices
Using Proven Design Patterns

    •    Design patterns are one of the important reusable resources available to
         architects as well as to developers that help in designing and developing an
         efficient application.
    •    Following are the core J2EE design patterns that are in frequent use in
         application development:
         • Session Facade: Provides an abstraction layer hiding all the underlying
               communication complexities in an EJB application. The use of session
               façade in an EJB application reduces remote method overhead by
               providing business components to act as interfaces to the clients.
         • Model view Controller: Decouples the data access, data presentation,
               and user interaction layers. As a result, high degree of maintainability
               and reusability among components is achieved. As the components are
               not tightly integrated to each other, several views can be added without
               affecting the underlying code and other components as well.

 ©NIIT                         Collaborate                  Lesson 1C / Slide 19 of 24
Collaborate


Best Practices
Using Proven Design Patterns (Contd.)

    •    Value Objects: Provides a single representation of data needed by the EJB
         invocations. The number of remote calls is reduced by placing all the related
         data in a single implementation resulting in improved overall performance of
         the application.
    •    Data Access Object: Encapsulates the access to the data source. It manages
         the connection established with the data source to access and store data.
    •    Service Locator: Facilitates lookups for distributed components in an
         enterprise application. Service locator centralizes the lookup and provides
         handles to all the components. The use of service locator in an application
         reduces complexity, improves performance by supporting caching, and
         enables single point of control.




 ©NIIT                        Collaborate                   Lesson 1C / Slide 20 of 24
Collaborate


FAQs
    •    Why should one use patterns?
         Use of design patterns helps in optimizing the performance of enterprise
         applications. Each pattern describes a problem that occurs during the
         designing phase of an application, and then describes the solution to that
         problem. The solution to the problem is described in such a way that you can
         use this solution repeatedly. The knowledge of design patterns enables
         developers to directly refer to a particular named pattern during
         implementation and documentation phase of an application. It reduces the
         overhead of specifying individual classes, relationships, and collaborations
         that makes up a pattern.


    •    What is an analysis pattern?
         Analysis pattern is a software pattern that is related to a business domain
         such as manufacturing, healthcare, and transportation. It enables
         discovering and capturing of business processes instead of language,
         structural, or implementation processes.

 ©NIIT                         Collaborate                  Lesson 1C / Slide 21 of 24
Collaborate


FAQs (Contd.)
    •    What are the main patterns utilized by Java APIs?
         Following are the main patterns utilized by the Java APIs:
         • Proxy pattern: Handles method invocations from a proxy object to a
              principal object.
         • Decorator Pattern: Enables transparency between class and its
              subclasses by extending the functionality of a class.
         • Factory Method: Provides the ability to create an object of a class
              without any dependency/relation. It delegates the choice of creating
              object of a class to another object.
         • Abstract Factory: Provides a way to instantiate an abstract class from
              the corresponding subclass




 ©NIIT                       Collaborate                 Lesson 1C / Slide 22 of 24
Collaborate


Challenge
    1.   Match the following:
    a.   Singleton    i. Dynamically attaches responsibilities to an object
    b.   Bridge       ii. Defines representation of grammar for a given
                           language for interpretation.
    c.   Façade      iii. Ensures that a class has only one instance.
    d.    Decorator iv. Decouples abstraction from its implementation.
    g.   Interpreter v. Provides a unified interface to a set of interfaces in a
                         subsystem.
    •    javax.ejb.EJBHome and javax.ejb.EJBLocalHome J2EE technology feature
         is associated with __________ pattern.
    •    javax.ejb.EJBObject interface is associated with _____________ pattern.
    •    Which GoF’s design pattern does the JMS Publish/Subscribe Model is
         associated with?



 ©NIIT                       Collaborate                Lesson 1C / Slide 23 of 24
Collaborate


Solutions to Challenge
    1.   a. – iii, b. – iv, c. – v, d. –i, e. –ii
    2.   Factory Method
    3.   Proxy Pattern
    4.   Observer design pattern




 ©NIIT                             Collaborate      Lesson 1C / Slide 24 of 24

Mais conteúdo relacionado

Mais procurados

Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10Niit Care
 
4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture PortfolioMajong DevJfu
 
1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a productMajong DevJfu
 
8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processesMajong DevJfu
 
7 - Architetture Software - Software product line
7 - Architetture Software - Software product line7 - Architetture Software - Software product line
7 - Architetture Software - Software product lineMajong DevJfu
 
Presentation - "A comparison of component-based software engineering and mode...
Presentation - "A comparison of component-based software engineering and mode...Presentation - "A comparison of component-based software engineering and mode...
Presentation - "A comparison of component-based software engineering and mode...Nikolay Grozev
 
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...Nesma
 
A comparison of component-based software engineering and model-driven develop...
A comparison of component-based software engineering and model-driven develop...A comparison of component-based software engineering and model-driven develop...
A comparison of component-based software engineering and model-driven develop...Nikolay Grozev
 
MoDisco EclipseCon2010
MoDisco EclipseCon2010MoDisco EclipseCon2010
MoDisco EclipseCon2010fmadiot
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
Software engineering: design for reuse
Software engineering: design for reuseSoftware engineering: design for reuse
Software engineering: design for reuseMarco Brambilla
 
Module 3: Working with Jazz Source Control
Module 3: Working with Jazz Source ControlModule 3: Working with Jazz Source Control
Module 3: Working with Jazz Source ControlIBM Rational software
 

Mais procurados (20)

Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Vb net xp_10
Vb net xp_10Vb net xp_10
Vb net xp_10
 
4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio4 - Architetture Software - Architecture Portfolio
4 - Architetture Software - Architecture Portfolio
 
Uml3
Uml3Uml3
Uml3
 
05 architectural design
05 architectural design05 architectural design
05 architectural design
 
1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product1 - Architetture Software - Software as a product
1 - Architetture Software - Software as a product
 
8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes8 - Architetture Software - Architecture centric processes
8 - Architetture Software - Architecture centric processes
 
08 component level_design
08 component level_design08 component level_design
08 component level_design
 
7 - Architetture Software - Software product line
7 - Architetture Software - Software product line7 - Architetture Software - Software product line
7 - Architetture Software - Software product line
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Presentation - "A comparison of component-based software engineering and mode...
Presentation - "A comparison of component-based software engineering and mode...Presentation - "A comparison of component-based software engineering and mode...
Presentation - "A comparison of component-based software engineering and mode...
 
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
Estimating packaged software - Eric van der Vliet - NESMA najaarsbijeenkomst ...
 
A comparison of component-based software engineering and model-driven develop...
A comparison of component-based software engineering and model-driven develop...A comparison of component-based software engineering and model-driven develop...
A comparison of component-based software engineering and model-driven develop...
 
MoDisco EclipseCon2010
MoDisco EclipseCon2010MoDisco EclipseCon2010
MoDisco EclipseCon2010
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
1
11
1
 
Software design
Software designSoftware design
Software design
 
Software engineering: design for reuse
Software engineering: design for reuseSoftware engineering: design for reuse
Software engineering: design for reuse
 
Module 3: Working with Jazz Source Control
Module 3: Working with Jazz Source ControlModule 3: Working with Jazz Source Control
Module 3: Working with Jazz Source Control
 
Component based software engineering
Component based software engineeringComponent based software engineering
Component based software engineering
 

Semelhante a Ajs 2 c

Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General IntroductionAsma CHERIF
 
10265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 201010265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 2010bestip
 
Mcv design patterns
Mcv design patternsMcv design patterns
Mcv design patternsRob Paok
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxKarthigaiSelviS3
 
Vb.net session 01
Vb.net session 01Vb.net session 01
Vb.net session 01Niit Care
 
Cse 6007 fall2012
Cse 6007 fall2012Cse 6007 fall2012
Cse 6007 fall2012rhrashel
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net coreSam Nasr, MCSA, MVP
 
IT reference framework
IT reference frameworkIT reference framework
IT reference frameworkRichard Diver
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsMark Windholtz
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)stanbridge
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfB.T.L.I.T
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part iBisrat Girma
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxanguraju1
 

Semelhante a Ajs 2 c (20)

Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Design Patterns - General Introduction
Design Patterns - General IntroductionDesign Patterns - General Introduction
Design Patterns - General Introduction
 
10265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 201010265 developing data access solutions with microsoft visual studio 2010
10265 developing data access solutions with microsoft visual studio 2010
 
Mcv design patterns
Mcv design patternsMcv design patterns
Mcv design patterns
 
Design Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptxDesign Concepts in Software Engineering-1.pptx
Design Concepts in Software Engineering-1.pptx
 
Patterns
PatternsPatterns
Patterns
 
Vb.net session 01
Vb.net session 01Vb.net session 01
Vb.net session 01
 
Cse 6007 fall2012
Cse 6007 fall2012Cse 6007 fall2012
Cse 6007 fall2012
 
Design patterns
Design patternsDesign patterns
Design patterns
 
AbhishekKapuria
AbhishekKapuriaAbhishekKapuria
AbhishekKapuria
 
Clean architecture with asp.net core
Clean architecture with asp.net coreClean architecture with asp.net core
Clean architecture with asp.net core
 
IT reference framework
IT reference frameworkIT reference framework
IT reference framework
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Domain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic PatternsDomain Driven Design Big Picture Strategic Patterns
Domain Driven Design Big Picture Strategic Patterns
 
Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)Cs 1023 lec 8 design pattern (week 2)
Cs 1023 lec 8 design pattern (week 2)
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part i
 
UNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptxUNIT IV DESIGN PATTERNS.pptx
UNIT IV DESIGN PATTERNS.pptx
 
UNIT 01 SMD.pptx
UNIT 01 SMD.pptxUNIT 01 SMD.pptx
UNIT 01 SMD.pptx
 
Architectural design
Architectural designArchitectural design
Architectural design
 

Mais de Niit Care

Mais de Niit Care (19)

Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 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-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 
Dacj 1-3 b
Dacj 1-3 bDacj 1-3 b
Dacj 1-3 b
 
Dacj 1-3 a
Dacj 1-3 aDacj 1-3 a
Dacj 1-3 a
 
Dacj 1-2 c
Dacj 1-2 cDacj 1-2 c
Dacj 1-2 c
 
Dacj 1-2 a
Dacj 1-2 aDacj 1-2 a
Dacj 1-2 a
 
Dacj 1-1 c
Dacj 1-1 cDacj 1-1 c
Dacj 1-1 c
 
Dacj 1-1 b
Dacj 1-1 bDacj 1-1 b
Dacj 1-1 b
 
Dacj 1-1 a
Dacj 1-1 aDacj 1-1 a
Dacj 1-1 a
 
Dacj 2-2 b
Dacj 2-2 bDacj 2-2 b
Dacj 2-2 b
 
Dacj 2-2 a
Dacj 2-2 aDacj 2-2 a
Dacj 2-2 a
 
Dacj 2-1 c
Dacj 2-1 cDacj 2-1 c
Dacj 2-1 c
 
Dacj 2-1 b
Dacj 2-1 bDacj 2-1 b
Dacj 2-1 b
 

Último

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
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
 
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
 
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
 
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
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
"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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
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
 
"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
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Último (20)

What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
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
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
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
 
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
 
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
 
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?
 
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
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
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
 
"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
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
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
 
"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
 
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
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

Ajs 2 c

  • 1. Collaborate Knowledge Byte In this section, you will learn about: • Selecting a design pattern depending on the business requirements. • The various design patterns that form a part of the TheServerSide.com catalog. ©NIIT Collaborate Lesson 1C / Slide 1 of 24
  • 2. Collaborate Selecting a Design Pattern • Design patterns enable you to design robust software by identifying the key steps undertaken during the application design phase, such as: • Identifying components and their internal structure and relationship among various components that constitutes a distributed application. • Determining and analyzing the level of communication among the components. • Defining the architecture of the presentation layer that is robust • The guidelines for selecting a design pattern are. • You need to identify the need for each type of design pattern. Once the purpose of each group of pattern is identified, choose the appropriate design pattern that helps to solve your problem. • You need to identify the type of problem that a design pattern solves and helps in narrowing the list of suitable design patterns that are applied to the given problem. ©NIIT Collaborate Lesson 1C / Slide 2 of 24
  • 3. Collaborate Selecting a Design Pattern(Contd.) • You need to understand the problem and the related solution of each pattern, which enables you to select appropriate patterns. Based on the solution of each patterns, a final choice can be made to select a final design pattern. • You need to analyze and understand interrelations among patterns. The relevant patterns are grouped together to analyze the complete design and flow of applications. ©NIIT Collaborate Lesson 1C / Slide 3 of 24
  • 4. Collaborate The TheServerSide.com Patterns • The TheServerSide.com is an independent online Java community for enterprise developers and architects. • The TheServerSide community includes TheServerSide.NET, TheServerSide.com, and TheServerSide Symposiums. • TheServerSide.NET community focuses on enterprise development using Microsoft .NET framework. • TheServerSide Symposium discusses development issues that are related to an enterprise development environment. • TheServerSide.com organizes design patterns in different catalogs based on their functionality. ©NIIT Collaborate Lesson 1C / Slide 4 of 24
  • 5. Collaborate The TheServerSide.com Patterns (Contd.) • The TheServerSide.com patterns catalog includes: • EJB Layer architectural Patterns • Inter-tier data-Transfer Patterns • Transaction and Persistence Patterns • Client-side EJB Interaction Patterns • The EJB layer architectural category patterns include: • Session Facade: Provides an abstraction layer hiding all the underlying communication complexities in an EJB application. The use of session façade in an EJB application reduces remote method overhead by providing business components to act as interfaces to the clients. • Message Façade: Uses message-driven beans instead of session beans to enable asynchronous and fault-tolerant access. ©NIIT Collaborate Lesson 1C / Slide 5 of 24
  • 6. Collaborate The TheServerSide.com Patterns (Contd.) • EJB Command: Encapsulates the business logic in command beans and implements loose-coupling between the client and the business-logic tier. This loose coupling results in reducing the number of remote invocations. • Data Transfer Object Factory: Enables transferring of data objects by providing a factory. • Generic Attribute Access: Provides the technique to dynamically set and retrieve attributes of an entity bean using HashMaps. • Business Interface: Enables consistency checking of EJB interfaces during compile time. This pattern provides business interface to enable consistency checking, which needs to be implemented by both the local/remote interface and by the enterprise bean class. ©NIIT Collaborate Lesson 1C / Slide 6 of 24
  • 7. Collaborate The TheServerSide.com Patterns (Contd.) • The inter-tier data-transfer category patterns include: • Data-Transfer Object: Enables bulk transfer of data using serializable objects. • Domain Data-Transfer Object: Is an extension of Data-Transfer Object that enables transfer of data for a specific domain. • Custom Data-Transfer Object: Provides guidelines to transfer data as per the client requirements. • Data-Transfer HashMap: Enables grouping of arbitrary data between client and EJB tier using HashMaps. • Data-Transfer RowSet: Enables the use of RowSets to transfer relational data from ResultSet in the EJB tier to the client tier. ©NIIT Collaborate Lesson 1C / Slide 7 of 24
  • 8. Collaborate The TheServerSide.com Patterns (Contd.) • The transaction and persistence category patterns include: • Version Number: Provides a solution to maintain consistency and checks concurrency problems in the usage of use cases in an application. • JDBC for Reading: Performs listing of data in relational databases using JDBC. • Data-Access Command Beans: Is similar to EJB Command pattern that enables data access using Command beans. • Dual Persistent Entity Bean: Enables creation of entity bean that supports both Bean Managed Persistence (BMP) and Container Managed Persistence (CMP) through inheritance. ©NIIT Collaborate Lesson 1C / Slide 8 of 24
  • 9. Collaborate The TheServerSide.com Patterns (Contd.) • The client-side EJB interaction category patterns include: • EJB Home Factory: Improves the performance of EJB Home Interface by implementing caching with the use of EJB Home Factory. • Business Delegate: Reduces the coupling between the presentation and the business-tier. Business delegate pattern provides a proxy object to serve as an entry point to access business-logics and integration-tier data. ©NIIT Collaborate Lesson 1C / Slide 9 of 24
  • 10. Collaborate The TheServerSide.com Patterns (Contd.) • Following are the design patterns that are similar between J2EE pattern catalog and TheServerSide.com pattern catalog: • Service provided to Worker and Dispatcher View • Session Façade, Message Façade, and EJB Command • Service Locator and EJB Home Factory • Domain Data-Transfer Object, Custom Data-Transfer Object, Data- Transfer HashMap, and Data-Transfer RowSet • Value Object Assembler and Data-Transfer Object Factory • Data-Access Object and Data-Access Command Bean ©NIIT Collaborate Lesson 1C / Slide 10 of 24
  • 11. Collaborate From the Expert’s Desk In this section, you will learn: • Best Practice on: • Guidelines for Developing Class Diagrams • Using Proven Design Patterns • FAQs on Legacy Systems ©NIIT Collaborate Lesson 1C / Slide 11 of 24
  • 12. Collaborate Best Practices Guidelines for Developing Class Diagrams • A UML class diagram depicts the static view of a system. • The view includes the classes and interfaces of the system, their inter- relationships along with the operations and attributes of the classes. • A Class diagram is used to analyze the requirements of the given system in the form of a conceptual model. • As class diagrams plays a vital role to identify the requirements for designing a software system, different styles are applied at different stages of software design. ©NIIT Collaborate Lesson 1C / Slide 12 of 24
  • 13. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • General Guidelines • The general guidelines for developing class diagrams include: • Focus should be given on identifying the responsibilities for classes instead of the specific attributes or operations, while creating a domain class diagram. • Visibility of operations and attributes should be depicted in the detailed design model of the system. • The design model of a class diagram should reflect the naming convention of the implementing language, as it depicts the source code of the structure. • Depict the association classes in the analysis diagram so that it can be re-enforced in the design phase to enable implementation in languages that do not support native code for this concept. ©NIIT Collaborate Lesson 1C / Slide 13 of 24
  • 14. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • Class Style Guidelines • Certain guidelines relating to naming a class are: • Class name should be realistic and should depict the real world object, for which the class is being made. • Class name should be a proper complete noun to make it more descriptive and easier to understand. • Operations should be named in a manner that clearly depicts the functionality that the operations represent. ©NIIT Collaborate Lesson 1C / Slide 14 of 24
  • 15. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • Class Style Guidelines(contd.) • Certain guidelines relating to naming a class are(contd.): • Attributes should also be named precisely and clearly, so that the characteristics that the attributes represented are understandable. • The static operations/attributes should be listed before instance operations/attributes. • Operations names should be consistent among each other, to make the design easier to learn and understand. In addition, names of the parameter variables should be consistent. ©NIIT Collaborate Lesson 1C / Slide 15 of 24
  • 16. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • Relationship Guidelines • Following are some guidelines regarding depicting relationships in class diagrams: • Dependency should be depicted when the relationship is transitory. • Depict the relationship as a tree, when both the classes have dependency relationship over the same class. • Avoid using ‘*’ to depict multiplicity on UML diagrams. • To simplify the diagram, it is always a good practice to depict the type of the attribute instead of depicting the relationship in the diagram. • Implied relationship should not be modeled that runs the risk of maintaining additional code. ©NIIT Collaborate Lesson 1C / Slide 16 of 24
  • 17. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • Association Guidelines • The association guidelines to depict association relationship in a class diagram include: • A general convention is to center the name of the association over the association path, and the name of the association should be in active voice. • The reading direction of an association name should be same as the unidirectional relationship, to maintain consistency. • Role names should be indicated for the classes having multiple association relationships. ©NIIT Collaborate Lesson 1C / Slide 17 of 24
  • 18. Collaborate Best Practices Guidelines for Developing Class Diagrams (Contd.) • Inheritance Guidelines • Inheritance enables reuse of code and data. It models ‘is a’ and ‘is like’ relationships in a UML diagram. • Some of the guidelines are as follows: • It is a general convention to place a subclass under superclass in the diagram. • A subclass should inherit all the attributes and operations from its superclass. ©NIIT Collaborate Lesson 1C / Slide 18 of 24
  • 19. Collaborate Best Practices Using Proven Design Patterns • Design patterns are one of the important reusable resources available to architects as well as to developers that help in designing and developing an efficient application. • Following are the core J2EE design patterns that are in frequent use in application development: • Session Facade: Provides an abstraction layer hiding all the underlying communication complexities in an EJB application. The use of session façade in an EJB application reduces remote method overhead by providing business components to act as interfaces to the clients. • Model view Controller: Decouples the data access, data presentation, and user interaction layers. As a result, high degree of maintainability and reusability among components is achieved. As the components are not tightly integrated to each other, several views can be added without affecting the underlying code and other components as well. ©NIIT Collaborate Lesson 1C / Slide 19 of 24
  • 20. Collaborate Best Practices Using Proven Design Patterns (Contd.) • Value Objects: Provides a single representation of data needed by the EJB invocations. The number of remote calls is reduced by placing all the related data in a single implementation resulting in improved overall performance of the application. • Data Access Object: Encapsulates the access to the data source. It manages the connection established with the data source to access and store data. • Service Locator: Facilitates lookups for distributed components in an enterprise application. Service locator centralizes the lookup and provides handles to all the components. The use of service locator in an application reduces complexity, improves performance by supporting caching, and enables single point of control. ©NIIT Collaborate Lesson 1C / Slide 20 of 24
  • 21. Collaborate FAQs • Why should one use patterns? Use of design patterns helps in optimizing the performance of enterprise applications. Each pattern describes a problem that occurs during the designing phase of an application, and then describes the solution to that problem. The solution to the problem is described in such a way that you can use this solution repeatedly. The knowledge of design patterns enables developers to directly refer to a particular named pattern during implementation and documentation phase of an application. It reduces the overhead of specifying individual classes, relationships, and collaborations that makes up a pattern. • What is an analysis pattern? Analysis pattern is a software pattern that is related to a business domain such as manufacturing, healthcare, and transportation. It enables discovering and capturing of business processes instead of language, structural, or implementation processes. ©NIIT Collaborate Lesson 1C / Slide 21 of 24
  • 22. Collaborate FAQs (Contd.) • What are the main patterns utilized by Java APIs? Following are the main patterns utilized by the Java APIs: • Proxy pattern: Handles method invocations from a proxy object to a principal object. • Decorator Pattern: Enables transparency between class and its subclasses by extending the functionality of a class. • Factory Method: Provides the ability to create an object of a class without any dependency/relation. It delegates the choice of creating object of a class to another object. • Abstract Factory: Provides a way to instantiate an abstract class from the corresponding subclass ©NIIT Collaborate Lesson 1C / Slide 22 of 24
  • 23. Collaborate Challenge 1. Match the following: a. Singleton i. Dynamically attaches responsibilities to an object b. Bridge ii. Defines representation of grammar for a given language for interpretation. c. Façade iii. Ensures that a class has only one instance. d. Decorator iv. Decouples abstraction from its implementation. g. Interpreter v. Provides a unified interface to a set of interfaces in a subsystem. • javax.ejb.EJBHome and javax.ejb.EJBLocalHome J2EE technology feature is associated with __________ pattern. • javax.ejb.EJBObject interface is associated with _____________ pattern. • Which GoF’s design pattern does the JMS Publish/Subscribe Model is associated with? ©NIIT Collaborate Lesson 1C / Slide 23 of 24
  • 24. Collaborate Solutions to Challenge 1. a. – iii, b. – iv, c. – v, d. –i, e. –ii 2. Factory Method 3. Proxy Pattern 4. Observer design pattern ©NIIT Collaborate Lesson 1C / Slide 24 of 24