|
|
|
CPS4/Z3ECM Paris sprint report, CPSSkins4FiveI spent the week during the CPS4/Z3ECM
Paris sprint trying to make cpsskins v3 (written entirely with
zope3) run on zope2.
Here is a summary, but first see the preview animation For some background information: cpsskins v3 provides a theme engine and a portlet manager for zope3. However it did not until now run on anything but zope3, which provides better technology to develop with but which also still has a limited amount of end-user applications. The Five approach which consists in using Zope3 technology in Zope2 would have been interesting to consider at the start of the cpsskins project, but the goal was instead to develop entirely with zope3 first and to consider backward compatibility issues with zope2 later on, i.e. now. StrategyThe strategy is still to keep on developing cpsskins in zope3 without worrying about zope2, which means that cpsskins v3 contains no references to zope2.However, there is now a Zope2/Five product called CPSSkins4Five which acts as a bridge between zope3 and zope2. In CPSSkins4Five, cpsskins v3 is considered as a python library that does theme rendering. CPSSkins4Five currently runs on the philikon-local-components branch of zope2 which integrates the jim-adapter branch of zope3, and contains changes in Five for using the new local utility and adapter registration API. All these branches will be merged into the upcoming zope 2.10 (scheduled in June). CPSSkins v3 heavily uses local utilities for registering resources and having a clean and a unique API in zope2 and zope3 was sufficiently important to justify developing against Phillip's and Jim's branches. First phaseThe first phase was to port cpsskins v3 to the new local utility and adapter API. This was done in a branch of cpsskins called paris-sprint-2006.A simple doctest was added to make sure that the part of the utility registration API used by cpsskins worked as expected. Second phaseThe second phase consisted in getting the philikon-local-components branch of zope to start, which required adjusting some module import paths.Third phaseThen cpsskins v3 was added into the lib/python directory of the zope2 instance. The CPSSkins4Five product was created to load cpsskins' zcml configuration files, do some minor patches and load zope3 packages required by cpsskins.Also an simple installer was created to make it possible to create a CPSSkins site inside the ZMI. A "CPSSkins site" can be any folder in Zope2 (CMF, CPS, Plone, Silva ... site) that can be turned into a zope3 site with a local site manager. Of course CPSSkins4Five does not provide compatibility with CMF or CPS or Plone sites, but it shows how a simple zope folder can become a CPSSkins v3 site. Zope2/Five issuesThere have been and there still are a couple of issues:Use of resources
In zope3, I am used to referring to resources with
/++skin+cpsskins/@@/++resource++myfile.css to provide a fixed path to
objects. In Five/Zope2 this apparently does not work. |
Latest blog posts
Latest animations
Latest documents
|