wicket-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Vaynberg <igor.vaynb...@gmail.com>
Subject Re: [wicket 1.5] url handling refactor preview
Date Sun, 04 Oct 2009 20:21:13 GMT
On Sun, Oct 4, 2009 at 6:03 AM, Erik van Oosten <e.vanoosten@grons.nl> wrote:

> * With all respect to the given code, good names are important and therefore
> comments on names are important as well. A good name will deepen
> understanding. I too find that overloading of these 2 method names is not
> correct as they do not perform the same function.

so as far as I see it, everyone so far likes the name RequestMapper,
or IRequestMapper as it soon may be named. Because that makes sense,
the mapper maps requests to handlers, and handlers to urls. yes, it is
unfortunately asymmetric.

so since a mapper maps requests why not simply name the methods map().
in fact, bot methods *do* the same thing - which is to map one thing
to another. what would better names be?

RequestHandler mapRequestToHandler(Request);
Url mapHandlerToUrl(Handler);

RequestHandler mapToHandler(Request);
Url mapToUrl(Url);

but then all you are doing is repeating the information that is
already in the method signature in the method name. why?


View raw message