You are not logged in Log in Join
You are here: Home » Members » Tres Seaver's Zope.org Site » Frostbite 0.4 Released » View NewsItem

Log in
Name

Password

 

Frostbite 0.4 Released

This is a bugfix release of the Frostbite skin freezer.

Download

Version 0.4 of the product is now available.

Changes since version 0.2

  • Made container alias for self in methods generated from PythonScripts.
  • Exposed same_type FBO script-generated methods.
  • Extended AcquirableMethod to expose "correct" function metadata (args, defaults) so that the Publisher can mapply to it correctly.
  • Filtered out candidates with problematic IDs (i.e., not valid Python identifiers).
  • Use unrestrictedTraverse, rather than _getOb, to locate the skin folder, allowing subfolders to play.

Rationale

CMF's skins tools allows pretty much arbitrary flexibility in the composition of skins from filesystem directories and ZODB folders. This flexibility is a boon during development, but imposes a runtime performance cost for every name acquired through the site / tool.

In addition, skin scripts run as "untrusted" code; while "safer", this mode is also substantially slower.

Solution

The Frostbite product addresses these performance issues by generating a filesystem product containing selected templates and scripts from a skin.

Using Frostbite

  1. Add the portal_skinfreezer tool to your site ("CMF Skin Freezer" in the ZMI add list).
  2. On the tool's "Freeze" tab, select skins tool ("portal_skins" is the default), the skin path (leave blank for the skins tool's default path), and click "List Candidates."
  3. Select one or more of the listed templates / scripts and click the “Freeze” button. Supply a product and class name to be used when generating the filesystem code.
    • To preview the content in the browser, rather than downloading it, check the "Render Inline" checkbox.
  4. Click the "Freeze" button, and save the downloaded file as __init__.py.
  5. Create an empty directory in your INSTANCE_HOME's Products directory, using the same name you supplied as the product name. Copy the saved __init__.py to that directory.
  6. Restart Zope.
  7. Add an instance of your generated product's class to the skins tool of your site.
  8. Add the freezer object to the skin path, ahead of the paths from which you generated it.