You are here: Re: Design methodology question « PHP Programming Language « IT news, forums, messages
Re: Design methodology question

Posted by Marcin Dobrucki on 06/22/06 11:28

msch-prv@bluewin.ch wrote:

> I visualize html pages in terms of grids where cells could be filled up
> by html block components. Is this approach somewhat too fancy?

I've had success with using PEAR::HTML_Page2 with a few other HTML_*
packages. For example, I have classes that handles Users, and has a
function "getForm". That produces a QuickForm object which I can then
dump into the HTML_Page along these lines:

$p = new HTML_Page2();
....
$u = new User(/* params */);
if ($show_form) {
$p->addBodyContent($u->getForm());
}
....
$p->display();

It took a while to hone this on a bigger scale, but now making GUI
changes is very quick and simple. It has an aditional benefit of not
having to buffer output because everything is inserted into the page
object, and its display is the last part of the script. So I never get
a "header already sent" problem. Anytime before $p->display() you can
re-direct, and do something else.

/marcin

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация