|
From: Steve W. <sw...@wc...> - 2000-12-07 20:15:43
|
On Thu, 7 Dec 2000, Arno Hollosi wrote:
> > Ah, but that is the beauty of it all. All you have to do is say at the
> > end of index.php
> > include('templates/template.html');
>
> Again: no it's not as easy as this. I want to have a string returned!
> (e.g. dump html files in a ZIP file) so it basically becomes some form
> of "eval('templates/template.html')" - and that means (among other things)
> no echo, print, printf (not that that would be a major problem).
Right... at one point it became necessary to stop generating HTML
on-the-fly, and build the page in a string. Then the page is returned to
the user in a single "echo" statement.
The irony has never been lost on me that we took PHP and separated the
display and logic the way we did, undoing exactly what PHP was meant to
do. But this is a common theme; the JSP crowd have struggled with the same
problem in the last year++ and have come up with the idea of "template
engines" ala Cocoon from apache.org.
And then one comes right back to the problem of "display logic," and
###IF### creeps in, and then there is a call for ELSE, FOREACH, WHILE etc.
and we've come full circle.
The problem is not really mixing display and logic; it's a people problem.
We have designers who know HTML and can't/won't deal with <?php echo "foo"
?> constructs... and programmers who love to write recursive descent
parsers in XSSI if possible, but couldn't match colors to save their
lives. So the call to separate display and logic goes on, and the desire
to unite them pushes back.
> I don't know Steve's plans for phpwiki, but I guess 1.3.x will go into this
> direction: keeping the core as simple as possible and make phpwiki more
> modular (so that people can add their favourite extension easily without
> bloating the core).
Right... like so many great tools do. My model would be Emacs: with four
or five basic commands, anyone can edit text files in Emacs. Simple. Over
time you can write expert systems and even Wikis in Emacs Lisp. Powerful,
simple, accessible.
> > PS. Can I ask you to just send replies to the mailing list? Right now, I
> > am getting two replies every time. Or does Kmail not have that option?
>
> Odd - I thought the list-prog doesn't send emails to people listed in To/CC.
> At least it does not send me an email if my address is inside To/CC.
I will reconfigure phpwiki-talk to reply-to the list, not the sender.
We'll try it for a while and see how it works.
sw
...............................ooo0000ooo.................................
Hear FM quality freeform radio through the Internet: http://wcsb.org/
home page: www.wcsb.org/~swain
|