> >That's the key - "plug compatible". But we are in java, and writing a
> >simple adapter should be very easy. Adapters don't add so much complexity.
> 
> The question is that if we have plug-compatability then what is the point
> of having multiple implementations? (besides keeping massive scalability).

"Plug compatible" doesn't mean same API, it means you should be able to
write an adapter  and use one or another. Yes, glue code may be required.

And avoiding multiple implementations for the same component is what we
want ( avoid duplication, etc) - in time it's likely that most components
will merge. 

In some cases you may continue to have multiple utils doing the same thing
- like one focusing on a small footprint and JDK1.1 compatibility and
another using the latest APIs/JDK and with a lot of extra features. 
But in both case the utils will provide some base functionality (log,
pool, xml, etc) - you'll not get all the features if you use the small
one, but still you should be able to write the adapter and plug it in.

Example: a log tool. Log4j is great and I hope it'll be used in tomcat
soon, but the current logger in TC3 is usable and has the basic
functionality at a much smaller footprint. Some people will want to use
the small one, other will prefer the features - as long as you can plug
them in easily it shouldn't be a problem. That doesn't mean log4j needs to 
expose only the minimal interface that is provided by the tomcat logger,
neither that tomcat logger must implement all the features of log4j. 



> If we have a plug in point then each framework will only expose a certain
> limited amount of functionality (lowest common denominator approach) or
> else they use a generic method of setting implementation specific pramaters
> (JNDIs approach). If we use the second approach then how much has the
> abstract gained us ?

Again, the goal is not to define APIs for components - that's a different
business. The goal is to have a good modularization of code and clear
dependencies - where needed. 

Each component can expose as much or little as it wants - and if for a
particular task there are 2 components it should be possible to write an
adapter. 

Even in CPAN, you can have multiple modules doing similar tasks, each with
it's own API. And you have modules depending on other modules.

-- 
Costin



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to