From: Kevin <ke...@dr...> - 2006-06-21 05:07:26
|
Andrew Turner wrote: > I'm finally getting a chance to dig into the major code revision. The > big change for me is the move to object-oriented PHP, rather than the > usual purely functional programming. I think it's a great move and > great job. Just get awhile to relearn FoFRedux architecture. :) > I've done mostly python and some java work in my day job, so thinking, designing, and coding in OO has become second nature. I have to be careful not to use it like a golden hammer <http://en.wikipedia.org/wiki/Golden_hammer>. > I'm wondering if it makes sense for me to make view snippets that I > would then call to include through a loop. For example, when listing > items in a feed. I can either call a function that would reside in > something like /lib/view/item.php, or I would actually > include(lib/view/_item.php) The include snippet approach seems cleanest. The snippet would be mostly HTML with some variable prints mixed in, yes? Essentially a template, which should be in a separate file. Because it is mostly html and not php, it doesn't even need a php extension. It could be .thtml which I've seen in another framework. (Symfony, I think) -Kevin |