The source code of OPT is almost ready to publish the Release Candidate 1. The remaining issues concern the user manual and the examples that should be included now in some form. In the last few days, the source code itself was enriched with:
- The unit tests for the template functions.
- The final version of the caching API.
- Fixes of the bugs found in the Beta3 release.
There is a small change in the previously accepted API. The
Opt_Component_Interface::setDatasource() method does not require the reference now which allows to read the data from objects and any other forms of expressions. We are sorry for this oversight and the necessity of updating your component APIs.
Recently fixed bugs
The bugs fixed in the last days include:
- (OPT) - bug #81 - The
opt:treeinstruction did not perform the error checking, which could be used to produce the invalid output code if the
depthparameter was not set properly. Currently, the depth does not have to start with 0, and each raise above the initial depth is reported with an exception.
- (OPT) - bug #80 - The expression parser did not capture the single occurences of the apostrophes. The output code was not affected, so this was not a critical problem, but now the parser throws an exception in this situation.
- (OPT) - not reported - the defined components were generating invalid PHP code.
- (OPT) - not reported - the output systems used invalid constant indicating the XML mode.
- (TypeFriendly) - bug #79 - If the header section in the source document was not ended with a valid section delimiter, the script was going into the infinite loop.
- (ZFPort) - not reported - the components attempted to read the CSS classes for the invalid fields from wrong template variables.
- (ZFPort) - not reported - fixed the implementation of
- (ZFPort) - not reported - fixed the problem with Invenzzia_Controller_Response_Http and flushing the output buffer which caused to produce the "1" string in the output.
- (ZFPort) - not reported - some of the overloaded methods had wrong prototypes which caused E_STRICT messages.
OPL port for Zend Framework
Recently, the port has been extended with the cache wrapper that allows to use the Zend_Cache component to cache the OPT views using the new OPT caching interface. Moreover, during April we have removed some annoying bugs in the code and tested the port in the real project. It works nice, but still needs some extra functionality. We are going to start the pagination support soon.
OPT provides the end users a lot of features, so nobody should be suprised that there is a need to write good practical tutorials for this library. In the last weeks, I have been working on the article entitled 'A photo gallery with Doctrine and OPT'. It shows the basic usage of Open Power Template and Doctrine library while writing a simple photo gallery script. The article will be available in two language versions: English and Polish and distributed under the Creative Commons license together with the accompanying, ready-to-run source code. Currently, the article is on the translation stage and will be published soon after the OPT 2.0-RC1 appearance.
We are very happy that the development stage of Open Power Template finally reaches the happy end. We know it was very long (a year and five months), but there was a lot of work to do. We are not going to stop here. Some of you may have probably noticed that the bugtacker is full of TODO tickets for the 2.1 branch which are going to bring even greater revolution in the template engine world.