Member Avatar for iamthwee

What do people think about PHP template engines, or CMS's that get the end user to develop using these template syntax.

Is it an extra learning curve, is it not very flexible? Is it a great asset discuss...

Recommended Answers

All 3 Replies

When I started using Laravel I didn't really care for them. It comes with the blade templating engine, and once I understood the syntax I thought it was nice. Thought you have the option of using other templating engines with it as well.

Member Avatar for iamthwee

Thanks for you input pixelsoul, anyone else care to share their opinions?

Member Avatar for diafol

If you're building a small site, then templaters are probably not worth the hassle. However, with large projects, I think you'd be a masochist not to use them. I use Laravel - pretty much exclusively now as far as frameworks go, so Blade is my tool ("weapon" was too much of a pun!). It's very, very nice. I used to use RainTPL for non-framework stuff - which I liked immensely. Twig was OK if you could be bothered to trawl through the labyrinthine docs. Smarty makes me gag.

So from my perspective - templaters can be good or they can be bad - but only in the subjective sense. Test a few, pick one you like and invest time in getting to know it. On the face of it, many templaters out there offer the same functionality and some have very similar syntaxes (unsurprising).

CMSes on the other hand are fantastic for building certain types of sites, but not all. The old established ones like Joomla and Drupal have tended to carry their legacy code like an obese relative. However, I think they've started to tidy things up now - but they lost me a long time ago. There are tons of new kids on the block and I spied a new one called October, which I'm itching to get my hands dirty with once I get some free time. Then you've got the blogging platforms like WP, which are OK but very limited when you want to develop something unique.

As an example, I'm building a commissioned site for a finance company at the moment and Laravel has come to the rescue with it's easy MVC, Eloquent models, Composer installs and Artisan for creating controller resources. Blade has certainly made creating consistent views a doddle. A CMS would have hampered me considerably due to the lack of flexibility and if you've ever tried, extending a CMS or creating modules can be an absolute nightmare, with documentation being pretty scant. Some are better that others.

On the other hand, I've created a few 'simple' sites for clients in WP, where they want to update news and such like and have a 'presence' - nothing fancy. I think I'd be insane to try to create a CMS from scratch.

So horses for courses. If you're going to be a one man band (like me at the mo), then I think you need to be able to have a broad set of skills that enable you to tackle a wide variety of jobs, as you're never quite sure where the next paycheck is coming from. In addition, developing your skills by delving into different CMSes, platforms, templaters and frameworks (front- and back-end) ensures that you have a full toolbox and you're not trying to hammer a nail with a saw.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.