PHP Template Engines

Discussion in 'PHP' started by oo7ml, Nov 10, 2011.

  1. #1
    Hi, i have been developed a lot of small php websites over the last year using Smarty.

    I am now about to start working on a big project for myself and i am wondering if i actually should be using a template engine or not. Can you help me with the following questions

    1 - is the use of template engines seen as bad practice and unprofessional
    2 - do facebook, twitter, myspace etc use template engines
    3 - what is your opinion on smarty
    4 - what are the disadvantages of using template engines and or smarty

    Thanks in advance for your help...
     
    oo7ml, Nov 10, 2011 IP
  2. Divided

    Divided Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    3
    Trophy Points:
    0
    #2
    Template engines have their advantages and disadvantages. There is no major reason to either use or not use them.

    I prefer custom written software because I have full control over it and I know that everything which is packaged up and loaded is needed. Engines tend to load a lot of resources that are not really necessary. Then again you can probably build something in smarty a bit faster than from scratch.
     
    Divided, Nov 10, 2011 IP
  3. oo7ml

    oo7ml Well-Known Member

    Messages:
    656
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    105
    #3
    Ok cool, thanks
     
    oo7ml, Nov 10, 2011 IP
  4. subdivisions

    subdivisions Well-Known Member

    Messages:
    1,021
    Likes Received:
    40
    Best Answers:
    1
    Trophy Points:
    145
    #4
    My opinion, not to be taken as fact.

    Template engines are good for "scripts" that you sell or redistribute, but don't serve much purpose for code that only you and your team will see. That said, if you must use a template engine, I'd take Twig over Smarty any day.
     
    subdivisions, Nov 14, 2011 IP