Archive for the ‘limb’ Category

{{macro}} online usage examples

Monday, March 3rd, 2008

Sergey Yudin(syfisher) did really great job by making {{macro}} template engine examples available on-line.

If you are wondering who in the world in his sane mind might need yet another PHP templating engine, well…I blogged about {{macro}} some time ago where, I hope, I presented some unique arguments in its favour. Here’s the quote from that post which, probably, most nicely and concisely describes the main idea behind {{macro}}:

To be short, the main idea behind {{macro}} is to use C/C++ alike(but way more sophisticated) macro tags to simplify usage of raw PHP in templates.

Ok, going back to the subject of this post, the mentioned page has runnable examples for mostly all core {{macro}} tags. You can browse the template rendering result page, template sources and PHP code which actually works behind the scene.

You can also download the source code of these examples from projects page(where, by the way, you can find some other real life Limb3 usage samples).

We are going to update examples on the regular basis presenting other interesting {{macro}} usage patterns in the future, so, if you are interested, stay tuned.

Update: Sergey also made a “Generated PHP code” link for each example, so it’s possible to view what PHP code is generated for each case. Cool stuff ;)

Limb3 2007.4(Frozzy) Released!

Monday, January 14th, 2008

Actually Limb3 2007.4 was released on the 31st of the December 2007 but we(here in Russia) have 10 days of official holidays and I simply was too lazy to blog anything during those crazy days of champagne-with-vodka-fest-and-early-morning-hangovers ;)

If you are wondering what Limb3 actually is and why world needs another PHP…er…framework(btw I hate this word too!), here’s a brief introduction. Limb3 is just a bunch of relatively independent packages, it is not a monolithic framework. Some packages are pretty unique(e.g {{macro}}) while others were inspired by cool stuff available for other than PHP platforms(e.g. active_record inspired by Rails’ ActiveRecord). And no, Limb3 was never intended to be “the one and the only one true PHP framework”. I personally believe in well thought code re-usability, thus the end application may contain bits of ezComponents, ZendFramework, PEAR, Limb3 and name-your-favorite-PHP-libraries-here.

Anyway, it’s better late than never, so here’s the list of the most notable changes made during past 6 months:

* ACTIVE_RECORD package: better invalid fields handling using
exceptions, support for different names of the primary key added
* CORE package: cruft cleanup, refactoring and misc. code
* CACHE package: cleanup and better implementation, added
initial APC and Memcached support
* DATETIME package: major refactoring, renaming lmbDate into
lmbDateTime, etc
* {{macro}} alternative to WACT templating engine added with almost
all WACT alike functionality(and even more!)
* IMAGEKIT package: complete redesign using filters and fluent interfaces
* TESTS_RUNNER package: test groups and methods filters, better
coverage support
* JS package: upgraded jQuery to 1.2.1
* MAIL package: upgraded phpmailer to 1.73
* WEB_APP package: major cleanup, removed all commands and obsolete
* VIEW package: support for view selection based on template extension
added(currently MACRO and WACT)
* TREE package: ArrayAccess and ArrayIterator interfaces compatibility fixes
* FS package: more generic file system iterators added

Please note, this is rather a general changelog above, see the specific package changelog for more details.

The bundled release of all packages is available in the SourceForge downloads section of Limb3-2007.4


Automating packages upload for PEAR channels running Chiara_PEAR_Server

Monday, November 19th, 2007

Setting up Chiara_PEAR_Server with Crtx front end is a little bit confusing(even if you follow the official guide) but at least it happens just once ;)

Another important matter is maintaining your lovely PEAR channel up-to-date which, of course, assumes nice and easy way of uploading new packages. Actually Crtx’s web interface provides such a way and it works just fine for a couple of packages but if you have more than a dozen of them uploading new packages quickly becomes a boring process(e.g. we have 20+ packages at Limb3 PEAR channel)

That’s why I hacked up a script which automates this process quite a bit ;)


limb/tests_runner-0.8.7 released!

Saturday, November 10th, 2007

I’m glad to announce the new release of the limb/tests_runner package which reached 0.8.7-beta version! This package ships with limb_unit - a SimpleTest tests “swiss army knife” console based runner. If you’d like to know more about limb_unit utility I would highly recommend reading its documentation since it provides quite unique features like nested fixtures, code coverage and so on(documentation it’s actual for 0.8.5-beta as of this writing, but that’s ok).

This release introduces some unique filtering features which can be quite useful for large sets of tests. Now it’s possible to use filters for the following entities:

  • test classes
  • test classes’ methods
  • test classes’ PHPDoc @group annotation tags

In the rest of this post I’ll describe these new features in detail.

{{macro}} - a zillionth attempt to make a PHP template engine that sucks less

Sunday, November 4th, 2007

After having used multiple template engines for the last 5 years I’m a strong believer that the best template engine is…PHP itself :) We just need some tools to make the usage of raw PHP in templates more friendly and readable.

I have used the forked version of WACT template engine for about 3 years and finally come to the conclusion that its runtime part is way too complicated and non obvious at times. However I do very like the idea of compile time tree of components which generate PHP code. At the same time I just wanted to simplify WACT and make the process of adding new tags much more straight-forward.

That’s why I have hacked up the initial implementation of {{macro}}. To be short, the main idea behind {{macro}} is to use C/C++ alike(but way more sophisticated) macro tags to simplify usage of raw PHP in templates.


Buildman - dead simple Continuous Integration tool

Sunday, November 4th, 2007

If you have ever tried to setup the Continuous Integration process using one of the well known ‘classic’ tools like CruiseControl you might have been wondering if there’s a simpler and quicker way. I have been wondering too, thus meet Buildman ;)


lmbActiveRecord’s late static binding emulation

Monday, October 15th, 2007

I was quite inspired on having heard that the late static binding(LSB) patch will make it into PHP-5.3. In short, it should allow to know the name of a class which invoked the parent’s static class method.


Syncman - projects remote deployment for my grandma

Sunday, October 7th, 2007

Syncman Logo

If you’re running a company mainly occupied with development of lots of web sites ranging from tiny promo sites to large portals you most probably should face deployment headaches some day.

How do folks usually deploy their remote applications? Some use manual deployment via FTP, others prefer using rsync or unison, some brave souls deploy simply by updating the project’s Subversion working copy on the remote server, Rails fans usually stick with Capistrano, some smart fellows are said to be using complicated cfengine, etc.

At my company we were not happy with any mentioned above methods of remote project deployment due to either lack of functionality or unnecessary complexity. We simply needed a tool which could use non-technical personnel: managers, web-designers, etc. That’s why we hacked our own simple utility - meet Syncman ;)