No matter how

As long as consistent

Javarel Framework – Web MVC on top of OSGi


I’d like to share with you results of my years of expertise in OSGi world. Few years ago I decided to learn how to build web application from the scratch using most low-level OSGi components.

The road to achieve a working web application using integrated libraries that I like mostly was very exhausting. Incompatibilities related with isolated classpaths, bundle start levels, encapsulation of packages being exported and many other problems are definitely a challenge for even experienced programmers to learn approach for modular Java which is OSGi.

Now I can tell that I can build platform like Adobe Experience Manager from the scratch, especially when I mean about the scale of modularity. I demystified most of its bundles and took the best and composed new solution – framework which is also built basing on OSGi, but concentrates around MVC pattern which most developers like or even know.

Javarel Framework

Project assumptions:

  • beautiful code (like in Laravel which inspires me a lot, thx Taylor!)
  • modern technologies
  • hot deployment
  • runtime configuration
  • none of XML
  • full REST
  • data layer abstraction
  • multiple SQL and NO-SQL storages
  • multiple template engines

I think it is quite stable right now.  Use it as a playground or try to be inspired how could you also integrate in your projects libraries that Javarel has included.

Also now I can tell that Kotlin language is definitely great – whole Javarel is written in this language.  I learned it very quickly (as a Groovy, maybe 1-2 d), but the flexibility which it gives and more error less code  (with controlled null pointers) … I loved it <3 Now sometimes I am even forgetting about Java syntax, because of Kotlin. Writing plain Java for me currently looks like writing mostly boilerplate code. Kotlin just reduces many LOC. To sum up – do same, but quicker – do Kotlin!

OSGi has its difficulties, but extending existing applications on the runtime just gives so power and scalability for long-term projects…  There is no so many developers that took deep drive in OSGi as I did. If you haven’t so much time, just don’t try to follow that road and use Spring , Grails etc and build monoliths. You will be much happier, trust me.  As a opposite I am a masochist and I have fancy modular Java with modern technologies in a form of Javarel, but the integration cost was quite big.

PS. Now I am planning to create even more lightweight framework for web development based on OSGi, but based on Vert.x and definitely more encapsulated with less bundle count to limit OSGi difficulties. Keep in touch!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.