PDA

View Full Version : Smarty



alexdevmaster
March 28, 2006, 04:29 PM
If anyone is looking for a good template engine for php, ecspecially you new people, I would recommend smarty. Not that its new, but it has some cool features including conditional and looping logic in the templates. It also has caching and a bunch of other useful features, you can check it out at:

http://smarty.php.net

I would urge you that if you really want to create a templating engine, check to see if smarty doesnt already fulfill your needs. It really would make no sense to re-invent the wheel, unless the templating technology you implement is very unique to you or critical to your business process.

death_knight
March 28, 2006, 07:36 PM
yknow i rather not use smarty, do my own templating :D. but smarty's tight tho, i just not sure if i'm gonna have the time to learn all the smarty functions.

pigeonflight
March 28, 2006, 08:00 PM
smarty is cool, but you really should look into phptal.
Where phptal wins is WYSIWYG mode. Phptal code will render properly in dreamweaver, so you don't have to guess at what it will look like after the code is run. It is also good to show to your clients, so they know how it will look, even before the code is fully in place. It is a win for the programmer, the designer and the client.

fabian
April 1, 2006, 05:24 AM
Thanks Alex.

I ALMOST forgot about Smarty! It's indeed a darn good template engine for php. Worked with it while being part of a larger project team in the Netherlands. Against my reservations, it truely worked.

Yet in overall reality I behave like death_knight regarding templates; I tend to do my own templating.

Now Pigeonflight brings about an interesting point; WYSIWYG templating (engine)? Hmmm. I develop in dreamwaver ye, so you REALLY make me curious!! As soon as there's spare time this baby will be taken for a spin. Thanks for sharing your knowledge on this.

From my side there is no new information i can bring to the table, the first two speakers said it all.

alexdevmaster
April 3, 2006, 02:29 PM
phptal, I will be sure to look into it, time permitting. Just in case anyone was wondering, the home page is http://phptal.motion-twin.com/

alexdevmaster
April 3, 2006, 02:32 PM
yknow i rather not use smarty, do my own templating :D. but smarty's tight tho, i just not sure if i'm gonna have the time to learn all the smarty functions.

The smarty functions are a breeze to learn. I mean there is conditional and looping logic. Simple as that! Of course it can get more complicated with modifiers and what not. but I always say use what you need and when you have good templating engine like smarty, youll probably find out later that it supports something that you could really use and you'll be like cool, I didnt know it could do that.

Billerg
April 3, 2006, 04:01 PM
I am not able to pull up smarty (http://smarty.php.net/). Does anyone else have that problem?:eusa_thin

alexdevmaster
April 3, 2006, 04:39 PM
I am not able to pull up smarty (http://smarty.php.net/). Does anyone else have that problem?:eusa_thin

Yup, Im having the same problem, shoot! I guess the server is down.

fresh_ja
April 3, 2006, 08:27 PM
Same problem here with smarty .. I was also reviewing PHPTAL and was interested in giving it a shot. However, I am running php on a Windows machine and noticed that there was no mention of a windows download and the only file to dowload had a unix compressed extension .tar.gz.

Is this app only avalaible for unix/linux machines ?

death_knight
April 3, 2006, 11:01 PM
ya'll should give prado a looksy as well, its not a templating engine like smarty but its a component/event driven apprach to php. http://www.xisc.com/