The difference between the Netbeans platform and OSGI

can anyone give me the main difference between Netbeans Plateform and OSGI? Becoz I will make software in the Java Swing database.

+4
source share
1 answer

Key ideas of the NetBeans Modular System:

  • NetBeans allows you to (partially) insert or remove module packages at run time.
  • It automatically manages dependencies and takes care to avoid circular dependencies.
  • The current version, apparently, allows loading modules only on demand.
  • NetBeans allows metadata for modules, such as version number, description ...
  • A module can be almost anything, including resources such as images, etc.
  • NetBeans allows you to distinguish between service APIs and service implementations (which can be in different modules).

OSGi Features List:

  • OSGi allows you to bind (what they call modules in OSGi ... only JAR files with special information in the manifest) that will be installed, removed, stopped, started or replaced at runtime.
  • Dependencies are automatically processed at the package level. A package may declare that it is exporting one or more packages (all others will be closed for this package by default), and another package may declare that it will import these packages. If more than one version of a given package is available, the package may declare which version it is using.
  • OSGi uses the META-INF / MANIFEST.MF file found in each JAR file for its metadata. This metadata may include, but is not limited to, version numbers, descriptions, imported / exported packages, etc.
  • Modules in OSGi are JAR files. An image (for example) cannot be a module. But a package may contain an image available for other packages.
  • Just like NetBeans, application interfaces and implementations are different concepts and can be in different packages.

So, comparing the above features for both, I can say that the OSGi and NetBeans modules have much in common. I hope for this help.

+4
source

Source: https://habr.com/ru/post/1399723/


All Articles