[Help] Needed in learning Smarty Template Engine

Discussion in 'Programming' started by cosmicx, Jul 10, 2012.

  1. #1
    Hello everyone,

    I am interested in learning Smarty Template Engine, but upon reading it's documentation, I see some php codes.

    My question now is, do I have to learn PHP first, as a requisite, for me to understand Smarty?

    For now, I only knew about XHTML and CSS.

    The reason why I want to learn this stuff is, I want to edit a template for a classifieds ads script.
     
    cosmicx, Jul 10, 2012 IP
  2. jhine

    jhine Active Member

    Messages:
    25
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    53
    #2
    Smarty is probably the most bloated framework to use and is the most unnecessary code written. PHP itself is a templating engine and if your desire is to separate business logic from design, I highly suggest you read up on MVC. If you're going to use a framework, I'd like to recommend CodeIgnitor.

    To your original question, I suggest you learn the basics of PHP. You should of course, understand any code you're using or writing.
     
    Last edited: Jul 10, 2012
    jhine, Jul 10, 2012 IP
  3. nveid

    nveid Peon

    Messages:
    155
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If your going to use a template engine, I recommend twig. Even better yet, go symfony2 + twig. :)
     
    nveid, Jul 16, 2012 IP
  4. cosmicx

    cosmicx Peon

    Messages:
    26
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    @jhine

    thanks for the input, im gonna search for pros and cons of it. several web dev blogs i've read recommends smarty. they say that they can separate presentations from blah blah... by using smarty engine. but i think the same as you, it think smarty complicates thing more.


    @nveid

    I'll search on that one. currently im creating a my first ever theme. and this will be integrated to a smarty template engine. it's for a open source script.
     
    cosmicx, Jul 17, 2012 IP