Appendix A. Example Application

This appendix describes an example application that serves as a reference application for most of the technologies that we have discussed in this book. All the code of the example application can be found in an online repository.


The example application is a web shop. It contains an end user frontend where a customer can browse, search, and order products. It also contains an administrative back-end where products and orders can be managed. The application is built on the stack described in this book. Although the application is relatively small, it is a realistic view of a modular, service-based, web application. If the application were larger, the architecture would be exactly the same; there would just be more bundles with more services.

Finding and Running the Source Code

Books are a bad way to list large amounts code. An IDE is much better at this, so we decided to put all the code in an online repository. You can simply check out the code and import it in an Bndtools workspace. The sources are in a Git repository, so make sure you have Git installed. From the command line, you can check out the code as follows:

git clone

Create a new Bndtools workspace and choose Import → Existing Projects and select all projects in the directory that you just cloned from Git.

You can run the code using the webshop.bndrun configuration in the “run” project. The example uses MongoDB, so you need to install and run ...

Get Building Modular Cloud Apps with OSGi now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.