What is not finished yet?
Basically speaking, there are three things left to do:
Opt_Format_NestedTreedata format for
opt:treeinstruction which will allow to push a nested array in order to render a valid HTML tree.
- Finish the migration module which will allow to run OPT 2.0 templates and convert them on-the-fly to the new release.
- Finish the support for
opt:switchinstruction in order to make possible to add dynamic attributes in this way.
The list of implemented features and changes is really impressive. Just a quick look at the code repositories of 2.0 and 2.1 branch can tell us that OPT 2.1 is another revolution, with many clean-ups and improvements.
Further release process
Unfortunately, in order to see a stable release of OPT 2.1, we still need some time. Although I test the new branch in different situations and environments, including real projects, the debugging process is not finished yet. The test code coverage is not as high as I'd like and it needs to change. Another critical issue is the new documentation, where the progress is very low.
I'll do my best to release OPT 2.1 stable before February 2010, because that month I expect to start works on Open Power Template 3. Lots of things have changed in the PHP world last time, especially where it comes to the frameworks and the application design theory. Open Power Libs 2 was a pioneer in several library design concepts, such as universal autoloader or the need for a small, unified core, but its internal structure and design does not meet current code quality standards. Open Power Template 2 suffers from the same issue. Other development teams from such projects, as Doctrine and Symfony, have already started works on improving them, and so must we.
So, what is the exact plan for Open Power Template and Open Power Libs 3? The overall project philosophy will remain the same, which means that if you already know how to use OPT 2.x, you should not have any problems with 3.x. I plan not to make significant changes to the template language, because it has already been polished in the current releases. We will still use good, old XML syntax, sections, switches, components, etc. The only key goal is to make the language fully secure. It means that from the template level, it should not be possible to cause neither PHP fatal, parse error nor access any forbidden function and class.
The main revolution will take place in the library programming interface. The OPL core will use some third party components:
- Symfony 2 Event Dispatcher
- Symfony 2 Console
Furthermore, there will be fewer components:
- the universal autoloader,
- configuration object,
- error handler,
- debugging interface.
Open Power Template 3 public API will be more compact. I very like the job the guys from Doctrine did in Doctrine 2 project and I'd like to do the same with my library. The API should be simple and intuitive, there should be no magic, and the dependency injection should be done explicitely. The registry and the static stuff will be thrown away.
I'd also like to make the compiler itself completely independent from the standard public API which should allow to use it without it. Its API will be also polished, especially when it comes to data formats, instructions and extending. Here, the following things are going to be implemented:
- data formats will be composed of simple PHP interfaces, which should simplify the entire API and ease the data format building.
- the compiler will make a good use of the reflection mechanism to find out what a particular class provides.
- function packages will simplify installing new template function sets.
- the compiler internals will be separated from the concrete template language implementation - all the languages, including the default one, will be installed by registering a new language class object in the compiler.
The expected result is simple: the most advanced, the most powerful, the fastest, the one, where writing templates is also the fastest, and the greatest template engine in the world. Ever.