In a layers design pattern, each layer can only call downward. JSPs
call Bean methods, which in turn call JPO methods, which in turn call
ENOVIA Studio Customization Toolkit methods. Beans currently contain calls to
ENOVIA Studio Customization Toolkit methods (since they were developed before
JPOs existed) but most of these calls are isolated in the DomainObject
base class.
The most used methods in DomainObject are findObjects(),
getInfo(), and getRelatedObjects(). Beans represent Business logic (grouped
by type), Utility logic (grouped by function), and access to UI components.
Trigger logic should live in JPO methods. Trigger methods should be grouped
into classes by type. Column support methods can be grouped into a companion
JPO responsible for UI.
Each layer performs specific roles:
- JSP (view). JSPs are packaged by application. They are for presentation only so they
use tags and call Beans. This is known as "Business Delegate design pattern."
- Bean (model front-end) . Beans are no longer distributed in a single jar. They contain business
logic, the (web) services API, and call JPOs. This is known as "Bridge
design pattern.".
- JPO (model back-end). JPOs are installed by ENOVIA products. They implement business logic,
call the ENOVIA Studio Customization Toolkit, and are used for triggers and
UI component support.
The ENOVIA architecture uses a Model View Controller design pattern,
where presentation is isolated from business logic. This design allows
multiple views for a common model, and facilitates the management of
code. ENOVIA highly recommends that your customizations adhere to this
design pattern. The view portion is defined in the JSPs. The model portion
is spread over Beans and JPOs. The ultimate goal is to have all business
logic live in JPOs. ENOVIA has been moving business logic from JSPs into
Beans, and now is moving it from Beans into JPOs.
Business logic is accessed through Beans. There is a type Bean for
each business type, and Beans for some relationship types. The Part Bean
provides services that one would expect to operate on Part objects. Currently,
JSPs and stand-alone applications are consumers of these services. Eventually,
a subset of these services will be turned into web services so that they
can be accessed remotely, say from a portlet. The controller portion
will be formalized through the addition of a Controller to be incorporated
into the architecture.