You are here: Home Zope products Clarity

Clarity (not released)

1
by Ihor Berehulyak last modified 2005-04-19
0.0
0.0
0.0
0.0
Released on 2008-12-12 by codespeak for Zope 3 under Unavailable License available for All platforms.
Software development stage: alpha
Clarity integrates ClearSilver templating into Zope 3
It's all still rough, but initial tests show ClearSilver templates can be quite a bit faster than ZPT, and they have other possible benefits.

Zope 3 already has page template and even DTML, why would I want to use this? Some possible benefits ClearSilver brings are:

  • Absolute separation of logic from template. You cannot do complicated logic in a ClearSilver template, you can only extract data. You cannot call into the Zope 3 API at all.
  • Increased debuggability. Calling APIs is impossible from the template, which means that most bugs the API should appear in Python code already, where the programmer can worry about them, not the person who is tweaking the templates. While you are building a template you will never be bothered by, say, ComponentLookupErrors.
  • Increased testability. Since you know what HDF structure you expect to get in advance, you can test this using a normal unit test from Python code. Your template can stay simple.
  • Performance. Admittedly simplistic testing with 'siege' shows that for larger templates, ClearSilver templates integrated into Zope run several times faster than the equivalent ZPT page.

However, since no significant codebases exist that use this facility, these benefits are somewhat speculative.

Document Actions
Powered by Plone