OSGi, Microsoft MEF (.NET) and JSR 294

Mark Derricutt mark at talios.com
Wed Feb 4 19:38:53 EST 2009

Hi all, since it seems this list isn't as read-only as I thought it was,
I'll repost this email I sent directly to Hal for discussion:

It's good to see that as part of the discussion here people are also looking
at what Microsoft's doing in the .NET landscape, which spawns my question
which I initially posted to the apache-felix list to little or no responce.
The other day I was listening to the latest Hanselminutes podcast [1] with
Glenn Block about the Managed Extensibility Framework (MEF) [2] and found
that it sounds fairly similar to OSGi and its service model: declarative
imports/exports combined with a managed dependency injection framework.

Since writing the initial email, and taking a closer look at MEF and in
particular some of the sample applications [3], it looks much more like a
standard DI/IoC container with imports/exports for types rather than
packages.  My understanding of the framework is when you run your
application, you define a directory containing all your Parts (MEF
terminology for a bundle/module) and any part found in that directory is
automatically pulled into the running application.

It would seem that MEF deals more with a modular run-time behaviour than a
compile time, so might not apply to "modules" directly, but maybe such a
declarative IoC container is needed by core java to provide an update to
java.util.ServiceLoader and/or the Service Provider section of the JAR spec

Has there been any thought to how JSR 294 modules might break, or affect
such non-package based resources in jar files (META-INF/services/*) etc.?



[1] http://www.hanselminutes.com/default.aspx?showID=166
[2] http://www.codeplex.com/MEF
[4] http://java.sun.com/j2se/1.3/docs/guide/jar/jar.html#Service%20Provider

...and then Buffy staked Edward.  The End.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/jsr294-modularity-observer/attachments/20090205/a3bdd1fa/attachment.html>

More information about the jsr294-modularity-observer mailing list