Re: general organization question

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

 



* Greg Donald <destiney@xxxxxxxxx>:
> > why use one template, or many - why use different pages rather than
> > relying on variables.
>
> I scoff at template engines like Smarty and frameworks like Mojavi. 
> But that's just me.  I work with both of those technologies everyday
> but would never include them in my own projects.  For good templating
> all you _really_ need is eval() to parse out your variables. 
> Everything else is overhead.

There's a part of me that totally agrees with you.. and another that
feels such statements are along the lines of 'real men don't need teeth;
they can gum a bear to death'. A framework is a fantastic tool
especially when coding with others -- in such situations, maintaining
code somebody else wrote isn't a jolt when you first open it, but
instantly familiar. And using templates has saved me many more hours
of development time than I've lost in processor cycles.

Besides, didn't Rasmus say something like, "If eval is the answer,
you've probably asked the wrong question"? :-)

> > I'm also wondering about how I see "{content}"
> > type stuff in phpBB and Coppermine Photo Gallery.  Does it have to deal
> > with customization?
>
> Some of those guys wrap their variables in curly braces for whatever
> reason.  It's definitely not required by eval().

Usually there's a parser doing substitutions in such cases. Wrapping
them makes them easily visible when scanning through HTML, and also
allows validation of the template before content is placed (e.g.,
through the W3C's XHTML, HTML, or CSS validators).

> > Anyone have any recommendations where I can learn more about this, I
> > guess structural, stuff?
>
> The php.net manual has great code samples throughout.  There are many
> good php related sites out there too.  phpbuilder.com is a good one.

And browse through some PEAR code (http://pear.php.net); it's typically
very high quality.

-- 
Matthew Weier O'Phinney           | mailto:matthew@xxxxxxxxxx
Webmaster and IT Specialist       | http://www.garden.org
National Gardening Association    | http://www.kidsgardening.com
802-863-5251 x156                 | http://nationalgardenmonth.org

-- 
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