background preloader

Osgi

Facebook Twitter

Maven

Can the Simple Module System save JSR294? Over the past month there has been a lot of debate on the current state of the Java Modularity working group (JSR 294).

Can the Simple Module System save JSR294?

Although the JSR tries to find common ground between different module systems (notably Sun's Project Jigsaw and OSGi), the current set of proposals are overly complex and introduce the world's first concept of a meta-module system. Much of the debate has centred on the difference between a language specification and its implementation. As it currently stands, the JSR 294 draft (which is disliked by most of the expert group) defines a meta-module system which delegates the concept of modules, versions, constraints and dependencies to a 'pluggable' external modularity provider. Unfortunately, this means that there can be no common ground for version numbers, dependencies, and ultimately leads to the fact that modules developed for one or other of the module systems will likely be incompatible for the other.

The key points of the proposal are: GWT + Server-side Eclipse = W-IDE. Someone once asked me why we break up things between ui plug-ins and core plug-ins.

GWT + Server-side Eclipse = W-IDE

My theory was that we could eventually swap out the ui with something else. I didn't really believe that at the time, and I'm not sure how well architected our CDT plug-ins are to allow that, but it sounded good. So as I begin my journey down the road of web-based IDE's it really struck me that this was the time to swap out the UI.

My theory goes like this. Google are the experts at creating web applications (and you may disagree with that, but stick with me). A big thanks goes out to Ian Bull who reminded me of the example project he created last year that shows how to use GWT with Equinox OSGi. As Ian says, "GWT + OSGi is a great platform! " OSGi. [edit] The OSGi Alliance, formerly known as the Open Services Gateway initiative, now an obsolete name, is an open standards organization founded in March 1999 that originally specified and continues to maintain the OSGi standard.

OSGi

Specification process[edit] The OSGi specification is developed by the members in an open process and made available to the public free of charge under the OSGi Specification License.[2] The OSGi Alliance has a compliance program that is open to members only. As of November 2010, there are seven certified OSGi framework implementations.[3] A separate page lists both certified and non-certified OSGi Specification Implementations, which include OSGi frameworks and other OSGi specifications.

Architecture[edit] OSGi Service Gateway Architecture Any framework that implements the OSGi standard provides an environment for the modularization of applications into smaller bundles. The framework is conceptually divided into the following areas: Bundles Services Services Registry. Creating a Domain Specific Language for OSGi. Probably the most interesting language currently is Scala, "a general purpose programming language designed to express common programming patterns in a concise, elegant, and type-safe way".

Creating a Domain Specific Language for OSGi

Scala combines the object-oriented and functional programming paradigms. Besides several very interesting programming constructs, Scala provides a 100% interoperability with Java. Scala code can instantiate Java classes, call methods, etc. Since Java code can also access classes written in Scala, application written in Scala can easily use framework-style libraries where the framework needs to use callbacks provided by the user.

In fact, the Scala compiler even generates Java byte code. Whereas Scala is probably the most interesting language, the OSGi Technology provides a good candidate for the best framework within the Java system ;-) So what would be more obvious than looking at a combination of them? However, we can do even better! Nothing special here. So how does this work?