[imc-cms] Open Questions: Templates and Languages
Occam
indymedia at gmail.com
Wed Feb 25 18:44:06 PST 2009
Hi,
with a good amount of free time in the next couple of months, i am
looking forward to continue to work on the CMS project. Here are some
"devils-in-the-details" that are lurking around :)
Since the general de-central structure and idea of malandro should be
pretty much clear, there are many open question of the actual
implementation.
The current back-end ice server proof-of-concept code is written in
python and we know that PHP as a front-end language would be possible
- PHP is able to use the ICE network.
*Task*
However, we have two features we need implement.
#1 The dynamic output of a html site
#2 The static html producer
Both of these need a template language and it would be nice if they
could share some templates, or at least be in the same language.
Also, the producer needs to be able to run independently as a ice
server (subscriber), so writing the producer in PHP is not possible
(this is a ICE/PHP limitation).
*Templates*
So we have the problem of finding a template language, that works
with Python and PHP. From the research i did there are #3.
#1 DOM/XML/XSLT - yes, slow as hell and a pain in the ass to write
#2 ZOPE ZPT TAL - There is a good PHP implementation of TAL, and
three incomplete and outdated implementations for python. The only
complete current python implementation is in ZOPE itself, and i could
not find informations of how to use these without all the ZOPE
overhead. Maybe someone here knows?!
#3 Clearsilver - is a cross language template system with bindings
for python. The binding for PHP exists as experimental PHP module
from 2004.
*Front-end Language*
Another option would be to write the dynamic front-end part of
malandro with python or ruby, which makes it possible to use modern
frameworks like CherryPy, Django or Rails.
Drawbacks are the much more complicated deployment and the smaller
developer communities (compared to PHP). For example, CherryPy as
standalone Web-Server does not support Virtual Hosts, only a
deployment via Apache mod_python would make this possible. This way,
mutil-site setups are getting way more complicated.
The main argument for PHP is the bigger development community and the
easy deployment. However, by using ICE we are making some limitations
already.
a) The ICE bindings for PHP are done as a binary PHP module. In
shared hosting environments it will not be possible to add this module.
b) ICE would not be optional. Since every access to the DB would be
done via ICE, you could not make a single-server standalone
installation of the CMS, that does not require ICE. For this setup
scenario, you would have allot of useless overhead.
Both points make the CMS less attractive to people who are searching
for a "Blog Software". We would lose the majority of a possible
community that supports the CMS.
With Python/Ruby alone it would be possible to write a CMS that
scales from a single server setup to the multi-server setup we have
in mind for Indymedia sites. However, we have the drawback of the
more complicated deployment and limitations in the server environment.
*More options*
Do not use ICE but things like XML-RPC SOAP, JSON, Object
Serialization - then everything could be written in PHP, Python or Ruby.
With Hyperactive and Samizdat we have two Ruby based CMS's that could
be extended to use ICE. Writing the ICE back-end server in Ruby is
possible.
All Frameworks in question here PHP Cake, CherryPy, Django, Rails etc
have existing support communities of the same size and a larger
variation of different extensions, template languages, modules for
input checks etc pp. I don't think it will make a big difference to
chose a, b or c.
So, abandon all hope, ye who joins this discussion :)
occam
More information about the imc-cms
mailing list