News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Alessandro Nadalin:
Integrating Twig in Your Legacy PHP Code
June 18, 2013 @ 10:19:49

Alessandro Nadalin has posted a two part series to his site to help you get the Twig templating tool integrated with your legacy codebase.

It might happen that you are working on a legacy code that is years old, with its own templating mechanism1 that doesn't really allow you to take advantage of the benefits that a structured and object-oriented engine like Twig. In this situations, when a complete replacement would cost too much to your organization, you can take advantage of a wild integration between this advanced template engine and your existing code.

In the first part of the series, he proposes integrating it at the base level, essentially wrapping the "render" method of your framework of choice. In the second part of the series, though, he comes back with a "less wild" approach that also lets you take advantage of some of the other features twig has to offer. He modifies the previous example to output a template file and reuse that in the Twig "render" call.

0 comments voice your opinion now!
twig legacy codebase integration template render

Link: http://odino.org/integrating-twig-in-your-legacy-php-code

blog comments powered by Disqus

Similar Posts

Alessandro Nadalin: Integrating Twig in Your Legacy PHP Code

Roy Ganor's Blog: 1 Community, Dozen programmers, 1186 bugs & one quest for transcendent PHP editor

Volker Dusch's Blog: Mandatory "Template Engines (Twig) vs Plain Old PHP" Post

NetTuts.com: Sending Emails With Laravel 4 & Gmail

Smashing Magazine: Advanced Power Tips for WordPress Template Developers: Reloaded


Community Events





Don't see your event here?
Let us know!


project framework code podcast application series configure laravel bugfix list interview library language threedevsandamaybe developer introduction release community wordpress api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework