[RESOLVED] How to effectively use templates in my web application ?
Hi...:wave:
I'm developing a web application now. But I wish to allow customization of my web application through templates.
So, what are your recommendations/suggestions on this ? :)
Thanks :wave:
Re: How to effectively use templates in my web application ?
Re: How to effectively use templates in my web application ?
I suggest trying something like Smarty. It separates design from code so you can easily switch out templates and design.
Re: How to effectively use templates in my web application ?
I haven't used it extensively, but I dislike Smarty for its custom syntax; I don't feel like it makes things simpler.
You might want to look at MVC frameworks for help with separation of presentation from logic; while not perfect, CakePHP has been useful in some places. I found that I liked the MVC pattern, but wasn't enamored of Cake, so I've been rolling my own little framework for personal projects.
Re: How to effectively use templates in my web application ?
Re: How to effectively use templates in my web application ?
I actually like Smarty.
In my opinion it has a cleaner syntax in between HTML than regular PHP code.
Extending the Smarty with functions and modifiers is pretty easy.
Re: How to effectively use templates in my web application ?
Re: [RESOLVED] How to effectively use templates in my web application ?
Many are saying that, Smarty is old and Dwoo is a good alternative to it.
I found a comparison sheet: http://www.phpcomparison.net/
:wave:
Re: [RESOLVED] How to effectively use templates in my web application ?
Don't agree.
While that might have been true 3 years ago when Dwoo was founded, meanwhile Smarty 3 was released and the latest update was 5 days ago.
Re: [RESOLVED] How to effectively use templates in my web application ?
Thanks :wave:
I'll go with Smarty then. :thumb:
Re: [RESOLVED] How to effectively use templates in my web application ?
I have been using Smarty with my most recent project. it really helps with my mobile version because i can load the same php file, but detect if it is mobile, and show a jQuery mobile page.
Re: [RESOLVED] How to effectively use templates in my web application ?
Thanks for the info :thumb:
:wave: