Arts and Architecture Blog | Web Design Blog | Search Engine Marketing Blog

Blog of a Web Designer and Search Engine Optimizer from Makati, Philippines

Blog covers topics under Web Design, Arts and Architecture and Search Engine Marketing

Using Smarty - Template Engine


Posted on April 14th, 2007 | |  Subscribe to Alfredology

Many of the new development projects I am working on now involves the use of smarty (with file extension *.tpl). Smarty is also used on modern cms applications such as Xcart, Serendipity, etc.

What is a Smarty?

Although Smarty is known as a “Template Engine”, it would be more accurately described as a “Template/Presentation Framework.” That is, it provides the programmer and template designer with a wealth of tools to automate tasks commonly dealt with at the presentation layer of an application. I stress the word Framework because Smarty is not a simple tag-replacing template engine. Although it can be used for such a simple purpose, its focus is on quick and painless development and deployment of your application, while maintaining high-performance, scalability, security and future growth. [source]

Using Smarty is very helpful if you are developing large scale websites because of its ability to provide a robust templating framework with numerous tools to assist you as your application evolves into the future.

Here are some good reasons to use Smarty in developing sites

  1. Designers can’t break application code. They can mess with the templates all they want, but the code stays intact. The code will be tighter, more secure and easier to maintain.
  2. Errors in the templates are confined to the Smartys error handling routines, making them as simple and intuitive as possible for the designer.
  3. With presentation on its own layer, designers can modify or completely redesign it from scratch, all without intervention from the programmer.
  4. Programmers aren’t messing with templates. They can go about maintaining the application code, changing the way content is acquired, making new business rules, etc. without disturbing the presentation layer.
  5. Templates are a close representation of what the final output will be, which is an intuitive approach. Designers don’t care how the content got to the template. If you have extraneous data in the template such as an SQL statement, this opens the risk of breaking application code by accidental deletion or alteration by the designer.
  6. You are not opening your server to the execution of arbitrary PHP code. Smarty has many security features built in so designers won’t breach security, whether intentional or accidental. They can only do what they are confined to in the templates.

To learn more about Smarty, check out this basic Crash Course on how to use it. You may also check this list of applications using Smarty here.

Related posts:

  1. Social Web Hosting Network
  2. Home-based Programmer
  3. Google Developer Day 2007
  4. Fifty Ways to Become a Better Designer
  5. Great careers you can do from home
  6. Internet Consulting Services
  7. Why is On Page Optimization Important?
  8. Using CSV
  9. Platinax Business Forum
  10. 20 Professional Web Design Tips
View Blog Archives: Click here


Leave a Reply

Have you found this site from a search engine result? Do you want your site rank well on search results? Learn Search Engine Optimization by joining the SEO Book Training Program and get a copy of this Free SEO Software bundled with a Free Internet Marketing Training.
Did you know that you can get a cool Web Design Template for as low as $65? Once you find the perfect template for your site, you can Hire a Web Designer to take care of that for you.
If you want to increase your site's popularity, you start by building relevant and quality backlinks or better yet, Hire a Link Builder. If you need other SEO services like Content Writing or On Page Optimization, you can Hire a Search Engine Marketer.
PERSONAL BLOG - SEO Blog, Search Engine Optimization Blog, Search Engine Optimisation Blog ARTS AND ARCHITECTURE BLOG - SEM Blog, Search Engine Marketing Blog, Search Engine Marketer Blog WEB DESIGN AND DEVELOPMENT BLOG - Web Designer, Web Design Blog, Web Designer Blog SEARCH ENGINE MARKETING BLOG - Website Designer, Website Designer Blog, Website Design Blog
Hi and thanks for visiting my site. I am Alfredo, a Filipino Web Designer, SEO Specialist and Blogger currently living near the Makati Central Business District. I am an active member of PhilWeavers, SEO Philippines and several others. Most of the time I am up and working, learning new skills and I don't play computer games. If you have any questions, please don't hesitate to send me an e-mail or chat via YM. Read more....
I am looking for