Re: Re: Question about template systems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mar 5, 2009, at 4:16 AM, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:

On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote:
Robert Cummings wrote:


function hiddenInput($document,$name,$value) {
   $input = $document->createElement("input");
   $input->setAttribute("type","hidden");
   $input->setAttribute("name",$name);
   $input->setAttribute("value",$value);
   return($input);
   }


imo, I'd much rather have the simple syntax of phacade, rather than use the Dom Api directly; if I were using this approach in practice.

Does that answer your question?

That was what I thought.

Cheers,
Rob.

Is there a reason I shouldn't be doing it that way?

I didn't say you shouldn't. It's just expensive on every page request to
regenerate a document node by node. it also strikes me as tedious :/


it's way less tedious if you curb the syntax, which was my motivation for the system I posted earlier. The idea was to make it feel just like writing xhtml, but really it's just php code.

it's definately an expensive approach, but at least using native code for most of the heavy lifting should make it way faster than a straight php solution (using the same approach).

-nathan

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux