Although I’ve always agreed on the MVC pattern, specially the separation between the business and the presentation logics, I have to confess that throughout the years, my opinion about using template engines has changed a few times.

Back in 2003, I converted some of the IMP pages to templates and contributed some code to the Horde Templates engine. Back then, I presented some arguments in favor of template engines and one of the main reasons was the ability to send the templates to designers and have them doing what they want with them.

My experience quickly proved that I was wrong. Besides the fact that I added a bunch of lines to the code to define the template variables, the designers still needed a lot of help to customize the templates. Also, the code was slower until a template compiler was developed. Overall, the benefit from all that was null.

Since then, I think template engines are useless for most of the cases. I still agree you should separate business and presentation logics, but you can do it with PHP, you don’t need a different language for that.

Hasin Hayder, the author of a Smarty book, has an interesting post from earlier this year where he says that there’s no need of Smarty anymore:

I just dont need a wrapper over my PHP code which parse regular variable and echo them. Smarty just made itself extremely complex and useless too over the day, seriously.
I seriously don’t think there is need of Smarty anymore. Its dead!

There’s also a lot of buzz around the subject. You can also check the posts from Paul M Jones, and Michael Kimsal.

Tags:, , , , ,

O PHP Summer School já acaba amanhã. Cerca de vinta pessoas participaram neste curso e o resultado parece ter sido bastante positivo para os formandos.

Foi falado de tudo, desde Linux, Web Servers, o mais básico de PHP até tópicos mais avançados tais como OOP, Webservices, PHP&Performance e PHP&Segurança.

Esperemos agora que todos consigam tirar a certificação de PHP e se juntem ao clube. :-)
Eu como formador também gostei bastante da experiência. Aqui ficam os slides dos dois módulos que dei:

Tags:, , ,

Bruno and I took the Zend Certification exam here at the conference and I’m glad to announce that we both passed and we’re both ZCE now… :)

Here’s my certification authentication.

The exam had some tricky questions and it covers pretty much all of the aspects of PHP but I can’t say it was difficult.

For the ones who want to take this certification I really advise them to read the book: “The Zend PHP Certification Practice Book” written by John Coggeshall and Marco Tabini. You can buy it here.

Tags:, , ,

PHP and Unicode
Andi Gutmans from Zend, Andrei Zmievski from Yahoo!

- Definitions
. Character Encoding Form: representation of a character set using a number of integer codes (code values)

- Multi-i18n-what?
. Dealing with multiple encodings is a pain
. Different algorithms, conversion, detection, validation, processing… understanding
. Dealing with multiple languages is a pain too
. But cannot be avoided in this day and age
(more…)

Tags:, ,