SlideShare a Scribd company logo
Frankenstein's IDE Anton Epple Eppleton IT Consulting http://www.eppleton.de Frankenstein's IDE: Running NetBeans on OSGi and vice versa
Agenda Module Systems
Service Infrastructure
Project netigso: bringing it all together
Demos
Modularity Recap: Why a module system? Standard Java doesn't support: Versioning
Plugins & Updates
Dynamic Service Infrastructure
Dependency management
Controlled API export (information hiding) Module Systems like OSGi & NetBeans Module System add this
Modularity NetBeans Module System? Started in 1996: Foundation of the IDE ( first NetBeans release 1999 )
Usable as independent platform for many years
Used on client & server
Many commercial and institutional users ( Nokia, Boeing, UNESCO, EADS, US Army ... )
Duke's Choice Award 2009
Duke's Choice Award 2009 What's the difference between OSGi and NB Platform?
Module System How does the OSGi module system work? Runtime Container manages Life cycle and dependencies of modules
Basic Services provide reusable functionality
API/SPI Modules provide Extension Points and Utility Classes
User Modules provide application functionality
Module System How does the NetBeans module system work? Runtime Container manages Life cycle and dependencies of modules
Basic Services provide reusable functionality
API/SPI Modules provide Extension Points and Utility Classes
User Modules provide application functionality
Module System How does the OSGi module system work? Runtime starts up reads meta information and sets up dependencies
Starts the Modules
ClassLoader:  Every Module has it's own classloader. It can only load classes from other Modules if it has declared a dependency. Loading is then delegated to the other modules ClassLoader
Module System How does the NetBeans module system work? Runtime starts up reads meta information and sets up dependencies
Starts the Modules
ClassLoader:  Every Module has it's own classloader. It can only load classes from other Modules if it has declared a dependency. Loading is then delegated to the other modules ClassLoader
Tip : Cross-check mailing list for third-party lib problems
Module System How is a OSGi bundle constructed? Module is a JAR Archive containing: META-INF/MANIFEST.MF  Id
Version
Public API
Dependencies Service registration
Module System How is a NetBeans module constructed? Module is a JAR Archive containing: META-INF/MANIFEST.MF  Id
Version
Public API
Dependencies Service registration
Module System Meta-Data: NetBeans OSGi Identifier OpenIDE-Module: X Bundle-SymbolicName: X Version number OpenIDE-Module-Specification-Version: 7.3 Bundle-Version: 7.3 Activator OpenIDE-Module-Install: x.y.z.Activator Bundle-Activator: x.y.z.Activator Exported Packages OpenIDE-Module-Public-Packages: x.y.z Export-Package: x.y.z Imported Dependencies OpenIDE-Module-Module-Dependencies: another.module > 2.1 Require-Bundle: another.module;bundle-version="(2.1 )"
Module System Conclusion: Great minds think alike …  but not always

More Related Content

Frankenstein's IDE: NetBeans and OSGi