"An application module can expose its data model of view objects to clients without requiring any custom Java code. This allows client code to use the
ApplicationModule
, ViewObject
, RowSet
, and Row
interfaces in the oracle.jbo
package to work directly with any view object in the data model. However, just because you can
programmatically manipulate view objects any way you want to in client
code doesn't mean that doing so is always a best practice.Whenever the programmatic code that manipulates view objects is a logical aspect of implementing your complete business service functionality, you should encapsulate the details by writing a custom method in your application module's Java class."
You can write your own code to configure view object properties to query the correct data to display, you can perform in custom code any kind of multistep procedural logic or finally you can perform aggregate calculations iterating over one or many view objects.
Adding a service method to an application module has many advantages. Some of them are:
- allowing multiple client pages to easily call the same code if needed
- code which can be more clear for the clients (client applications and thier developers)
- option open to improve your implementation without affecting clients
- simplifying of the regression-testing of your complete business service
- enabling declarative invocation of logical business functionality in your pages
- In the Application Navigator, double-click the application module.
-
In the overview editor, click the Java navigation tab.
-
On the Java Classes page, click Edit Java Options.
-
In the Select Java Options dialog, select Generate Application Module Class.
- Click OK.
No comments:
Post a Comment