First discussion - api/impl pattern
Niclas Hedhman
niclas at hedhman.org
Wed Oct 6 04:31:53 EDT 2004
On Wednesday 06 October 2004 14:22, David Leangen wrote:
> So basically, you've convinced me of the advantages of using Metro even for
> the publication of my API. I don't want to have to take care of
> classloading and all the rest if I don't have to.
The "tragic" involved here is that you are an exception. Most people still
don't get it, and is wondering "so what?". This is a massive insight that
Steve has brought to Avalon, to me, to some others in the form of
Merlin/Metro.
As it stands, (and this is my opinion), products that people ARE prepared to
"lock-in" against, such as J2EEs servers, should be built on top of Metro.
Well, maybe the world one day will acknowledge the power involved here.
> First, I'm worried about lock-in. To be frank, we don't know what's going
> to happen to Metro over the next few years. I need to be able to swap in
> another container if anything goes awry.
Nothing will go "awry" :o) But nevertheless, your API will typically be free
of 'taint' of Metro being involved (except for some javadoc tags). The
implementation is a 'choice'. You *can* extract the functionality to a
separate class, and have a Metro wrapper around it. If you ever decide to do
it another way, you have to provide some of the functionality in another
manner. This is what Alex is doing in the Directory project.
> Second, I'm even more concerned about how this will affect my users. Does
> that mean they automatically have to become Metro users, too?
Of course we don't want to provide them with something that is good for
them... ;o)
Maybe Steve has another take on this, but I am of the opinion that if you are
a pure 'subsystem', you should probably just do what I wrote above. The Pojos
with the functionality, where the 'user' has to 'work hard' to get them up
and running, or the 'user' decide that "Hey, it is so much easier with this
Metro thing."
I guess it also depends on what the subsystem is and who the users are.
Cheers
Niclas
--
+------//-------------------+
/ http://www.bali.ac /
/ http://niclas.hedhman.org /
+------//-------------------+
More information about the support-dpml
mailing list