The design of Open Journal Systems 2.x is heavily structured for maintainability, flexibility and robustness. For this reason it may seem complex when first approached. Those familiar with Sun’s Enterprise Java Beans technology or the Model-View-Controller (MVC) pattern will note many similarities.
As in a MVC structure, data storage and representation, user interface presentation, and control are separated into different layers. The major categories, roughly ordered from “front-end” to “back-end,” follow:
As the system makes use of inheritance and has consistent class naming conventions, it is generally easy to tell what category a particular class falls into. For example, a Data Access Object class always inherits from the DAO class, has a class name of the form
[Something]DAO, and has a filename of the form
The following diagram illustrates the various components and their interactions.
Figure 1.1. Open Journal Systems MVC Diagram
The following files are in the root directory of a typical OJS 2.x installation:
Table 1.1. Open Journal Systems File Structure
|Directory containing cached information
|Directory containing most of the OJS 2.x PHP code: Model classes, Data Access Objects (DAOs), core classes, etc
|Sample configuration file
|System-wide configuration file
|Directory containing XML database schemas and data such as email templates
|Directory containing system documentation
|Directory containing system help XML documents
|Directory containing system bootstrapping PHP code: class loading, miscellaneous global functions
|All requests are processed through this PHP script, whose task it is to invoke the appropriate code elsewhere in the system
|Directory containing ADODB (database abstraction) and Smarty (template system) classes
|Directory containing locale data and caches
|Directory containing Page classes
|Directory containing additional plugins
|Directory containing files to be made available to remote browsers; for example, journal logos are placed here by the system
|Directory containing various XML data required by the system: scheduled tasks, available locale names, default journal settings, words to avoid when indexing content.
|Directory containing XML data used by the Reading Tools
|Directory containing CSS stylesheets used by the system
|Directory containing all Smarty templates
|Directory containing tools to help maintain the system: unused locale key finder, scheduled task wrapper, SQL generator, etc.