Next, we define the service classes Main, Lookup, and Add. These classes contain the following supporting logic:
- Main: Capturing URL parameters and building an AJAX target URL for the initial view
- Lookup: Performing purchases lookups
- Add: Saving a new purchase
First, we will examine the Base class, which all three service classes extend.