For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > December 2006 > Smarty. What do you think?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Smarty. What do you think?
Ralph

2006-12-13, 4:09 pm

Hi

Is it worth using on a big project or not?

What are the divantages and advantages of using it?

Thank you.
--

Ralph
zheka

2006-12-14, 6:58 pm

yes IMHO
smarty i's well tested and widely used template engine
Ralph wrote:
> Hi
>
> Is it worth using on a big project or not?
>
> What are the divantages and advantages of using it?
>
> Thank you.
> --
>
> Ralph


Dr. No

2006-12-15, 3:58 am

I used it on a corporate finance reporting project and had great success. It is
really helpful to separate the logic an presentation layers if you have an
application with a lot of logic. I have definitely seen applications where a
templating engine was not used and the resulting mix of HTML, logic and print
statements was a total, incomprehensible mess. Its also a nice compromise
between a traditional PHP app and one that uses a full on framework.

What's the drawback? Well, Smarty is its own language, albeit a simple one, and
there is a learning curve. (That difference, however, does enforce the logic /
presentation separation.) Also, it is important to secure the templates in a
file structure outside to the htdocument structure, otherwise the source code
for the templates can be readily interrogated. This is not hard if you have a
home directory that is separate from your html directory on your service. (If
you're hosting the app yourself, this should not be a problem.) It does add
complexity to file management, but the long term payoff in simplified
maintenance is significant.

There are alternatives, such as building an XSLT based solution. In theory, I
like the idea of Clearsilver, however the Clearsilver extension is experimental.

Ralph wrote:
> Hi
>
> Is it worth using on a big project or not?
>
> What are the divantages and advantages of using it?
>
> Thank you.

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2009 codecomments.com