Forum Moderators: phranque
Which template system do you all use on your sites?
My favorite for PHP is Smarty [smarty.php.net]
Nick
I have been using a lot of xml/xslt and really haven't found it to be superior to other ways of creating web pages. It has its advantages and its disadvantages. Here is one large disadvantage.
[webmasterworld.com...]
Personally, I've looked at a few templating systems and still use my own concoction. Why?
- Because I actually understand how it works,
- it's very small since it only does what I need it to do
- completely portable (I try to avoid features that may not be available on some setups, such as those running in safe mode)
- it does exactly what I want (except come up with more pleasing layouts/colors for the artistically impaired like me, but I would face that with any template system).
So what I want to know from you is why should I switch to a pre-built templating system and why smarty in particular?
Tom
I guess I use it mainly because it's extremly simple, yet very powerful. I love the fact that it generates PHP scripts from your templates the first time they're run. which eliminates the need to parse the template each time the page is requested.
Also, yeah, caching is spot on! It's a very versitile system and takes practically no effort to do simple stuff.
I used to use PHPLib but, well, smarty's just better, and it's developed by some of the guys that work on PHP itself.
I'm skilled enough to write my own system, and there is definately something to be said for having applications that just do what you want. But, I don't know what my next project will be untill I get it.... I like a trustworthy, comprehensive solution that in it's simplest form performs well. And if my needs are more complex, is up to the task....
BTW, I'm also aristically challenged! Check out my site ;)
Nick
I just don't want to mess around with some system when I can do exactly what I want myself. I would waste more time working with some system than going through my personal library and putting together the necessary components.
Just a preference but once you get your own system set up and you use it a couple of times, I think, it is more powerful and keeps you learning more.
I've seen enoug of you and Jatars posts to know that I'm coming in last, but I what I mean is that: Sure, I could cobble something together but why bother? someones already done it way beter than I could...
Nick
To each their own, why build one if someone has already made a viable solution but don't let this deter you either. If you have something that works go with it but that doesn't mean I won't mess around with smarty and possibly incorporate some of it's ideas/methods into my own. ;)
That is true, I already had a system when I heard about smarty. So, for me the opposite applies, why figure out a new system when what I have works just fine.
Yeah, that's sort of what I meant. I can recycle my function library and it all seems to work pretty well. Smarty is probably better, but I really know the way around my system.
Tom