Chapter 3. Getting Started

Learning a new framework is not always straight forward. In this section, we (the Spring DM team) tried to provide, what we think is, an easy to follow guide for starting with Spring Dynamic Modules. Of course, feel free to create your own learning 'path' as you see fit and, if possible, please report back any improvements to the documentation that can help others.

3.1. First Steps

As explained in Chapter 1, Why Spring Dynamic Modules?, Spring DM provides integration between Spring framework and OSGi. Thus, it is important to become acquainted with both of these frameworks (libraries or environments depending on how you want to name them). Throughout the Spring DM documentation, each section provides links to resources relevant however, it is best to become familiar with these topics beforehand.

3.1.1. Knowing Spring

Spring DM uses heavily Spring framework's core functionalty, such as the IoC container, resource abstract or AOP infrastructure. While it is not important to know the Spring APIs, understanding the concepts behind them is. At a minimum, the idea behind IoC should be familiar. These being said, the more knowledge one has about the Spring, the faster she will pick Spring Dynamic Modules. Besides the very comprehensive (and sometimes disarming) documentation that explains in detail the Spring Framework, there are a lot of articles, blog entries and books on the matter - take a look at the Spring framework home page for more information. In general, this should be the starting point for OSGi (or Eclipse plugin) developers wanting to try Spring DM.

3.1.2. Knowing OSGi

Java developers, new to OSGi, can start by reading the OSGi Alliance introduction, the OSGi specifications or one of the articles/blogs available on the internet (such as the SpringSource blogs). Additionally, the Spring DM home page hosts various links to useful materials.

3.1.3. Trying Out The Samples

Once one is familiar with the concepts behind Spring and OSGi, she can start reading the Spring DM reference documentation (this document) and take the Spring DM samples for a spin. The samples are available either in the .zip distribution or from the Spring DM repository. The samples are a convenient way to get started quickly with Spring DM as they show various features of Spring DM and help one get pass the initial struggles with OSGi. However, they are not meant as the definitive guide in using OSGi rather, they aim to be a launching pad for "newbies" trying out OSGi in Spring.

The current distribution contains:

  • Simple Service Sample

    A simple example that illustrates OSGi service publication and consumption through Spring DM. This is a good starting point for users learning the basics.

  • Weather Sample

    A demo that shows more advanced features of Spring DM and OSGi. The application creates a very simple weather information services presenting some best practices in designing an application to take advantage of the modularity offered by OSGi.

  • Simple Web App Sample

    As the name implies, this is a simple web application, containing Servlets, JSPs and JSP tags, that runs inside OSGi through Spring DM.

  • Web Console Sample

    A more complicated sample that demos a Spring MVC annotation based, web application that runs inside OSGi through Spring DM, featuring class path scanning and various Spring taglib. Additionally, the web application interacts with the OSGi environment through the web UI.

Each project contains instructions regarding its content and startup procedure. Users are encouraged to experiment with the samples to get a better understanding of the technologies used.

3.2. Need Help?

If you encounter issues or you are just looking for an advice, feel free to use one of the links below:

3.2.1. Community Support

The Spring DM forum is a message board for all Spring DM users to share information and help each other. Note that registration is needed only for posting.

3.2.2. Professional Support

Professional, from-the-source support, with guaranteed response time, is available from SpringSource, the company behind Spring Dynamic Modules and Spring.

3.3. Following Development

For information on the Spring DM source code repository, nightly builds and snapshot artifacts please see the Spring DM home page.

You can help make Spring DM best serve the needs of the Spring community by interacting with developers through the Spring Community forums.

If you encounter a bug or want to suggest an improvement, please create a ticket on the Spring DM issue tracker.

To stay up to date with the latest news and announcements in the Spring eco system, subscribe to the Spring Community Portal.