By Harry Fuecks

CMS using WACT

By Harry Fuecks

Pavel Chtchevaev recently dropped this message into Sitepoint’s Advanced PHP forum, announcing LIMB, a PHP CMS that uses WACT’s template engine.

WACT is still in an evolutionary stage so significant customization was required by LIMBs developers but it’s great to see someone taking advantage of WACT already and turning the results into Open Source. That it’s possible to use some of WACT while ignoring the rest is part of WACT’s design “philosophy”, as collection of components as opposed to a rigid framework.

It’s also interesting to look at some of the template source in LIMBs demo (you need to download the source from SF right now if you want to examine the templates although they were available online until today).

Know there’s some degree of scepticism regarding WACT’s approach to templating – ironically it’s probably easier to “sell” to developers with experience of ASP.NET or JSP Taglibs than to PHP developers used to Smarty.

What’s worth noting is how the mark up is declarative – you declare the elements that should appear in the template just like HTML is declarative – you declare a table for example – there’s no imperative if/else type logic in the template. The power of this approach becomes apparent when you consider one of the more advanced tags LIMB has implemented (for editing content);

This tag takes care of generating the HTML and Javascript required to embed htmlarea in a form. Looking at the implementation, it does slightly more at “runtime” that might be necessary – performance could be improved perhaps by shifting some of the generation to compile time (some notes on runtime vs compile time in WACT here). Anyway what’s encouraging, to me, is the developers seem to have found it fairly easy to implement their own WACT tags.

The most important and interesting stories in tech. Straight to your inbox, daily. Get Versioning.
Login or Create Account to Comment
Login Create Account