Tim Moores wrote:OCGi and DI/CDI do quite different things. In which way do you think they're comparable or might even compete?
I believe they are still good enough to serve the modularity for the web projects.
I do like to weight it against not using C&DI functionality.
If you were me what do you choose?
One of the thing I read in one of the blog for OSGI, is their web service module is still not that much mature.
That's like saying "I don't like to use a fork because it doesn't provide what I need in a spoon". OSGi isn't a DI framework. If you need a DI framework, use one. If you need OSGI's capabilities, use OSGi. If you need both, use both.
That depends on your requiremnets, about which we know nothing.
One of the thing I read in one of the blog for OSGI, is their web service module is still not that much mature.
There is no single "their" - several OSGi implementations exist, some more mature than others. Without context, this sentence makes no sense. Assuming you're talking about the HTTP service (web services are something else entirely), I've never seen the allure of that particular OSGI module. I think if I needed that kind of dynamism in a web app I'd go about it differently.
So it is not right to say OSGI is not for the DI support. DI is a desirable feature to have in OSGI then to consider it as alternative.
This is interesting to know about different versions of OSGI. If you can provide more details about them then it will be helpful.
Following link is having some heated discussion about OSGI vs JEE 6. http://seamframework.org/103610.lace
It is absolutely right; let me emphasize that: OSGi is not for doing DI. And I repeat: Saying "DI is desirable, therefore if OSGi doesn't do it I have to consider alternatives" is like saying "A fork is useful, so if my spoon can't act as one, I'll have to look for alternatives (even if I'm eating soup)." During a proper meal you'd use both, each for the task it is meant for.So it is not right to say OSGI is not for the DI support. DI is a desirable feature to have in OSGI then to consider it as alternative.
I'm not talking about different versions of OSGi (which of course do exist), I'm talking about different implementations: Apache Felix, Eclipse Equinox, Knopflerfish. OSGi itself is just a specification.
I found a useful page here if you want to learn about OSGi: https://coderanch.com/how-to/java/OSGiLinks
Mike Van
Apache Software Foundation Committer
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|