Re: Re: Question about template systems
| From: | Nathan Nobbe | Date: | Thu, 05 Mar 2009 13:46:26 +0000 |
| Subject: | Re: Re: Question about template systems | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-289364@lists.php.net to get a copy of this message | ||
On Mar 5, 2009, at 4:16 AM, Robert Cummings <robert@interjinn.com> wrote:
On Thu, 2009-03-05 at 03:08 -0800, Michael A. Peters wrote: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.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); }
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). -nathanI 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 :/Is there a reason I shouldn't be doing it that way?Does that answer your question?That was what I thought. Cheers, Rob.