Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Have you used OSGi?


Yes. I just don't know why Jigsaw is far better, other then it being part of the language of course.

Perhaps ignorance on my part.


It isn't really but aimed at a different use case.

Everyone rallied against OSGi because the strict modularity showed developers that in general their application wasn't as modular as they thought it was; and the fact that class loaders enforced that permissioning model showed where random Class.forName and module busting code lived.

Guess what? Those developers will have exactly the same problems with Jigsaw modules.

What Jigsaw will do is educate Java developers that the pain points are in strict modularity rather than any one module system.


> Guess what? Those developers will have exactly the same problems with Jigsaw modules.

And many more. Jigsaw also locks down reflection. In addition Jigsaw lacks many work arounds that OSGi has to get software working (fragments, buddy classloading, dynamic imports, optional dependencies, capabilities, …).

Honestly I have a hard time seeing any existing large code base work on Jigsaw.


Not any more. Requiring code modifications to use cross-module reflection was too painful and was dropped in the most recent Jigsaw iteration. You can reflect across module boundaries without problems now.


Even for non-exported types?


One thing I remember is the idea that Jigsaw is specifically for modularizing the JVM and JDK itself while OSGI would be for modularizing applications built on the JVM. Here is an article about this but it I would admit it is OSGI biased: http://njbartlett.name/2015/12/03/jigsaw-is-a-shibboleth.htm...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: