This is a discussion on Smarty. What do you think? within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hi Is it worth using on a big project or not? What are the disadvantages and advantages of using it? ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 disadvantages and advantages of using it? > > Thank you. |