Jump to content

Archived

This topic is now archived and is closed to further replies.

dmcglone

Smarty

Recommended Posts

Is it even worth learning Smarty? I've dabbled with it, but it just seems like too much of a pain.

Share this post


Link to post
Share on other sites

We use smarty at work and it is a bloated unnecessary PITA. I see very little benefit to templating engines in general and Smarty especially.

Share this post


Link to post
Share on other sites

We use Twig. I've worked with Smarty and plain HTML/PHP in ZF but Twig provides a good balance between flexibility and enforcement of SoC. It is somewhat complex, as is Smarty, but our front-enders are very enthusiastic about it. And based on what little work I've done using it, I already like it better than those two alternatives as well.

 

So on the question whether or not to learn Smarty: don't bother. Some years ago Smarty was a de-facto standard for templating in a professional environment, but unless you expect a lot of exposure to legacy systems I really wouldn't bother.

Share this post


Link to post
Share on other sites

Thanks, I like what I hear. :-)

I am struggling with organization of my dir structure, code pages and projects and it makes me feel unorganized and dirty, not to mention harder to remember where that code was that I need to find.  I just can't seem to find that balance, so I thought I'd try and see if Smarty would help here, but it doesn't seem worth the hassle. :-/

Share this post


Link to post
Share on other sites

Well, if your UI is complex enough to get confused about organizing files (which doesn't take much), templating isn't your main concern, probably. Depends on the purpose and potential scope of your application I guess but I would be much more worried about my service layer and domain model. Again, depends on your project but personally I tend to focus on those and have the UI be a logical consequence of that that design (actually IRL there are some other people involved). But that might be skipping a few steps for you, or not, no idea.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.