Generating Chart Data on the Server

Now that you’ve seen how to chart data, it is important to see how data can be generated by the server in response to an AJAX request. As with all other requests, the server-side PHP handles it by using a LocalInventoryCostBCO/VCO combination like the ones described in Chapter 3.

The LocalInventoryCostBCO shows the strength of modularity described in Chapter 2. Since the data to be retrieved is the same data that is displayed in the business inventory remoting example from Chapter 7, it calls the LocalInventoryBCO itself. Since that BCO is loosely coupled and tightly cohesive (see Chapter 2 for a definition of these terms), it can be called without any knowledge of what it actually does. If its functionality ...

Get Oracle Database Ajax & PHP Web Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.