[geeklog-devel] Geeklog 2 questions/comments
Tom Willett
tomw at pigstye.net
Wed Jan 15 19:02:38 EST 2003
>
> It's 99.99% object oriented ;-)
>
You took my subversive underhand questions in the right way. I was really
only saying THIS IS THE WAY I WANT IT DONE.
I am in the midst of sorting out some procedural code I had written some
time back. What a mess. I took the easy way out and wrote it without
objects. I am regretting that now. Just because I know better, does not
always mean I code better. Just a little reminder that it is worth the
extra effort to do it right from the start. Time spent planning and doing
it right is always well spent.
> 2) Template System
>
> You aren't the first person to say that. However, I have not seen a
> better alternative to templating. I'm definitely open to ideas.
>
I think templates are the way to go -- I just think there should be some
better mechanism for including the module templates within the main template
system. Maybe have some generic templates that the module developer could
use and assemble to his/her own liking. It is easy to have e.g. a table
template that has an expandable number of columns and rows. Same for a
list, etc. You could even build on the object oriented capabilities of the
template class with something like this:
class table extends template {
// Class constructor
function table($root = '.', $file = 'table.thtml') {
$this->set_root($root);
$this->set_file($file);
}
function set_border() {
}
. . . . . . .
}
$tbl = new table($_CONF['layout']);
$tbl->set_border='0';
-----
Tom Willett
tomw at pigstye.net
More information about the geeklog-devel
mailing list