It looks like that we are talking about 2 different interfaces. One is
the mmci interface and the other is the end-user interface. The end-user
interface is the decorator for the mmci interface. As a decorator the
end-user interface implements the mmci interface, but it can extend it
with extra functionality. The mmci stays a lightweight implementation
and the end-user is a skin around it.
interface CloudInterface {
getRelatedNodes(NodeManager n);
getNodeManager(String name);
}
class BasicCloud implements CloudInterface {
getRelatedNodes(NodeManager n) {
// some lightweight stuff
}
getNodeManager(String name) {
// some lightweight stuff
}
}
class Cloud implements CloudInterface {
CloudInterface cloud
getRelatedNodes(NodeManager n) {
cloud.getRelatedNodes(n);
}
getNodeManager(String name) {
cloud.getNodeManager(name);
}
getRelatedNodes(String name) {
NodeManager n = getNodeManager(name);
getRelatedNodes(n);
}
}
Nico
------------------------------------------------------------------------
-----------------
"The difference between reality and fiction? Fiction has to make
sense."
-- Tom Clancy, "Larry King Live," CNN
> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Namens Pike
> Verzonden: dinsdag 2 september 2003 0:04
> Aan: [EMAIL PROTECTED]
> Onderwerp: Re: [MMCI1.2] org.mmbase.bridge.util
>
>
> Hi
>
> > Guess you guys aren't as lazy as me. I like the shorthand methods,
> > because it is less typing with the same result.
>
> I bet I'm lazier than you :-) what's more, I like the 'end
> code' to be pretty, readable, like a functional layout, and I
> like a big stack of wrappers underneath it to catch all the
> dirty exceptions.
>
> but, i like the mmci itself to be just as clean.
> wrappers can come and go, and you like a lot of them, but
> an interface should be steady so third parties can safely
> implement them. I wrote my own implementation of a Cloud
> once, and every new MMBase release I have to rebuild it :-|
>
> but I see the discussion is already heading there ...
>
> $2c,
> *-pike
>
>
> ====================================
> = 1/9671406556917033397649408 yottabyte
> = 1/9444732965739290427392 zettabyte
> = 1/9223372036854775808 exabyte
> = 1/9007199254740992 petabyte
> = 1/8796093022208 terabyte
> = 1/8589934592 gigabyte
> = 1/8388608 megabyte
> = 1/1048576 Megabit
> = 1/8192 kilobyte
> = 1/1024 Kilobit
> = 1/8 byte
> = 1/4 nibble
> bit = 1 bit
>
>