Comanche Module Design

Avi Bryant avi at beta4.com
Sat May 17 19:20:31 UTC 2003


On Sat, 17 May 2003, Stephen Pair wrote:

> Going forward (6.2), I'd like to make better use of the visitor pattern
> to handle incoming http requests.  This should make it easier to handle
> the various kinds of http requests (i.e. OPTIONS, HEAD, PROPFIND, and
> the various WebDAV requests).

You're talking about handlers being able to have #handleGet:,
#handleHead:, #handlePropFind: and so on, I assume?  Sounds like a good
idea (especially if they all just default to sending #handleRequest:).

> Also, use of the visitor pattern should enable me to eliminate the
> (ab)use of dynamic bindings in the few places where I think I might be
> abusing it.

Good; I do think you might rely on dynamic bindings too much (for one
thing, it makes it a lot less obvious what a method like #processHttp is
supposed to do, when it doesn't take any parameters; I'm used to being
able to statically tell what relevant objects are in scope in a particular
method, and the pervasive use of dynamic bindings thwarts that).

Anyway, I don't expect or want to see Comanche itself get rid of
DynamicBindings (they're too convenient), but I wouldn't mind if they were
moved from being a prereq for KomServices to only being used by
KomHttpServer.  I really like the clean job you've done separating out the
Service and TcpListener code from the rest of Comanche, but it would be
even cleaner IMO if it didn't depend on the bindings stuff (for example,
my REPLServer would definitely use TcpService but has no use for dynamic
bindings).  Just my $0.02.

> Additionally, I want to separate out the basic protocol support in
> KomHttpServer into it's own package (KomHttpProtocol) and add a new
> package for the client side (KomHttpClient).  All of this will make use
> of the excellent job Michael is doing on the network rewrite (which I
> hope I can count on to be included in the final 3.6 release).

Great, I really look forward to this.

Avi



More information about the Squeak-dev mailing list