ITWissen.info - Tech know how online

business components for Java (BC4J)

Oracle Business Components for Java (BC4J) is a framework based on Java and XML. The special thing about it is that BC4J is a so-called technical framework. With the help of BC4J the development of multi-tier, database-driven Java applications based on components - and not only J2EE components- is possible. The framework ensures flexible possibilities for the distribution of components as well as an easy connection of narrow Java clients based on Swing, Servlets or Java Server Pages. The clean layer separation of BC4J corresponds to that of the J2EE architecture. Distribution to different platforms is possible without further modification of the code. With Oracle JDeveloper 9i a good tool support is available, even if the framework itself requires a relatively high effort for familiarization. Technical frameworks realize the development of applications and integrate thereby:

  • Software building blocks with basic functionalities such as connection pooling, caching, locking or master-detail synchronization - in BC4J this basis is represented by the Java class libraries.
  • Basic tools for the development of software. In terms of BC4J, these are special JDeveloper Wizards and as of JDeveloper 3.2. these possibilities have been integrated into the Designer Repository.

The technical frameworks are contrasted with the domain-oriented frameworks, which integrate predefined business components for specific areas of application. Accordingly, BC4J is not a domain-oriented framework that can also be used to develop domain-oriented components that then contain the business logics.

The architecture of BC4J applications is based on different types of objects - the entity objects and the view objects as well as the application modules.

Entity objects define an object-relational mapping of the tables of the database - they thus correspond 1:1 to the tables of the database. The columns of the tables become attributes of the entity objects. The entity objects are also used to implement persistence and caching, among other things. In addition, the actual business logic can be implemented in a central location in the entity objects. For this purpose, an entity object consists of an XML file for the meta data and a Java file for the implementation of business logic. The relationships between entity objects are mapped by associations and are based on foreign key constraints of the associated tables. Thus, entity objects also organize database interactions, so caching and locking is done at the entity object level

View objects control access to the application's data in the form of encapsulated SQL statements. The basis for the view objects are the entity objects. When the query of a view object is executed, the corresponding entities are created via the cache. However, this does not apply to so-called read-only view objects. For this case there are special objects, these are called Fast Lane Reader. The view objects provide all necessary functions for navigating in result sets, so that the clients only access the entity objects via view objects. Likewise, changes are implemented via the attributes of view objects, which is then delegated to the underlying entity objects with their respective business logic. Likewise, master-detail relationships are coordinated via view links.

Applications modules combine view objects and view links to support a use case and can also provide additional services in the form of custom methods. This is how the interfaces of BC4J applications to the client are realized. Applications modules form components that can be distributed to different platforms. Likewise Applications modules define the appropriate transaction context. One speaks also of compound applications, if applications are based again on other applications.

The BC4J framework supports a flexible distribution on different platforms, without a change of the application components is necessary, in the form of:

  • Enterprise JavaBeans - thereby application modules become Session-Bean.
  • Java CORBA Components - where application modules become CORBA Server Objects.
  • Local deployment - application modules become JAR archives.

Oracle JDeveloper 3.2 supports deployment to Oracle9i or BEA Weblogic Application Server. Based on BC4J application modules and view objects, Java clients such as Thin Java UI clients (Swing clients), Java Servlets and Java Server Pages can be easily developed.

Informations:
Englisch: business components for Java - BC4J
Updated at: 19.04.2010
#Words: 680
Links: Java, framework, database (DB), Java 2 enterprise edition (J2EE), connection
Translations: DE
Sharing:    

All rights reserved DATACOM Buchverlag GmbH © 2024