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

Posted by Richard Levasseur on 06/26/06 08:06

Marcin Dobrucki wrote:
> 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


IIRC, there is an option in php.ini to automatically buffer output
until flush() or the script ends, also avoid the header already sent
problem.

 

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

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