What is the difference between OSGi and Eclipse?
OSGi is the foundation of the Eclipse platform. Eclipse is built on top of OSGi.
OSGi has the concept of "bundles" which are modular Java components. Eclipse takes that concept and extends it to what most developers know are "plugins". A plugin though is just a bundle with a plugin.xml file. The plugin.xml file tells Eclipse how to deal with that particular bundle and defines extensions and extension points, more concepts that build on OSGi, though OSGi is predominantly service oriented.
The high level stack for Eclipse is:
- Equinox (an implementation of OSGi)
- Eclipse (SWT, JFace, etc)
Solstice vs RCP
Eclipse is a great platform for building modular rich applications for the desktop and there is certainly progress towards being able to deliver these applications over the web (I'm talking specifically of RAP). My understanding though is that RAP isn't mature yet and personally I'm not keen on AJAX or in fact having any dependancy on browser technologies. I prefer cross-platform runtimes such as Java or Flash Player.
For me the advantage of using Flex (especially when used with Solstice) over Eclipse RCP are:
- Reduced footprint for installation of the software. Flash Player is small and the binaries for your application will be much smaller compared to Eclipse.
- Easier to deliver the software to the users. Flex applications are delievered via the web, whereas Eclipse requires some installation.
- Consistent platform for development.
- Flash Player is identical across all supported platforms and according to Adobe at least some version of Flash Player is now present on 98% of all computers with FlashPlayer 9 coming in around 90%-95%.
- SWT doesn't support all platforms in the same way.
- Eclipse UIs look native.
- Flex is easier to learn than RCP. I'm a software engineer / developer with more than 10 years experience (8 of that using Java) and found the learning curve for Eclipse to be very steep, but I persisted because Eclipse is "cool". Though I can create simple plugins quite quickly these days when I try and do something with Eclipse the complexity of the platform leaves me feeling unproductive. When I got my job with Arum I learnt Flex in a matter of weeks.
- Flex allows developers to be creative with the UI. This is a duel edged sword really. Eclipse has a constistent UI (subject to native look and feel), but I have seen some stuff done with Flex that I couldn't dream of doing in Eclipse. Either that or you have to install or develop entire new frameworks to achieve something relatively (e.g. GEF for graphical editing, but it can't even rotate a text label!). The other side of that sword is that the UIs I personally produce still look very developer oriented (like an Eclipse app) and you really need that creative flare to do the exciting things I seen done with Flex. My focus is on the Java/Server side of things anyway, so I'm not too worried about that aspect of things. My colleagues are much better at Flex UIs than I am.
Flex is great but I felt as though I was missing out on the modular power that OSGi and the Eclipse RCP gives developers, which was my starting point when putting together Solstice. Using the Equinox and BlazeDS I managed to put a Flex UI in front of an OSGi container in an afternoon and I just carried on from there.
Flex has the concept of modules, but mainly for the puropse of reducing perceived load times. It seemed obvious to me that the dynamic ability of the Flash platform could end up creating an alternative to RCP.
Solstice is a good step towards that. Developers can still use the OSGi and all those good things that go with it (component oriented, service oriented) without feeling as though the only option for a UI is the Eclipse RCP or HTML website exposed through the HttpService.