Everyone who has ever coded more than a hello world statement in any language probably has a few go to functions or subroutines or methods that they use all the time and in almost every app they write. I have been lucky enough to stand on the shoulders of giant as well and not only do I use my own utility libraries, but I also have been able to borrow and steal libraries that have made my life easier and my apps better. However since I use these same libraries in almost every app it would be nice to not have to add the Library to every app. There are many ways in which this is accomplished. It appears in the Lotus Domino world this has always been accomplished by using design inheritance. I have to admit this concept through me when I first was learning the platform because it seemed weird to me to have multiple copies of the code even if they could be overwritten at a moments notice. With Xpages we have a powerful new feature that allows us to store code and components on a server in a way where it will be accessible by every Application on the server. This new mechanism is a buzz word that we hear all the time in the Xpages world, OSGi. OSGI is actually just a way of modularizing all the code on a server so that each piece can be used individually and can be updated without affecting other apps depending on the old versions of the code. There are many ways of modularizing code. Methods, Classes, Packages, Jars, and OSGi Bundles.
We will start by building an OSGi Bundle that is an Xpages extension library to extend our server to have more functionality in every app. Xpages uses these extension libraries to add on new code server wide instead of just in a single App. The most well known of these extension libraries is the Extension Library created by IBM and made opensource on Openntf.
On my next post we will start building this Bundle and plugin so we can put our custom code library on the Domino Server and make it available to every app.