atk4 / atk4

PHP framework for developing powerful web applications. Inspired by desktop toolkits (QT, Cocoa, .NET). For developers with any skill level.
http://agiletoolkit.org/
MIT License
182 stars 83 forks source link

REFACTORING: Template engine #451

Closed romaninsh closed 10 years ago

romaninsh commented 11 years ago

https://github.com/atk4/atk4/tree/4.3-Template is dedicated to Template Parser refactoring.

The following are the requirements:

Unfortunately due to some inline javascript our current template engine cannot properly interpret {} tags, so we need to implement them using preg_replace_callback.

Technically that's refactor of SMlite.

romaninsh commented 10 years ago

I have rewrote the algorithm here. Finally it works reliably, however I'm not sure about the performance. I'd like to back-port the new template engine and try it on 4.2.*

https://github.com/atk4/atk4/commit/e0b39a311b82c78d7d73b4c863e8e412472ca58d

romaninsh commented 10 years ago

Most of our templates are now using {} syntax and YAML.

romaninsh commented 10 years ago

This have been working pretty well.