|
Oracle JDeveloper
Extending Oracle E-Business Suite with JDeveloper
By Regis Louis
Modifying Oracle E-Business Suite for your organization's needs? Oracle JDeveloper offers the benefits of easy integration and flexibility.
The Oracle E-Business Suite offers a variety of applications designed specifically for individual industries and business operations. Oracle E-Business Suite is a complete set of business applications that enables you to efficiently manage customer interactions, manufacture products, ship orders, collect payments and perform other operational tasks, all from a business system with an open, unified architecture.
However, to satisfy the unique requirements of your business, you might have to extend or modify the user interface (UI) and the business logic provided by default in the Oracle E-Business Suite. For example, you want to change an HTML page by adding or removing UI objects or displaying information from another data source. Or you may want to modify the business logic, adding validation or business rules that could require alterations in your database queries. Or perhaps you've been asked to develop a whole new set of screens to provide capabilities not covered by the Oracle E-Business Suite.
Because the Oracle JDeveloper Java IDE is used internally by Oracle developers to create applications for the E-Business Suite, it is the best solution for these needs: You get the benefit of its capabilities as an integrated part of Oracle's application-development stack. And, because you're using the same development framework as Oracle, you can seamlessly integrate your application extensions into the E-Business Suite applications.
When the JDeveloper OA Extension ships with Oracle Applications 11.5.10, the entire Oracle JDeveloper environment can be configured out-of-the-box and optimized for Oracle Applications, allowing developers to quickly start developing the extensions they need in accordance with best practices.
Architectural Overview
To address the increasing complexity of the standard J2EE development platform, Oracle JDeveloper provides an application development framework that helps developers be more productive when developing applications. The Oracle E-Business Suite technology stack uses this framework to develop and deliver high-performance, scalable, and extensible applications.
A key feature of the framework is its pervasive use of metadata for describing both the user interface and the business logic. The metadata is stored as XML on the file system and can be available at runtime from a database repository. This widespread use of metadata allows you easily to extend and personalize applications developed with the framework. For example, the metadata lets you:
- Personalize both the business logic and the user interface, depending on the user profile
- Retain extensions developed across patches and upgrades
- Pick up central changes in performance optimizations, new technologies, and the UI look and feel without having to change the code.
Another benefit of the framework is that it's designed to implement the best J2EE design patterns, allowing developers to focus on the business logic and user interface without having to design or code the "plumbing" around the application.
The Oracle JDeveloper framework is based on the Model-View-Controller (MVC) architectural pattern. In this architecture, the Model is in charge of data access and the manipulation of the data entered into the application. Through the Model, developers implement the business and validation rules that govern the information retrieved from the database. The View handles rendering the user interface, and the Controller manages the application flow. By separating the business logic from the user interface, the Model-View-Controller architecture makes it easy to focus on the specific development tasks required for your application. (See Figure 1.)
Let's drill down and see how, using the Oracle JDeveloper framework, you can extend the Oracle E-Business Suite. We'll focus on how to extend the business logic with Oracle Business Components for Java and the user interface with Oracle UIX.
Extending the Business Logic with Oracle Business Components for Java
A key component in the JDeveloper framework is Oracle Business Components for Java (BC4J), which handles the modelthe data access and business logic.
In a J2EE application, developers are encouraged to follow standard design patterns and practices. BC4J, a J2EE framework, implements these standard J2EE design patterns and samples. It handles Object/Relational mapping and the binding between the different tiers in the J2EE architecture. BC4J takes care of the underlying structurethe "application plumbing" facilitiesso developers can focus entirely on implementing the business logic. You can rely on the BC4J framework to provide a well-designed application.
Although BC4J handles all the common cases, you might want to alter a design pattern for a particular application component. With a few lines of code, you can override the automatic behavior provided by the framework.
Each BC4J component comprises an XML Component Definition and a Java Implementation Class, which cleanly separates metadata from domain-specific code. Through these built-in mechanisms, you can define your business logic declaratively (with an XML definition) or by using Java. You don't have to write Java code to define simple business rules. Instead, you can use an XML definition to declare, for example, that a salary type cannot exceed $10,000 (see Figure 2). But you still have all the power of Java to express complex business logic.
The BC4J framework also manages access to the database. It automatically transforms relational data into Java objects that you can manipulate in your business-logic code. When you write code to retrieve data from a table, BC4J creates the SQL for you. The framework is open and expansible; you can edit the generated SQL statements to optimize them for your database.
By using metadata to describe the model definition and business rules, BC4J makes it simple to extend the Oracle E-Business Suite business logic. It allows a developer to easily override a specific behavior, specify a special business rule, or modify a SQL query to personalize the business logic for a defined set of users. For example, you can personalize the behavior of the application for a class of users, based on their responsibility in the enterprise, by extending the BC4J objects and exposing this metadata only to this group of end-users.
With BC4J, you don't have to focus on planning, testing, or implementing any standard J2EE design patterns or components, from data access to deployment. You can focus instead on solving the unique issues of your business application by personalizing the existing business logic or creating your own logic.
Extending the User Interface with UIX
To define and render the HTML for the user interface, the Oracle E-Business Suite uses UIX, another component of the Oracle JDeveloper framework
Based on the latest standards of J2EE and XML, and a precursor of the upcoming JavaServer Faces standard, JSR-127, UIX is designed to give both user-interface designers and application developers an extensible framework for building scalable web applications with a consistent look and feel.
With UIX, the UI is described as XML metadata, representing the various UI objects and their hierarchy. The use of metadata to define the user interface provides many advantages:
- The user interface can be rendered differently by different devices. For example, if you request a user view from a browser, at runtime the metadata is read and the HTML generated to produce the user view on that browser. If you make the same request on a mobile device, UIX detects the source of the request and generates the appropriate language to render the user view on the mobile device.
- You can easily personalize the user interface. An administrator can define different views for different users or classes of users by declaratively overlaying metadata associated with that user's or group's privileges.
- You can enforce a consistent look and feel by centralizing it and applying it to all the pageswithout having to change the code.
- The translatable strings are easy to extract and can be translated into any languages.
- Using XML for the metadata also lets you perform any type of complex transformation, making upgrades and migrations much easier than with hard-coded pages.
With UIX, developers can describe the UI in terms of hierarchical objects (see Figure 3). A user view can be described as a region containing objects. Regions and objects can be nested; an object can contain other regions, which contain other objects. You can think of a page as a hierarchy of objects, each object exposing its properties.
You define an object through its properties. For example, for a text field, you can define a prompt, the length of the field, and other properties, which are also stored as XML metadata, making the development experience declarative and productive. UIX provides a large set of UI components, including common components (fields, buttons, and so on) and more complex UI objects such as trains, breadcrumbs, and Tabs, giving you great flexibility when you design a page.
Oracle JDeveloper provides wizards and visual tools to create UIX Pages, individual objects, and object properties. JDeveloper's Oracle Applications(OA) extension (available via MetaLink; contact Oracle Support for details), optimized for extending the E-Business Suite, adds a declarative interface that enables you to quickly develop and extend the E-Business Suite user interface.
Because a page is described as metadata, E-Business Suite administrators and end users can also tailor the UI at runtime by setting preferences for each page. For example, you can show or hide fields, or change the order of fields on the page, the number of rows displayed in a field, the sort settings, or the field labels. Preferences can be set for groups or individual users and are stored in a database repository, not in the application. This means that your preferences are preserved when you upgrade the E-Business Suite.
UIX offers runtime productivity features that are critical for HTML. For example, partial-page rendering can refresh part of a page, so you can avoid having to refresh an entire page whenever you want to scroll to a new item. Let's say you're scrolling through a table; when you request the next set of records, this feature displays only the new records, not the whole page, making the end-user experience more productive and interactive.
In Conclusion
JDeveloper and the Oracle Application extension will allow customers to extend the eBusiness Suite in a productive and standard way. Furthermore, the end-to-end J2EE framework included in JDeveloper being based on meta-data, these extensions will benefit automatically of the personalization capabilities, allowing administrators and end-users to define business logic and user interface preferences in a repository, available even after patches or upgrade to a new version of the eBusiness Suite.
Regis Louis is Director of Product Management in Oracle's Application Development Tools organization. Regis has been working with Oracle Corporation since 1994, initially in consulting, where he has gained extensive development experience. He is now in charge of evangelism and product direction for JDeveloper, focusing especially on the Oracle Application Development Framework.
|