Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 

User Guide - Patterns

Index    Previous   <<>>  Next
  
12.1 Overview

12.2 Adding a pattern

12.3 Editing a pattern

12.4 Removing a pattern

12.5 Pattern details

   12.5.1 Data Access Object (DAO)

   12.5.2 Service Locator

   12.5.3 Value Object (VO)

   12.5.4 Business Interface

   12.5.5 Business Delegate

   12.5.6 Front controller

   12.5.7 View Helper

   12.5.8 Service to worker

   12.5.9 Session façade

   12.5.10 Message façade

  12.1  OverviewTo top of page

JCodeBox allows you to apply tried and tested J2EE design patterns to your applications and components.

In addition to applying patterns at the object level to individual components, JCodeBox also allows you to apply some patterns at the tier level (i.e. applied to all applicable components in that tier).

Each pattern needs to be configured differently (depending on its properties, etc) however the way you add/edit/remove a pattern is the same regardless of what pattern and whether you are applying it to a tier or a single component.

The first 3 sections in this chapter explain generically how to add/edit/remove a pattern. The subsequent sections then explain the properties/settings specific to each pattern.

Currently the following patterns are supported:

  • Data Access Object (DAO)
  • Service Locator
  • Value Object (VO)
  • Business Interface
  • Business Delegate
  • Front controller (automatically applied to the web tier)
  • View Helper (automatically applied to the web tier)
  • Service to worker (automatically applied to the web tier)
  • Session facade
  • Message facade
  12.2  Adding a patternTo top of page

  • Adding a pattern
    • Select the pattern tab (either in the define component dialog or the tier properties dialog)
    • Press the Add (patterns) button
    • The select pattern dialog is displayed
    • Select the pattern you would like to apply and press OK
    • The dialog specific to the pattern you have selected will be displayed
    • Complete the pattern specific dialog. Press OK
    • Your pattern will be displayed in the patterns list.

  12.3  Editing a patternTo top of page

  • Editing a pattern
    • Select the pattern tab (either in the define component dialog or the tier properties dialog)
    • Select the pattern you would like to edit.
    • Press the Edit (patterns) button
    • The dialog specific to the pattern you have selected will be displayed
    • Make any changes required in the pattern specific dialog. Press OK
    • Your updated pattern will be displayed in the patterns list.

  12.4  Removing a patternTo top of page

  • Removing a pattern
    • Select the pattern tab (either in the define component dialog or the tier properties dialog)
    • Select the pattern you would like to remove.
    • Press the Remove (patterns) button
    • Your pattern will be removed from the patterns list.

  12.5  Pattern detailsTo top of page

        12.5.1  Data Access Object (DAO)To top of page

TierEIS
ApplicabilityTier and components (entities)

  • Package name
  • The package to use for the DAO classes.

    Note: If the package name is left blank, the DAO classes will be placed in a package relative to the package the target EJB is in.

  • Class name
  • The class name for the main DAO class.

    Note: If applied at the tier level, you will not be able to enter a class name for the DAO pattern. The class name will be derived from the target entity during generation.

        12.5.2  Service LocatorTo top of page

TierBusiness
ApplicabilityTier only

  • Package name
  • The package to use for the Service Locator classes.

  • Class name
  • The class name for the main Service Locator class.

        12.5.3  Value Object (VO)To top of page

TierBusiness
ApplicabilityTier and components (EJBs)

  • Package name
  • The package to use for the value object classes.

    Note: If the package name is left blank, the value object classes will be placed in a package relative to the package the target EJB is in.

  • Class name
  • The class name for the main value object class.

    Note: If applied at the tier level, you will not be able to enter a class name for the value object pattern. The class name will be derived from the target EJB during generation.

  • Updateable
  • Indicates whether or not the value object should be updateable (Updateable Value Objects Strategy).

  • Value Object fields
  • Use the Add/Remove fields button to add or remove fields to your value object via the select value object fields dialog (your value object must have at least one field).

    Note: If applied at the tier level, you will not be able to select any fields for the value object pattern. The pattern will use all of the fields in each EJB it is applied to.

        12.5.4  Business InterfaceTo top of page

TierBusiness
ApplicabilityTier and components (EJBs)

  • Package name
  • The package to use for the Business Interface.

    Note: If the package name is left blank, the Business Interface will be placed in a package relative to the package the target EJB is in.

  • Interface name
  • The interface name for the Business Interface.

    Note: If applied at the tier level, you will not be able to enter an interface name for the Business Interface pattern. The class name will be derived from the target EJB during generation.

        12.5.5  Business DelegateTo top of page

TierBusiness
ApplicabilityTier and components (EJBs)

  • Package name
  • The package to use for the business delegate classes.

    Note: If the package name is left blank, the business delegate classes will be placed in a package relative to the package the target EJB is in.

  • Class name
  • The class name for the business delegate class.

    Note: If applied at the tier level, you will not be able to enter a class name for the business delegate pattern. The class name will be derived from the target EJB during generation.

        12.5.6  Front controllerTo top of page

TierWeb
ApplicabilityTier only

This pattern is automatically applied to the web tier when there are any web components defined in the application. It cannot be added/removed by the user

        12.5.7  View HelperTo top of page

TierWeb
ApplicabilityTier and components (web components)

This pattern is automatically applied to the web tier when there are any web components defined in the application. It cannot be added/removed by the user

        12.5.8  Service to workerTo top of page

TierWeb
ApplicabilityTier only

This pattern is automatically applied to the web tier when there are any web components defined in the application. It cannot be added/removed by the user

        12.5.9  Session façadeTo top of page

TierBusiness
ApplicabilityComponents (i.e. EJBs) only

Use a session EJB to implement the session facade pattern (encapsulate complex workflow and interactions).

        12.5.10  Message façadeTo top of page

TierBusiness
ApplicabilityMDB Components only

Use a message driven bean to implement the message facade pattern (asynchronous access).

Index    Previous   <<>>  Next

Copyright Michael Campbell Associates Ltd. 1999-2003. All Rights Reserved