Jump to content


Photo

Smarty


  • Please log in to reply
4 replies to this topic

#1 dmcglone

dmcglone

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationColumbus, Ohio

Posted 24 May 2013 - 06:35 PM

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


Blessings,
David M.

#2 trq

trq

    Advanced Member

  • Administrators
  • 30,723 posts
  • LocationSydney, Australia.

Posted 24 May 2013 - 07:25 PM

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.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#3 448191

448191

    Advanced Member

  • Staff Alumni
  • 3,539 posts
  • LocationNetherlands

Posted 24 May 2013 - 08:09 PM

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.



#4 dmcglone

dmcglone

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts
  • LocationColumbus, Ohio

Posted 24 May 2013 - 08:45 PM

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. :-/


Edited by dmcglone, 24 May 2013 - 08:46 PM.

Blessings,
David M.

#5 448191

448191

    Advanced Member

  • Staff Alumni
  • 3,539 posts
  • LocationNetherlands

Posted 24 May 2013 - 08:58 PM

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.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com