< Installation

Projects Handling >

2. Structure

2.1. Introduction

This chapter is an overall tour of the CartoWeb code structure. It briefly explains the role of each directory. When available, links to relevant chapters of this documentation are also provided.

2.2. Global Directory Structure

After installation, CartoWeb has the following directory structure:

2.3. Plugins

Modularity is a key feature of CartoWeb. Its functionalities are packaged in logical sets called plugins, that aim to be independent from each other, although some dependencies cannot be totally avoided. Some plugins (core plugins) cannot be disabled, while the other ones must be explicitly loaded in the server and/or client configuration files.

Nearly all plugins have configuration options set in .ini files. The full description of these options makes the bulk of this user manual.

Modifying existing plugins or writing new ones requires some acquaintance with PHP5, as it involves some coding. The related documentation is thus reported to the developer's part of this manual (see Section 2.1, “ What are Plugins”), but that shouldn't deter anybody from experimenting with it.

Each plugin directory contains one or more subdirectories. Here are all the possible subdirectories:

  • client: Client-side plugin code
  • common: Client and server code
  • htdocs: Web accessible directory
  • server: Server-side plugin code
  • templates: Smarty templates

2.4. Projects

The aim of projects in CartoWeb is to clearly separate mainstream files from project-specific files. Developers should thus only work in projects, and not modify/add/delete files in the root directory. This will ensure smooth updates.

The directory /projects/my_project has exactly the same structure as the root directory shown above: Section 2.2, “Global Directory Structure”

Files added in directory /projects override corresponding files of the root directory. For instance, if you want to change the layers template (i.e. basically the representation of the layers hierarchy), simply copy the default /coreplugins/layers/templates/layer.tpl to projects/my_project/coreplugins/layers/templates/layer.tpl and make your changes there.

For more information about projects, see Chapter 3, Projects Handling.

valid xhtml 1.0 valid css