IT[X] fork status report

From: Date: Fri, 14 Feb 2003 10:48:46 +0000
Subject: IT[X] fork status report
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13259@lists.php.net to get a copy of this message
Greetings! I know, you are probably tired of me. :] I began working on PHPUnit tests for IT. The results ot this work so far are available in the usual place: http://158.250.10.119/pear/IT[X]-fork.tar.gz There are very few tests ready, both stock version and my fork pass them. I already found (and fixed) an incompatibility in touchBlock() implementation and found some counter-intuitive behaviour in stock version. Big thanks to Lukas Smith for making tests for MDB, which I used as refernce and source of inspiration. :] Now, some words about "cache" implementation in my fork. Contrary to Pierre-Alain's words that is *not* a reimplementation of general purpose caching algorithms found in several PEAR packages. How does IT work? It reads a template file, then parses (using RegExps) it for blocks and variable placeholders and stores the results in the object's fields. This is an expensive operation, and is almost always redundant, as template's change is a much rarer event than a page request. Now, most of my changes are just a framework to extract the fields containing the "prepared" template to allow serializing and storing them. The actual "caching" code is around 10 lines: check modification times of files A and B. If A was modified after B, then load it, process it and regenerate B, else load B. Most of the existing template engines offer the same functionality: either generating PHP code from templates or storing "prepared" templates as serialized arrays.

« previous php.pear.dev (#13259) next »