Structuring a Multi-API Application

There are several cases when it makes sense to create multiple API classes. Below are a few typical scenarios. As some API functionality might be needed by all APIs, it's incorporated into a System Controller.

Multiple Interfaces

Most web software use multiple web interfaces. User Frontend and Admin are separate Web interfaces, both of which take advantage of the page concept. Then there are command-line utilities which are designed for a single purpose, such as doing a cron-job, or for command-line manipulations.

Multi-lingual or satellite sites

Sometimes you will want your software to run in multiple regions mostly unchanged, however you need to have the flexibility to add regional or site-specific changes. In this case you will want to create an intermediate API (parent), which is then extended for each regional site.

Site1 and Site2 API classes can change theme, skin or add additional templates/translations for localization.

Specific Applications

If your Agile Toolkit-based software requires installation, you may want to create a simple interface which can help the user set up the software. You might want to create a new API for an installer in general, then extend it to customize it with your installation steps. This way you can share the generic installer class with the community, or with other projects while retaining the flexibility of customization.