Once an enterprise application has been delivered to a customer, it usually must be customized after installation to tailor it to the needs of the particular site. In typical situations, these customizations are made by obtaining the source code of the original application and modifying it. On-site consultants or internal Information Technology engineers change the original source code to make these customizations. Changing source code is potentially risky and causes re-testing to ensure that the new features, as well as the original underlying functionality, work correctly. After this expensive and time-consuming process, the customized application is placed into service.
After a period of time, new versions of the original application are delivered to the site to fix bugs or add new functionality in the base application. On-site consultants or internal Information Technology staff must then:
Re-obtain the new source code from the application provider.
Diff and merge (that is, manually re-apply) all of the changed source code from the previous customization with the new source code to determine where customizations need to be re-applied.
Manually re-apply the customizations to the new source code.
Re-implement the customized application at the site.
Re-test the modified components.
This entire process must be repeated each time a new version of the original application is delivered.
In contrast, the Business Components for Java framework supports layered component customization. This means that applications built and delivered as a set of Business Components can be easily extended without modifying the original application source code.
Business Components let you perform these customizations without requiring changes to the original application's source code, and in a way that allows new versions of the original application components to be "dropped-in" without requiring manual re-application of the customizations.
The Business Components for Java framework allows the original component's existing features to remain available while allowing you to add new features, attributes, and business logic, or override some of the behavior of the original.
The customized components can optionally completely substitute the original component implementations in the delivered application without touching the original application's source code through "factory substitution". This means that if a customized "Order" component has changed the way tax is calculated as part of its customizations, this new behavior can be "substituted" into the existing order-entry system by creating a "CustomizedOrder" component and substituting it for the original "Order" component.
JDeveloper wizards provide the functionality to let you extend the definition of existing Business Components. You can extend Entity Objects, Associations, View Objects, View Links, and Applications Modules. The wizards allow you to identify an existing component to serve as the base of the extended component. JDeveloper then generates the Java and XML files for the extended component. The extended component uses the Java extend capability to inherit the base component's Java implementation class and metadata. You can extend this inheritance to multiple levels. That is, you can create a component B which is extended from component A, then create a component C which is extended from component B.
The process of customizing components follows these general steps:
Create a JAR file containing the existing components and their project (.jpx) file. Typically, this will already have been done for you by the application supplier.
Create a JDeveloper library for the JAR file and add it to the list of libraries for the new project.
Import a package of existing components from the JAR file using the Import Package option in JDeveloper.
Create a new package with a different name from the original to house the customized components.
Use the wizards to create new components in your new package that extend the appropriate components in the imported package.
Optionally, if you want the extended component to completely replace the original in an existing application, substitute the extended component for the original.