![Smarty Forum Index Smarty Forum Index](templates/smarty/images/phpbb2_logo.gif) |
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
natefanaro Smarty n00b
Joined: 24 Jun 2008 Posts: 1
|
Posted: Tue Jun 24, 2008 11:05 am Post subject: Smarty is totally awesome |
|
|
I've been an amateur php web developer for a few years and have always had an issue with separating code from layout. I recently decided to completely rewrite an old project of mine, gobloggo[dot]com. It took a while to rewrite but using smarty made things go much smoother than if I came up with something on my own. Pagination was a breeze with the plugin. So far the website is using one theme but I plan on making some more. This might include an iPhone theme that's switched on via user agent.
Just wanted to say thanks to everyone that made smarty awesome! |
|
Back to top |
|
pittendrigh Smarty Rookie
Joined: 15 Jul 2007 Posts: 5
|
Posted: Thu Aug 14, 2008 12:44 pm Post subject: Re: Smarty is totally awesome |
|
|
natefanaro wrote: | I've been an amateur php web developer for a few years and have always had an issue with separating code from layout. I recently decided to completely rewrite an old project of mine, gobloggo[dot]com. It took a while to rewrite but using smarty made things go much smoother than if I came up with something on my own. Pagination was a breeze with the plugin. So far the website is using one theme but I plan on making some more. This might include an iPhone theme that's switched on via user agent.
Just wanted to say thanks to everyone that made smarty awesome! |
Convince me:
I'm serious about this. I'm willing (even wanting) to be convinced.
I used Smarty on a files-based CMS I'm working on. I found it difficult
to debug. My system now uses file_get_contents($path), thereby
accomplishing what I wanted (html fragments get sucked into a system
where the layout and appearance is defined externally, by layout libraries
and css).
My system doesn't have caching yet. But it will. There are lots of free caching
libraries out there. So far I just don't see (maybe I'm blind) what Smarty
accomplishes. In Java Tomcat programming a templating engine is
great: you can update HTML with a text editor and you don't need to
rebuild the application. But that isn't an issue with an interpreted scripting
language. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
|
Back to top |
|
pittendrigh Smarty Rookie
Joined: 15 Jul 2007 Posts: 5
|
Posted: Sat Aug 23, 2008 12:25 pm Post subject: |
|
|
...But I can (and do) accomplish that with a system built around
file_get_contents() ....html fragments can be edited with vi
without any access to logic or overall layout.
And with file_get_contents I don't have to fight with
hard-to-debug tpl flies. Templating makes sense
for Java (can change html without recomiling) but
I didn't see hassle trade-off for php. |
|
Back to top |
|
mohrt Administrator
Joined: 16 Apr 2003 Posts: 7368 Location: Lincoln Nebraska, USA
|
Posted: Sat Aug 23, 2008 4:24 pm Post subject: |
|
|
It's a toolbox, you don't have to reinvent the wheel on a lot of useful features presentation side, and it enforces presentation separation. If it doesn't work for you, don't use it ![Smile](images/smiles/icon_smile.gif) |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|