News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Zend Developer Zone:
The HYSOCAMTT templating approach
0 comments :: posted Wednesday February 27, 2008 @ 07:56:00
voice your opinion now!

In a new post to the Zend Developer Zone, Brett Zamir has posted a new tutorial that talks about using the Smarty templating system to create what he calls the HYSOCAMTT templating approach ("Have-Your-Separation-Of-Concerns-And-Mix-Them-Too".

This article aims to highlight a approach which allows one to separate everything from one's business logic to one's design logic, to XHTML from CSS, one's Javascript from the page structure, etc., while at the same time being able to be lazy and include, for example, CSS information within the same document (template) as one's XHTML

The tutorial uses an extension for Smarty called SmartyDocB that makes the documentation side much easier. He works through the templating process and includes some of the code for the .tpl files to get you started.

He also includes some future goals for his idea, a mention of XSL templating, XQuery and the potential for templating across programming languages to make your site even more flexible.

tagged with: hysocmatt template approach tutorial smarty smartydocb seperation concerns


phpRiot.com:
Application logic versus template logic
0 comments :: posted Tuesday May 02, 2006 @ 07:41:02
voice your opinion now!

phpRiot.com has posted this new tutorial today that looks at a method to seperate out the application logic and the templates for your site. Their weapon of choice is the Smarty Template Engine.

What this is basically saying is that anything relating to the final output should be determined in the template, while any data handling or processing should be done in your PHP files and classes. There's a little more to it than though, which we'll soon see.

They introduce the reader to what the two sides are (application and template logic) and an example of the "bad way" to do things - application logic in your presentation layer. To counter this, they give examples of proper structure with examples like checking strings, alternating background colors, showing a counter, and the inclusion of another template.

A few other suggestions are made as to the good and the bad of templating your site, including two cases showing both sides.

tagged with: php application template logic seperation smarty engine php application template logic seperation smarty engine


database package zendframework developer security cakephp framework pecl release conference job PEAR releases PHP5 book code mysql application ajax zend

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