
Reasons for the XMLNuke Structure of Directories
How XMLNuke organizes files within the folders.
Table of contents 1. Introductory Concepts 2. The Context class 3. The FilenameProcessor Class 4. The LanguageCollection Class 5. AnyDataSet and Data Access 6. The "Util" NameSpace 7. Structure of Directories
On this page The Organization of XMLNuke Directories The "bin" folder The "common" folder The "data" folder The "lib" folder (only PHP)
The Organization of XMLNuke Directories
XMLNuke is completely contained in a single folder. Depending on the version you are using, this can be either:
- xmlnuke-php5
- xmlnuke-csharp
Inside this structure is basically the following structure:
Structure of Directories
RAIZ
+-- bin
+-- common
+-- data
+-- lib (*)
The "bin" folder
This folder contains the KERNEL of XMLNuke with all of its functionalities. There are some details in this folder about every XMLNuke release.
The bin folder in the CSharp version
In the CSharp version, the bin folder contains only the compiled assemblies of XMLNuke. There are also the assemblies of users that should have the following rule for the name: namespace.namespace.dll
In this case, all of the classes (modules) should use the namespace defined above. (See the topic Creating User Modules)
The bin folder in the PHP version
In the PHP version, the bin folder contains all of the source codes for XMLNuke. If users want to create their own classes and modules THEY SHOULD NOT USE THIS FOLDER. The folder to be used in this case in the PHP version is the lib folder.
The "common" folder
This folder is dedicated to storing images, javascripts and standard styles of XMLNuke?s own engine. For example, the buttons on EditList are in this folder.
Users can add documents and images to this folder themselves, as well as create their own independent structures.
The "data" folder
The data folder where the site configurations are stored, as well as the XML and XSL document of the site. This folder can have its location changed through the configuration file and requires write permission by the web application. It has two subdirectories:
- sites: Configurations and documents exclusive to a specific site.
- shared: Shared configurations and documents. If not found in sites, try to locate it in shared.
Directory Structure for the DATA folder
data
+-- shared
+-- admin
+-- anydataset
+-- lang
+-- setup
+-- snippet
+-- xsl
+-- sites
+-- [NOMESITE]
+-- anydataset
+-- cache
+-- lang
+-- offline
+-- snippet
+-- xml
+-- xsl
The "lib" folder (only PHP)
This folder exists only in the PHP version. All the modules and classes of users can be shared for any site and must necessarily be within this folder.
Some important information:
- Programming for XMLNuke, even in the PHP version, is done exclusively through classes
- XMLNuke allows classes to be organized into NameSpaces, which are phsyically organized in sub-categories
The NameSpace concept is particularly interesting to help organize our files in PHP/XMLNuke. For example, if we are going to build an application for a forum and a poll, for example, we can use the following structure to organize the PHP files:
Example of the organization of NameSpaces in PHP
lib
+-- common
+-- database
+-- base
+-- forum
+-- core
+-- modules
+-- administration
+-- modules
+-- core
+-- xmlobjects
+-- poll
+-- core
+-- xmlobjects
+-- modules
Notice that there are some modules folders. This folder has a special use in XMLNuke; it specifies that the files that are present there correspond to the XMLNuke modules and can be run. The rest of the folders cannot be accessed externally.
This way, to run a file that is within the modules folder, we can use the following examples:
- xmlnuke.php?module=forum.algumaclassedentrodemodule
- xmlnuke.php?module=forum.administracao.algumaclassedentrodemodule
- xmlnuke.php?module=enquete.algumaclassedentrodemodule
|