SithTemplate 1.1a2 released

#e453061 wysłany 05-09-2009 o 21:29:08

Another preview version of SithTemplate 1.1 is available on bitbucket.

To get unprocessed source, use bitbucket's snapshots (above link), or use:

hg clone https://bitbucket.org/piotrlegnica/sithtemplate/
cd sithtemplate
hg up release-1.1a2

Main 1.1a2 features are few Django-compatibility fixes, and (finally) finished (and comments are more than welcome) tutorial and the standard library reference - with examples! "Extending" part is still in TODO, though.

The most important changes:

  • Documentation! Examples!
  • {% block N append %} has been replaced by Django-compatible (and far more flexible) {{ block.super }} special variable
  • TemplateEnviron::getMeta now strips the user: prefix
  • Added "openbrace" and "closebrace" to {% templatetag %}
  • Fixed incorrect pluralize filter behaviour
  • Using {% extends %} more than once in a template is now explicitly forbidden, and raises an E_INVALID_SYNTAX

Full Mercurial-generated changelog:

SithTemplate 1.1a1 released

#e451415 wysłany 13-08-2009 o 16:45:23

New preview version of SithTemplate 1.1 is available on BitBucket.

Documentation is still not complete, but I'll be gone for a week or so, and won't be able to finish it. Releasing it mainly because of the broken 5.1 support in 1.1a0.

Main changes in this release are:

  • fixed PHP 5.1 compatibility, and more unittests (ran on 5.1, 5.2 and 5.3)
  • addition of custom metadata, set by {% meta key "value" %} tag, and retrieved by TemplateEnviron::getMeta call
  • added TemplateEnviron::render shortcut call
  • new security settings to restrict {{ internal }} - allowInternalConstants and allowInternalRequest
  • I/O restricting and restrictExtendIO and restrictIncludeIO settings
  • Fixed {% extends %} not being able to use different I/O driver

Full Mercurial-generated changelog:

ST status update: 0.10 plugin system changes

#e416716 wysłany 22-09-2008 o 23:46:16

In 0.9 and earlier, both libraries and I/O drivers were called "plugins". As of 0.10, plugin is a bundle, containing any number of elements.

  • Plugins need explicit loading on application side (either by new config var autoloadPlugins, or by TemplateCore::loadPlugin API).
  • Libraries can still be loaded from within templates (just for this template), and additionally from application (using either config var autoloadLibraries or TemplateCore::loadLibrary API; for all templates).
  • Libraries have to be referenced to as Plugin.Library.
  • Difference between runtime and compile time libraries is gone.
  • Hooks are no longer contained in libraries.
  • New extension types will be available - I/O filters and cache drivers.
  • The only remaining interfaces are those related to plugins (e.g. ITemplatePlugin, ITemplateLibrary).

I/O filters will be called in defined order (in filtersInput and filtersOutput config vars) on both template input (unparsed) and template output (not template PHP code, but the result of rendering).

Cache drivers - there will be one instance-wide (cacheDriver config var) driver, that will be passed to I/O drivers.

Example plugin's main class.

Sorry for chaotic Engrish, feel free to contact me if something is unclear, or if you have any suggestions.

Kategorie: Engrish, Programowanie, SithTemplate • Poziom: 1 • Dodaj komentarz

SithTemplate 0.10 roadmap revision

#e412558 wysłany 23-08-2008 o 18:08:44

Continuing this entry:

  • Expression parsing will be postponed at least until 0.11.
  • Library loading will be possible at both application- and template-side. Both will also be restricted to securityLibraries list (unless secure mode is disabled).
  • New plugin system, with new metadata system to declare tags, filters, hooks, I/O drivers, etc. I thought about using strict naming convention, but that wouldn't work well for e.g. hooks, where one hookpoint can have many handlers in many libraries attached. I'll post more info later.
  • And maybe, with new plugin system - tag/filter namespaces, either implicit (library name) or explicit.

As always - feedback is welcome.

Kategorie: Engrish, Programowanie, SithTemplate • Poziom: 1 • Dodaj komentarz

What's new in SithTemplate 0.10

#e410423 wysłany 13-08-2008 o 00:33:36

Even though 0.10 has no specific release date yet (trunk after nearly 100 revisions is still broken and unusable, and most of the code needs at least refactoring), here are the most important changes (in random order):

  • Hard-coded variable prefix (to [surprise] $).
  • Unicode awareness, and, (un)fortunately, mbstring dependency.
  • Expression parsing, without filtering support (parser is huge, ugly and hard to understand even without them. Better ideas, anyone? ^^). With this, you'll be able to do things like {% include $page~".html" %}.
  • Library loading moved to application code. So there will be something like $tpl->loadLibrary('CoreI18n'); instead of {% load CoreI18n %}.
  • New exception model. Both TemplateRuntimeError and TemplateSyntaxError are now combined into single TemplateError (with string-based IDs, and isXxxError methods).
  • Main class moved to TemplateCore.

Yes, that means API and template syntax changes. Sorry about that. Any of these changes can be reverted/not implemented, so all suggestions are welcome.

Sourceforge / Ohloh.

Kategorie: Engrish, Programowanie, SithTemplate • Poziom: 1 • 1 komentarz

Szukaj

/me

JID: piotrl@pececik.com [online]

JID2: piotrl@piotrlegnica.one.pl

Mail: via MailNull

IRC: PiotrL/PiotrLegnica w sieci Freenode (#qwpx, #sithtemplate).

Rocznik '92. Leń straszliwy. Obecnie uczeń II LO w Legnicy (matura, yay). Lubi programować w Pythonie i C++, kiedyś być może i w Haskellu. Antyfan Ubuntu, GTK+, X11 i pakietu autotools. Używa systemów Windows XP HE (desktop) i Gentoo Linux (serwer[y]). Nałogowy oglądacz seriali S-F i czytacz webkomiksów. Wbrew pozorom czyta też zwykłe książki (ebooki i tak ssą). Poleca Dropboksa (VERY EVIL REFLINK). Likes English more than Polish.

Ohloh profile for PiotrLegnica Kongregate logo

AMD Sempron 2300+ 1,5GHz / 768MB DDR / GF7600GS 256MB / Seagate Barracuda 160GB

Intel Core2 Quad Q8200 2,33GHz / 2GB DDR2 / GF9600GSO 384MB / Seagate Barracuda 160GB & 750GB