there's something wrong with delegation and inheritance being such a fixed
and fragile choice. there must be some way to structure a language so you
can mix in functionality at compile (or run) time, without the headaches
of manual
delegation, yet with usable compiler checking benefits and without the worst
problems associated with traditional MI. there's just something basic
wrong
with objects. i can't compose them without making structurally limiting
decisions...
it's hard to /know for sure/ when to compose and when to inherit... i like
inheritance through a singular interface in this particular case because
of the generality
and simplicity and because it limits the interface and pushes any
delegation or other
gory specifics back behind the scenes. and i do think that's better for
this, but it's
hard to say why /exactly/ (beyond what i just said) except "been there,
done this"...
whatsucks is that we have to decide in the first place! no wonder it's
so hard to
build oo systems well...
Seth Ladd wrote:
On 8/13/05, Jonathan Locke <[EMAIL PROTECTED]> wrote:
to do page name resolution you might extend some kind of
AbstractMarkupLocator
with default functionality that uses a replaceable resourcestreamlocator
to actually
load stuff. then to locate the markup, just mangle the class in your
ShortClassNameMarkupLocator
implementation and call the base class loader functionality... make sense?
Ahh, I think I see where we are "crossing streams". I'm coming from a
delegating/composition background, so I was looking for a solution
that didn't require subclassing anything. Instead, I was looking at
the solution that broke the algorithm up and used the Template pattern
to delegate the details to other classes (say, for example, the
details of resolving the page name).
You're suggesting the inheritence approach, where I subclass the
default behavior and override the generatePageName() method.
Sounds fine to me. Do me a favor, and provide the "name resolution"
method as protected. This way, the subclass needs only to override
that method, and never has to override the getMarkup() method. Just
have getMarkup() delegate to that method for name resolution (the
default impl simply returns the FQCN).
Seth
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user