About the Multi-Tiered Business Components Architecture

Any J2EE application has up to three separate logcal tiers:

The business services and MVC model is the business tier; the MVC view and controller generally operate on one of the other two tiers.

When Oracle ADF Business Components provide business services, it is easy to rearrange these three separate tiers into several different deployment configurations:

Oracle ADF Business Components is deployment-configuration independent, which means that you can switch between local/web module and remote deployment configurations with no change in code.

This is a marked improvement over other programming styles. Without Oracle ADF Business Components , you would have to plan your entire application around your deployment configuration--an application designed around EJBs would look entirely different from an application with the model, view, and controller in the same container or JVM. With Oracle ADF Business Components, you can program and invoke a business components EJB and a locally deployed business components archive in exactly the same way.

Choosing a Deployment Configuration

When you choose the configuration of your business components application, ask yourself the following questions:

Advantages of Tier-Independence

Tier-independence gives you multiple advantages:

Maintaining Tier-Independece

The business components framework is organized around interfaces in the oracle.jbo package, such as oracle.jbo.ApplicationModule, oracle.jbo.ViewObject, and oracle.jbo.Row. By coding your client to these interfaces, rather than the classes that implement them, your code can stay tier-independent. If, for example, you choose to deploy your business components as an EJB, you can use the same client code you used for testing when your business components were deployed locally, because the interfaces are always accessible in the client tier. The business components framework handles all issues of cross-tier communication for you.

The interfaces in oracle.jbo are implemented by classes in the package oracle.jbo.server. For example, oracle.jbo.ApplicationModule is implemented by oracle.jbo.server.ApplicationModuleImpl. You should not directly call methods on these implementation classes, because if you deploy remotely, these classes will not be available on the client tier. Invoking the classes would prevent you from ever deploying your application remotely. Instead, you should call methods on the interfaces.

Similarly, when you create your own application module and view object classes, you should not call methods on their implementation classes. Instead, you should export methods to create custom interfaces that contain them. These interfaces extend oracle.jbo.ApplicationModule or oracle.jbo.ViewObject and are also always accessible in the client tier. When you downcast a business component, always downcast to your interface, never to your implementation class. For more information, see the related topics list.

Avoiding Tier-Independence

You may decide that you do not want to use Oracle ADF Business Components' abilities to manage tier-independence. You can do this by deploying as a particular sort of EJB session bean, called a service session facade. For more information, see the related topics list.


Introducing Oracle ADF Business Components
About Oracle ADF Business Domain Components, Data Model Components, and Organizational Components
Exposing Business Components Methods to Clients
Calling Exported Methods from Clients
Accessing Data from Clients
Accessing a Root-Level Application Module
About Service Session Facades

 

Copyright © 1997, 2004, Oracle. All rights reserved.