I'm working on a new web application written in PHP, (My)SQL, HTML/CSS and Javascript/Ajax, but I'm wondering whether I should use Smarty or just use raw HTML in files, or whether it's generally worth using Smarty?
Anyone have anything to say?
Smarty: Is it worth using?
Started by Calgon, Dec 07 2010 07:22 PM
11 replies to this topic
#1
Posted 07 December 2010 - 07:22 PM
|
|
|
#2
Posted 07 December 2010 - 08:10 PM
I know Orjan likes Smarty. I'd personally suggest WordPress. Whatever program you decide I'd probably stray away from HTML files unless you never plan on updating the website, or doing so very rarely.
I suppose it really depends on what you want to achieve with the website.
I suppose it really depends on what you want to achieve with the website.
#3
Posted 07 December 2010 - 08:12 PM
BlaineSch said:
I know Orjan likes Smarty. I'd personally suggest WordPress. Whatever program you decide I'd probably stray away from HTML files unless you never plan on updating the website, or doing so very rarely.
I suppose it really depends on what you want to achieve with the website.
I suppose it really depends on what you want to achieve with the website.
I'm making a web based organizing application, so Wordpress is hardly an option as I'd have to customize so much.
Thanks for your input though, I do believe that using Smarty instead of stray files with HTML in would be more beneficial, but is it worth getting used to the Smarty API and building a whole application/site based around the Smarty Template System?
#4
Posted 07 December 2010 - 09:17 PM
It may seem interesting at first but saves an awful amount of time and maintenance rather than doing it all by hand, I would most certainly learn a templating system in a new project that requires a lot of customized fronts.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#5
Posted 07 December 2010 - 09:19 PM
Nullw0rm said:
It may seem weird at first but saves an aweful amount of time and maintenance rather than doing it all by hand, I would most certainly learn a templating system in a new project that requires a lot of customized fronts.
Have you used Smarty or any other alternatives? I just want to make sure that if I do use a template system, I'm using the best/most efficient available.
#6
Posted 07 December 2010 - 09:21 PM
I believe it has the most robust caching implementation of all the template engines I had tried, it sure is efficient from that perspective.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.
#7
Posted 07 December 2010 - 09:22 PM
Nullw0rm said:
I believe it has the most robust caching implementation of all the template engines I had tried, it sure is efficient from that perspective.
Thank you again for the help then. :)
#8
Posted 08 December 2010 - 03:31 AM
The best template engine available for PHP is Twig: Twig - The flexible, fast, and secure template engine for PHP . At the second place goes JustPlainPHP. To find a prove you can check what template engines use two most popular PHP frameworks: Symfony2 and Zend Framework.
#9
Posted 09 December 2010 - 03:31 AM
Vladimir said:
The best template engine available for PHP is Twig: Twig - The flexible, fast, and secure template engine for PHP . At the second place goes JustPlainPHP. To find a prove you can check what template engines use two most popular PHP frameworks: Symfony2 and Zend Framework.
Would you mind explaining why you think it's better than Smarty then? Seeing as everyone else is in favour of Smarty and they've pretty much already stated that it's generally efficient and from what I've heard from others, it's generally secure.
#10
Posted 09 December 2010 - 03:52 AM
Check main page of Twig and compare listed features with Smarty.
#11
Posted 10 December 2010 - 09:50 AM
Yes, I like and use Smarty alot. There is other template engines out there, but I haven't learned them. I find Smarty stable and good working, dynamic and good enough for most usage. I can't tell if it's better or worse than others, but I find Smarty do all work I want in a good way. I have written a three-parted tutorial to introduce Smarty which can be found in the php tutorial section.
If you choose Smarty or something else, it's up to you, but as you seem to have a project ahead that need a high level of own work, so a CMS like WordPress, Drupal or Joomla won't work, I highly recommend to use a template system. It eases both the layout and the behind the scene-code, as you don't have to think of output order in your normal code.
I would use Smarty as I know it.
If you choose Smarty or something else, it's up to you, but as you seem to have a project ahead that need a high level of own work, so a CMS like WordPress, Drupal or Joomla won't work, I highly recommend to use a template system. It eases both the layout and the behind the scene-code, as you don't have to think of output order in your normal code.
I would use Smarty as I know it.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I study Information Systems at Karlstad University when I'm not on CodeCall
#12
Posted 10 December 2010 - 09:51 AM
Orjan said:
Yes, I like and use Smarty alot. There is other template engines out there, but I haven't learned them. I find Smarty stable and good working, dynamic and good enough for most usage. I can't tell if it's better or worse than others, but I find Smarty do all work I want in a good way. I have written a three-parted tutorial to introduce Smarty which can be found in the php tutorial section.
If you choose Smarty or something else, it's up to you, but as you seem to have a project ahead that need a high level of own work, so a CMS like WordPress, Drupal or Joomla won't work, I highly recommend to use a template system. It eases both the layout and the behind the scene-code, as you don't have to think of output order in your normal code.
I would use Smarty as I know it.
If you choose Smarty or something else, it's up to you, but as you seem to have a project ahead that need a high level of own work, so a CMS like WordPress, Drupal or Joomla won't work, I highly recommend to use a template system. It eases both the layout and the behind the scene-code, as you don't have to think of output order in your normal code.
I would use Smarty as I know it.
Thanks for your input. I've decided to stick with Smarty as I've already learned the basic usage of it and started work on my site and produced some Smarty templates for it.


Sign In
Create Account


Back to top










