Jump to content

XRX/Application Modularity

From Wikibooks, open books for an open world
< XRX

Motivation

[edit | edit source]

You want to be able to package and reuse XRX applications.

Method

[edit | edit source]

We will use the collection structure of native XML databases to package XRX applications.

Our XRX Application framework uses the following conventions:

  • All applications are placed in a common collection called apps. This is similar to the "/Applications" folder on a Mac(TM) or the "Program Files" folder in Microsoft Windows(TM).
  • Each application has a collection of its own within the apps collection. We use REST-friendly application names that have only lowercase letters and dashes. For example a tool that manages organization business terms might be located in a collection called "/db/apps/terms". Databases that host multiple organizations might store each application collection in a separate apps collection for each organization. For example "/db/org/my-company/apps"
  • All user-manageable data that is contained within the application is contained with a "data" collection within the application collection.
  • XQuery functions that are common to multiple applications should be stored in a sibling folder to the "apps" collection. This allows each application to use relative module imports so that applications can be quickly re-installed on other sites.