map.apps OSGi Runtime
The OSGi Alliance (Open Services Gateway initiative) provides hardware-independent specifications for component- and service-based software platforms. Originally, these specifications were designed to run in Java Virtual Machines. map.apps uses this specification and implements core parts of it using JavaScript to provide a modular and service-based framework to develop dynamic web map applications.
“Services” in the sense of OSGi does not mean “web services”. Instead it means that an object with a set of properties is registered in an OSGi Runtime. The term for “Module” in OSGi is "Bundle". Both are synonyms for the same concept.
OSGi was adopted for JavaScript because of the following facts:
-
It provides a clean and modular programing model.
-
There is high potential for reuse of created modules.
-
Independent versioning of modules is possible.
-
It defines a dynamic service layer over which the modules communicate.
-
It is designed for runtime changes:
-
Installation, updates, removal of modules during runtime
-
Registration/unregistration of services during runtime
-
The JavaScript OSGi Runtime currently adopts the following OSGi Specifications:
-
OSGi Core Specifications
-
Module Layer (partial)
-
Module Life Cycle Layer
-
Service Layer
-
Start Level Service Specification
-
-
OSGi Compendium Specifications
-
Declarative Services Specification
-
Event Admin Service Specification
-
Log Service Specification
-
User Admin Service Specification
-
Configuration Admin Service Specification
-
Metatype Service Specification (only prepared)
-
In the following chapters, some core principles of OSGi and its adoption in JavaScript are explained. For in-depth understanding of the next sections, it is recommended to read the OSGi specifications or one of the OSGi books.