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