Re: Summary: Perl 5 Classes for the Web
Martijn Koster (m.koster@nexor.co.uk)
Thu, 16 Mar 1995 09:48:46 +0000
> Okay, I'll try to summarise what's being proposed so far:
> (I'll do it in Module List style :-) I've tagged OO on the end of
> those modules which I know implement objects.
Right.
> URL::
> ::Base OO
> ::Proxy (may well disappear or be absorbed elsewhere) OO
I've made Proxy disappear; I wish I could make up my mind :-)
See also my separate message "Should URL.p be split up?",
URL could become:
URL::
::Base
::http
::...
> MIME::
> ::* media type and mailcap handling
> HTML::
> ::Charset charset <--> &entity; mapping
> ::forms temporary holding place for some old CGI.pm code ?
> ::* generators, parsers, extractors, searchers etc
Sure.
> HTTP::
> ::Base
> ::Header
> ::Error
> ::Date
> ::Protocol ? replaced by WWW::scheme below ?
> WWW::
> ::Agent new, more accurate, name for WWW::Request objects ? OO
Hmm. You did see the request and response are split into different
classes (defined in the same file) didn't you? This may not be what
you want of course...
> ::Scheme (or maybe URL::scheme ?) base class for schemes below OO
> ::<scheme> protocol interfaces for URL schemes, e.g., file, wais etc OO
So this is the "consistent HTTP interface" for all protocols right?
I was wondering if we should allow multiple such interfaces; who says
there is only one way to do it? (Already looks like it isn't! :) Maybe
we should actually name the particular method of interfacing,
e.g. "libwww-perl5" or LWP or something. If someone comes up with a
competing way of handling these transport issues, they can slot that
in under a different name, still use the URL classes etc, and not
interfere. Just because there is a name space doesn't mean we own it
:-)
> (Hopefully it's clear that putting all the above under WWW:: is
> not practical in the long run :-)
That depends. Maybe these should all be subdirectories of WWW (with
the WWW:: above being renamed to LWP); is it practical to shove all
classes people will design for other areas (mail, engineering, camel
racing competition marking etc) into the toplevel lib/perl5/?
-- Martijn
__________
Internet: m.koster@nexor.co.uk
X-400: C=GB; A= ; P=Nexor; O=Nexor; S=koster; I=M
X-500: c=GB@o=NEXOR Ltd@cn=Martijn Koster
WWW: http://web.nexor.co.uk/mak/mak.html