Description: Provide a framework that promotes code reuse with clean separation points for application development roles including: transactional, entity, and presentation logic.
Setup
There is some special code needed by all entities to be "designable" in the visual component designer. The minimum code is shown in EntityTemplate.java. DataModules that contain these entities must implement the com.borland.samples.dx.orderentry.entities.Module interface to use the entities in this project. com.borland.samples.dx.orderentry.entities.Module interface provides entities access to their containing com.borland.samples.dx.orderentry.entities.Module implementation. This interface is important for obtaining access to other entities needed in PickList and MasterLink property settings.
By design, entities do not know the implementation of their data provider or resolver. It is the containing DataModules responsibility to set the provider and resolver for each entity used. ServerModule is a JDBC implementation for the com.borland.samples.dx.orderentry.entities.Module interface. It supplies QueryProvider and QueryResolver components for the contained entities.
The benefits of this design are that: 1) Entities can be reused by multiple DataModules. 2) Entities can be extended via inheritance. 3) Having provider/resolver specified by the container creates a clean application partition point where transactional retrieval and persistence can be handled on a separate tier (see samples/NTier/NTier.jpr). 4) Transactional, entity, and presentation logic are now cleanly separated allowing developers with different roles to focus on specific tasks.
This sample also provides examples of parametized queries, fetchAsNeeded master detail, pickList, primary key generation with propagation to details.
Caveats
In developing this sample some issues arose with the 3.0 components.
Most of these will be addressed by a future release of JBuilder, but in
the meantime some additional components and component extensions were developed
and are delivered in the dataset package of this project. This includes: