Today you often face discussions whether to develop something for the desktop with a GUI, the web or the command line. It also happens quite often that you start in one area, and while the project evolves, the requirements are changed or extended. To minimize the discussions and to avoid re-implementing functionality, it is a good practice to separate the function from the user interface. Of course the "single-source" approach is nothing new, but probably for developers that started their career good to hear again. :)
In the OSGi and Eclipse world it is quite easy to achieve such a design. If the functionality is implemented in an OSGi service, it can be easily included in either an Eclipse based application like the Eclipse IDE. You can also simply create a new standalone application with a rich user interface, a command line application or even a REST based webservice for a cloud application, like for example embedding the functionality in a web-based IDE like VS Code or Eclipse Theia.
In this talk I will describe the possibilities with a simple example to explain the basic concepts. After this I will show some real world examples developed in APP4MC, covering Model Migration and Model Transformation. Both functionalities are available in the APP4MC Platform IDE, as standalone command line applications and as a REST-based service published on a cloud infrastructure.
On top of the "single-source" approach I will show how OSGi specifications can even help in creating a "single-distribution" architecture. By using the OSGi Remote Service Specification and the ECF JAX-RS Distribution Provider it is possible to publish services as OSGi services and REST services at the same time, making it possible to use those services in an Eclipse RCP application and in a web-based application at the same time, without the need to adjust the client code.
At the end of the session you should have a basic understanding of the "single-source" approach using OSGi Declarative Services and the JAX-RS Whiteboard. Also the the "single-distribution" approach using the OSGi Remote Service Specification and the JAX-RS Distribution Provider should be clear after the talk.