MMBase Applications


All configuration files of the applications present in your MMBase installation are located in the directory /WEB-INF/config/applications. If you have a look at this directory, you will see that it contains a file called MyNews.xml and a directory MyNews. All MMBase applications follow this structure: an XML-file with the name of the application and a directory with the name of the application.

The XML-file with the name of the application contains the description of the cloud-structure used by that application. We will have a closer look at MyNews.xml to see the different parts:

The contextsource specifies where the file with the backup scenario for this application is located - specified in its path attribute. For MyNews we saw that this is "MyNews/backup.xml".

Most applications come with a 'backup.xml' file that describes the startpoint for exporting data (as described below). It is not necessary to specify a file - i.e. if an application is only meant to be installed and not exported. You can also use other filenames (though 'backup.xml' is the convention) or specify multiple contextsources. In the latter case, the administration pages require the user to choose the contextsource with which to make the export, using the freeform goal attribute to give user-feedback on the intention of the contextsource.

The way MMBase makes a backup of the content in an application in the form of XML-files needs special attention. To be able to determine which objects are necessary for an application and have to be incorporated in the backup and which objects are not, MMBase uses a backup algorithm. The backup algorithm to use is specified in the type attribute. Currently, the only algorithm available for export is 'depth' (Future implementations may involve more algorithms).

The 'depth' backup algorithm starts at the startnode specified in the context source (i.e. "backup.xml") file. The startnode is written to the appropriate XML backup file and MMBase searches for nodes related to this startnode, which are not already included in the backup. These new nodes are now taken as the startnodes and the whole process repeats as long as their are nodes found that have not already been included in the backup or until the maximum depth as specified in backup.xml is reached.

If you have a look at this file you see that it consists of the following tags:


This is part of the MMBase documentation.

For questions and remarks about this documentation mail to: [email protected]