Mapix is a try to implement a web framework and CMS based on XSL and XML.
WARNING : This is a work in progress. Conventions and mechanisms described below may not match the actual version.
A mapix application is composed of four components :
mapix
directory which contains distributed packages.htaccess
file which rewrites URLs to mapix core handlercontroller.xsl
file which contains XSL templates to define routes/controllers for your application- your application files and/or custom packages
Mapix framework is based on the following principles :
- Any concept in your application should be defined in a package.
- A package is a single directory, containing a
package.xml
file. - The
package.xml
file uses the package XML format described in themapix/package/package.xsd
file. - Packages can contain other packages (sub-package = sub-directory with package.xml)
- The only required package is
mapix/core
.
Mapix will automatically execute the nearest controller.xsl
file depending on the requested URL. For that purpose any URI is composed of two parts :
- The physical path : the part of URI which matches real files.
- The virtual path : the part of URI which does NOT match real files.
For example, /foo/bar
would execute /controller.xsl
, whereas /mapix/tests/foo/bar
would execute /mapix/tests/controller.xsl
file.
- Models : XSL templates/functions (
model.xsl
orwhatever.model.xsl
) or native PHP model classes (whatever.php
) - Views : XSL templates (
view.xsl
orwhatever.view.xsl
) - Controllers : XSL templates (
controller.xsl
orwhatever.controller.xsl
)
- Mapix uses EXSLT to enable native (PHP) class loading and method calling.
- Classes can be loaded with
<xsl:include href="exslt://path/to/native/class"/>
,.php
should be ommited. mapix/core
classes are automatically loaded whencontroller.xsl
is executed.- Methods can be executed with the XPath expression
class:method(...)
. - See
mapix/tests/controller.xsl
for examples.
Mapix CMS is built on top of Mapix framework. It consists in many packages :
mapix/admin
: admin sitemapix/demo
: demo sitemapix/html
: HTML generic templatesmapix/themes
: HTML/CSS templates- ...
This site is based on the ExtJS user interface. On startup, admin site search and load *.app.js
and *.app.css
files. These files define ExtJS applications that will be used in the administration site, such as file editors or explorers :
- file editor : a file explorer
- xml editor : a simple xml tree editor
- text editor : a wrapper for Codepress
- image editor : a basic image editor
- package manager : install/uninstall packages
- ...