Did not find a how-to for your problem?

Ask me to write the how-to post by writing to the mailing-list at cps-devel [@] lists [.] nuxeo [.] com or writing to me to joseluisdelarosa+cpshowto [@] gmail [.] com. Note: I'll keep all conversations on the official mailing list.

Wednesday, June 13, 2007

How to identify the types of code

While developing CPS is really useful to know how to deal with the "types of code" that a CPS product is composed of. This post will explain briefly the three kinds of them:

  • Python classes and modules: This source code is the one that can be found in the *.py files of the product's folder, e.g. CPSMessages/MessagesTool.py (not skins folder).
    All the code in here is available from Zope somehow or another, commonly as a tool-shaped object. Any modification of these files needs a refresh or restart of the Zope's instance so that it notice the changes.

  • Python Script, Zope Page Templates or DTML Methods: Usually, these sources are available from file system in the folder skins of the product (e.g. CPSMessages/skins).
    This code is stored as Zope objects in the ZODB and they can be run in the Zope's sandbox. The original code of these objects is available from ZMI and it can be modify it on-air while the instance is running. If Zope's instance is not in debug mode, it will need to be restarted after modifying any file that is in skins folder.

  • Profiles: They are XML code organized in a hierarchy of folders (e.g. CPSMessages/profiles/default).
    Any change in these files will need to be imported to be applied to the objects in ZODB and any change from the ZMI will need to be exported if you want to write it as XML.
That's enough theory I think. Please look the examples in other how-to posts to see the types of code in deployment.

And please, let me know if this was too stiff.

No comments: