14:26 matthias ansorgfh gießen-friedberg1 / 33 - an architecture-focused evaluation - matthias...
TRANSCRIPT
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
- an architecture-focused evaluation -
Matthias Ansorg
University of Applied Sciences (FH)Gießen-Friedberg
2004-09-21
Mambo
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Motivation
Why use a CMS?
Why evaluate a CMS?
Why evaluate with focus on architecture?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Table of Contents
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambo Overview
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambo Overview :: First Impressions
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambo Overview :: Practical Experiences
no-problem installation
backend overcharges older browser versions
Mambo focuses on a lightweight core system, so ...
... third-party extensions mostly necessary. E.g.:
“Staticxt”, “Contact”, “Weblinks”, “Banners”, “Polls”
... don't be afraid of extending Mambo yourself. In my case:
“Staticxt” rewrite
JavaBean template rewrite
the mambot “obfuscator”
FAQ component (not yet existing)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambo Overview :: The Mambo story
2000: Miro International from Melbourne Victoria (Australia) develops a new CMS
2001-05: Miro releases “Mambo SiteServer” open source
2002: Miro forks “Mambo 2002” (today: “Mambo CMS”); today 1540 EUR with support
2002: Robert Castley tooks over “Mambo SiteServer” (today: Mambo)
2004-04-20: Mambo wins “LinuxUser & Developer Award 2004 for Best Linux or Open Source Software”
today:
Miro sponsors the Mambo Community
common extension architecture planned
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambo Overview :: Mambo as a “real” CMS
huge group of open source portal applications:
Slashdot
PhpNuke with 12+ forks and clones (PostNuke, ...)
community-centered, not content-centered
Mambo stresses to be no portal solution but a real CMS
supported by history
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Overall System
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Overall System :: Three Tier Architecture
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Overall System :: Mambo Elements Overview
Template: page layout framework, places Modules and Components.
Module: provides extended functionality in a small rectangular part of a page
Component: provides extended functionality for showing the main content of a page
Mambot: small task-specific function for searching in user-specified data structures; or for modifying content before finally shipped out
Language: package for localizing Mambo into one language
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Templates
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Templates :: Static Structure
a Template comes as a .zip or .tar.gz archive with:
css/template_css.css
images/*
index.php
template_thumbnail.png
automated template galleries possible (300 templates now)
templateDetails.xml
meta information, used e.g. by the template manager:
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Templates :: Meta Information
<?xml version="1.0" encoding="iso-8859-1"?><mosinstall type="template"> <name>4ToolFrame</name> <creationDate>25/08/2004</creationDate> <author>Matthias Ansorg</author> <copyright>GNU GPL 2.0 or higher</copyright> <authorEmail>[email protected]</authorEmail> <authorUrl>matthias.ansorgs.de</authorUrl> <version>1.0</version> <description>based on the JavaBean template</description> <files> <filename>index.php</filename> <filename>template_thumbnail.png</filename> </files> <images> <filename>images/arrow.png</filename> <filename>images/back.png</filename> <!-- [...] --> </images> <css> <filename>css/template_css.css</filename> </css></mosinstall>
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Templates :: Dynamic Structure
<?php if (mosCountModules("top") != 0) : mosLoadModules("top"); else : ?> <img src="<?php echo($mosConfig_live_site); ?>/templates/4toolframe/images/pixel.png" width="170" height="170" /> <?php endif; mosLoadModules("left"); ?>
<?php include("pathway.php"); ?><?php include_once("mainbody.php"); ?>
<?php mosLoadModules("right"); ?>
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Templates :: Discussion
most particular charachteristic: simplicity
self-contained (logical, physical)
development and configuration: makes the common case simple, skips the rest
sticks to the standards (HTML, PHP, CSS, XML)
simple metadata access (automated galleries)
non-technical developer interface possible
advantages vs. TYPO3 templating system
easy to learn, use, configure (no TypoScript etc.)
easy to develop
even without technical skills
bug hunting is easy (self-contained, compact)
easy to exchange (no dependencies; galleries)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Modules
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
what is: abstract type, abstract instance?
inconsistent understandings
Modules are abstract types (database, developers manual)
Modules are abstract instances (Module Manager)
what happens when installing a module?
1. abstract type defined
2. one abstract instance created
Modules :: Type or Instance?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Modules :: Architecture
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Modules :: Mambo powered by Mambo
common handling of frontend and backend modules in table mos_modules
the more general concepts behind
architecture and code reuse in the backend
lightweight, slimline system
heads towards full frontend / backend analogy
it's about writing Mambo in Mambo
flaws of consequence (for now)
module reuse between frontend and backend not yet possible (cf. mod_pathway)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Components
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Components :: As Compared with Modules
user's definition: a Component is a Module that presents the page's content
a page may have one Component, but many Modules
a menu may link to Components, but not to Modules
same user interface with Modules (render area, installation and configuration)
same backend / frontend analogy as with Modules
developer's perspective: a Component's difference
may store data, but Modules are just views thereof
has a more elaborated architecture
only one instance, but configured for every menu link
view of Mambo 5.0: no difference, as Components and Modules are merged into Mambo Elements (MOSETs)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Components :: Architecture
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Components :: The Example of com_staticxt
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambots
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambots :: By Example of mosobfuscator.php
<?php // principle: mailto:[email protected] // gets mailto:user@example.comdefined( "_VALID_MOS" ) or die( "Direct Access to this location is not allowed." );$_PLUGINS-> registerFunction( "onPrepareContent", "botMosObfuscator" );
function botMosObfuscator( &$row, $mask=0, $page=0 ) { $pattern = '%(mailto\:)?[[:alnum:]\.\-]+\@'. '[[:alnum:]\.\-]+\.+[[:alnum:]\.\-]+%'; $row->text = preg_replace_callback( $pattern, "botMosObfuscator_replacer", $row->text ); return(true);}function botMosObfuscator_replacer( $matches ) { // $matches[0] is the complete match (e-mail address) $matches[0] = str_replace(":", ":", $matches[0]); $matches[0] = str_replace("@", "@", $matches[0]); $matches[0] = str_replace(".", ".", $matches[0]); return($matches[0]);}?>
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Mambots :: Discussion
more efficient architecture since Mambo 4.5.1
Mambots are now event-triggered
Mambots are included only once for every page
however, Mambots are not yet perfect:
for “onPrepareContent”-Mambots, it is impossible to access content of components other than com_content; so, there is need for more events
Mambots seriously disturb the three-tier architecture:
they may have tasks from both presentation and processing layer, but are not layered in itself
many Mambots introduce new tags (e.g. {moscode} [...] {/moscode}) and expect them in the content; this makes the RDBS layer dependent on the presentation and processing layers
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Subsumption of Mambo Architecture
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Subsumption of Mambo Architecture :: Mambo Core
the three tier architecture model was pragmatically implemented: tier overlaps, blurred distinction
HTML in RDBS layer: deprecated dependance
Mambots-introduced markup in RDBS layer: as above
no tier architecture with Modules and Mambots
this will lead to an unflexible CMS
clean implementation of a new output format is hard work
cross-media and cross-format publishing difficult
but Mambo's architectural improvements from 4.0 and to 5.0 are big steps, and Mambo Core is lightweight enough to be tidied up
even more promising: 2004-09-14 release of MosXML Alpha 1.1 (http://www.ciadd.co.uk/)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Subsumption of Mambo Architecture :: Mambo Elements
pros
extremely lightweight kernel (5,4 MByte including all extensions of the core distribution; TYPO3: >60MByte)
lightweight kernel means, its redesign is probably easy
extensions of the core distribution mean, most of the core functionality gets replaceable (see MosXML)
easy to use templating and extension system
cons
modularizing Mambo is a process not yet completed
frontend pathway is no module
com_content is a “favored” component
com_menus has undocumented “subcomponents”
some components are not uninstallable (com_admin, com_categories, com_checkin, com_content)
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Why to Use Mambo and Why Not
Introduction
Mambo Overview
Mambo Architecture
Overall System
Templates
Modules
Components
Mambots
Conclusion
Subsumption of Mambo Architecture
Should I Use Mambo?
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
Should I Use Mambo?
mixed impressions from the architectural view, through multiple influences on Mambo's architecture:
original code base by Miro, commercial quality
not yet completed transition from monolithic to “micro kernel” architecture
partially pragmatic architectural consequence
better witch each extension architecture redesign
pre 4.5 extension and templating system
4.5 redesign of extension and templating system
4.5.1 redesign of Mambots
5.0 redesign: Modules and Components merge into Mosets
but, Mambo is lightweight, modular and vivid, and scores well in a feature evaluation; seems promising
14:26 Matthias Ansorg FH Gießen-Friedberg 1 / 33
The End
That's it!
I appreciate your attention!
Now, it's time for your questions.