David E. Smith on 24 Oct 2002 00:50:01 -0000


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

Re: [spoon-discuss] A Rant.


On Wed, 23 Oct 2002, bd wrote:

> sub htmlize {
> my $message = shift @_;
> $message ~= s/</&lt;/;
> $message ~= s/>/&gt/;
> return "<pre>\n$message\n</pre>";
> }

ah, perl. You may have noticed that most scripts have a .php extension. ;)

Anyway, it's a bit more complicated than that, because surrouding
everything in PRE tags makes the text look goofy on most browsers
(monospace font, usually).

I had something like that for a very brief period, back around nweek 2 or
3; everything looked bad, so I ritually purged the PRE tags and I don't
think anyone else ever saw my shame.

I may go with some variant of BBtags, but that leads to its own sets of
problems (more or less the same problems, actually). Usually, they're
turned into HTML before getting stored away in the inevitable database.
The auto-generated HTML tends to be rather ugly...

Either I have to store that fairly ugly auto-generated HTML (which means
that, later on, when someone wants to edit something, they have to clean
it all up), or I have to store text with BBtags, and then parse it every
time a page is generated or loaded (which would put a lot of extra load on
Joel's poor server). Yeah, the most frequent pages are pre-generated and
cached anyway, but this would make digging through revision histories
(which AREN'T pre-cached) painful for everyone involved.

(I've already run into a cousin of this problem: The reason the
rules page is no longer created on-the-fly is that the Web server kills
the request before it's actually done. Between several hundred database
queries, text formatting, and having to feed all that data to some user
who's probably still on a 56K modem, the 30-second process limit built
into PHP comes up fairly often.)

...dave

_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss