Adding Service Methods to an Application Module (continued)
Example: Deciding When to Add Custom Code to an Application Module
Two application modules, OrderManagementApp and CustomersApp, both have CustomersView in their data model. CustomersApp requires code to perform analysis of customers’ purchasing history; OrderManagementApp does not need this information. Adding this code to CustomersView would add size and complexity to the view object for the sake of functionality that will never be used by OrderManagementApp. Therefore, you should add your custom code to the CustomersApp application module.
To add a service method, you first enable a Java class, then add code to it, and finally publish the service method. You have already learned how to enable the Java class; the second and third steps are detailed in the following slides.