Invenzzia »

Invenzzia... in English

Keyword - OPT2

Entries feed - Comments feed

Sunday, 02 March 2008

OPT 2.0.0-dev4

Open Power Template Tagged under: OPT2

There is a new Open Power Template development version available to download. The project begins to gel, as the main parser class is almost completed. Inspite of the output cache system mentioned earlier, I've implemented new instructions and completed the snippets. It means that all the template inheritance should work now. I hope the library will be usable by the end of this month. The real projects are really necessary to detect possible bugs and various shortcomings.

Continue reading »

Zyx 2008-03-02, 11:28

no comment

Friday, 22 February 2008

The main class almost finished

Open Power Template Tagged under: OPT2

The result of the latest works on the OPT source code is complete opt.class.php file which contains (as some of the readers may know) the main parser class. I must admit that this file was more demanding that the compiler. In the second case we can afford with quite a lot. Just an idea for the algorithm and prediction if and how it will influence the rest of the code. In the case of the main class, we must pay attention to the performance. It must contain everything that is run permanently and it must be fast and small. But the number of features is getting bigger and bigger.

Continue reading »

Zyx 2008-02-22, 08:59

no comment

Friday, 15 February 2008

OPT 2.0.0-dev3

Open Power Template Tagged under: OPT2

According to the my announcement from the last week, the development versions are going to appear much faster than before. This is the first of such events. The third dev of OPT 2.0.0 is ready to download. This time, I've paid much attention to the attribute processing. They can do a lot of interesting things with the tags they've been added to. The earl implementation has been ready so far - there were even examples showing the "opt:section" working. But to satisfy both me and probably other programmers, I had to extend it.

Continue reading »

Zyx 2008-02-15, 13:26

no comment

Saturday, 09 February 2008

New dev

Open Power Template Tagged under: OPT2

The website now has the "Download" page. In it, you can find a new development version of Open Power Template. It also contains a simple script "docgen" which we use for automated generation of the DocBook manuals. The new development versions should appear now much more often than before. In case of many new features, they might appear even every 2-3 days. The reason why this was impossible in the past was the time. The process was not automated and it takes a while to prepare such archive (for example - it takes a couple of hours to publish new OPT 1.x version on the Internet).

Continue reading »

Zyx 2008-02-09, 11:02

no comment

Saturday, 02 February 2008

Template inheritance

Open Power Template Tagged under: OPT2

Unsually, the final HTML code of the website is composed of several smaller templates containing smaller pieces of it. There are many techniques of combining them. In PHP template engines, the most popular are two forms: manual execution of the templates from the script side and the include directive. Similar solution can be found in OPT 1.x, however in the new version, it should be forgotten - unless we use the quirks mode, the parser does not let us to call the parse() method more than once. In the beginning, I planned to replace it by extending inclusion with "sequences" - a groups of templates to include with their own variables and cache settings. However, one day I was asked on my blog by Coldpeer, whether OPT will support template inheritance. I googled for a while, I looked at it and thought it might be cool. That's how the implementation began.

Continue reading »

Zyx 2008-02-02, 17:03

no comment