Awesome New Template Engine

http://code.divineaspirations.net/chip/index.html

You should check out this new template engine. The flexibility and ease of use is far superior to Smarty, and well, it's really fun to use it seems.

Thanks for taking a look, and let me know what you think, because I really think this project could go places.

Thanks again!

Comments

  • : http://code.divineaspirations.net/chip/index.html
    :
    : You should check out this new template engine. The flexibility and ease of use is far superior to Smarty, and well, it's really fun to use it seems.
    :
    : Thanks for taking a look, and let me know what you think, because I really think this project could go places.
    :
    : Thanks again!
    :
    I made a CMS for a site with was using SMARTY. The something started to mess (probably SMARTY caching system). After two days of work, I realised I have to change the template engine, so (without my boss permission) I made a new engine in about 4 hours that was compatible with SMARTY (assign, include and {$var}).

    Few months later, I came to conclusion that SMARTY is not for me, because even while it helps in displaing stuff, it can't always work for you. So I wrote my first template engine. It was realy powerfull, you could almost make the entire site in it - it had IFs, includes, SQL querues, arrays, structures, switch/case/default, custom tags (single tags, block tags (with position checking)), anyway features much like ColdFusion have (or even more).
    When I made it, I had to make an other site, but this time I didn't need such power, so I wrote an other template engine, this time much simpler.

    So, as you see, we need as much option as possible when we choose a library, so I think your package could be useful.

    About your code, you are using a lot of associative arrays, there aren't good for speed, specialy for things like a template engine. Use defines to define numeric constants.

    Also, you use a preg_* for parsing, I used more complicated methods for parsing. This is ok, but the parsing phase (no matter what method you use) takes time, so maybe you should think about a caching system (as optional feature).

    Your markup sign is nice for reading and for highlighting (and parsing) editors, but is quite long to write (I used <:if xxx:>, but editors didn't like that).

  • : : http://code.divineaspirations.net/chip/index.html
    : :
    : : You should check out this new template engine. The flexibility and ease of use is far superior to Smarty, and well, it's really fun to use it seems.
    : :
    : : Thanks for taking a look, and let me know what you think, because I really think this project could go places.
    : :
    : : Thanks again!
    : :
    : I made a CMS for a site with was using SMARTY. The something started to mess (probably SMARTY caching system). After two days of work, I realised I have to change the template engine, so (without my boss permission) I made a new engine in about 4 hours that was compatible with SMARTY (assign, include and {$var}).
    :
    : Few months later, I came to conclusion that SMARTY is not for me, because even while it helps in displaing stuff, it can't always work for you. So I wrote my first template engine. It was realy powerfull, you could almost make the entire site in it - it had IFs, includes, SQL querues, arrays, structures, switch/case/default, custom tags (single tags, block tags (with position checking)), anyway features much like ColdFusion have (or even more).
    : When I made it, I had to make an other site, but this time I didn't need such power, so I wrote an other template engine, this time much simpler.
    :
    : So, as you see, we need as much option as possible when we choose a library, so I think your package could be useful.
    :
    : About your code, you are using a lot of associative arrays, there aren't good for speed, specialy for things like a template engine. Use defines to define numeric constants.
    :
    : Also, you use a preg_* for parsing, I used more complicated methods for parsing. This is ok, but the parsing phase (no matter what method you use) takes time, so maybe you should think about a caching system (as optional feature).
    :
    : Your markup sign is nice for reading and for highlighting (and parsing) editors, but is quite long to write (I used <:if xxx:>, but editors didn't like that).
    :
    :

    Thank you for your feedback, it is very helpful to us in the further development of this project.

    Your suggestions do make a lot of sense, and mostly fall into our list of what we would adjust/update in the long run. However work on making things more efficient ( associative arrays issue and preg_* issue ) will probably be moved to the top of the todo list, or at the very least, closer.

    You might like to know however, that there already is a caching system in place.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories