Preface

The OSGi specification is a module system and service platform that implements a complete and dynamic component model. Wasn't that a complicated definition! So how would you really use it to practical modular applications? Let this book break down the seemingly overwhelming OSGi standards for you by explaining Apache Felix's powerful architecture in a simple and easy-to-understand manner using Apache Felix framework to get you up and running sooner than you expect.

The OSGi standards have found a wide range of applications in the context of the Enterprise, Telecommunications, Telematics, Smart Home, E-Health, and Mobile, to name just a few. Apache Felix is one of the most famous implementations of the OSGi framework specification. This book introduces OSGi on the simple and extensible Felix framework and guides the reader from the development environment setup to the troubleshooting of potential issues, walking them through the development of an OSGi-based application and explaining relevant software design concepts.

This book starts with an introduction to the OSGi Service Platform, its parts and its bundle structure. It then walks the reader through the Felix framework's setup and their development environment. It describes the Felix Framework and how to operate it using Gogo. This book will teach you everything possible about the practical implementation of OSGi using the Felix Framework as a launch pad.

The book then kicks off the Bookshelf project, a case study that will be used to progressively explain the important concepts around OSGi using the Felix framework. The Bookshelf project feature trail will set the context to explain OSGi headers, the bundle activator, the bundle context and so on.

As the reader implements the bookshelf step by step, they learn about OBR repositories, dependency management, and bundle version management with Felix.

Moving ahead, a few more advanced topics are covered, such as using iPOJO for dependency injection and service registration; then carries onto the implementation of a web-based graphical interface, first using a simple Servlet, and then building a JSP-based Web Application Bundle.

OSGi service specifications such as the Log Service, Http Service, and Web Container are explained. Finally, the book describes some of the common pitfalls during bundle development and hints on troubleshooting them in Felix.

What this book covers

Chapter 1, Quick intro to OSGi and Felix gives an overview of OSGi and introduces Felix

Chapter 2, Setting up the Environment walks the reader through the pre-requisites needed for developing as they read.

Chapter 3, Felix Gogo covers the Felix Gogo command-line shell and syntax.

Chapter 4, Let's Get Started: The Bookshelf Project sets the scope of work for the case study and describes the chapter-by-chapter learning process to achieve it.

Chapter 5, The Book Inventory Bundle starts the case study inventory layer implementation and covers the basics of integrating with an OSGi framework.

Chapter 6, Using the OSGi Bundle Repository covers OBRs and shows how to use them to install the bundles developed in Chapter 5.

Chapter 7, The Bookshelf: First Stab continues the case study by laying the business logic middle tier on top of the inventory layer showing how to get access to and interact with services from other bundles on the framework.

Chapter 8, Adding a Command-Line Interface adds a first presentation layer to the case study showing how to extend the Gogo shell with custom commands.

Chapter 9 , Improving the Bookshelf Service with iPOJO covers Felix iPOJO and shows how to use it for registering and injecting services. It also explains some of the major design patterns used in this context.

Chapter 10 , Improving the Logging explains the importance of logging in an application, and shows how to send logs to an OSGi Log Service implementation.

Chapter 11 , How about a Graphical Interface? continues the case study by implementing a simple servlet-based presentation in an OSGi framework, using the Http Service.

Chapter 12 , The Web Management Console provides an overview of the Felix Web Management Console and takes the reader through the steps to install it.

Chapter 13 , Improving the Graphics completes the case study by implementing a JSP Web Application Bundle and explaining Web Containers in the context of OSGi.

Chapter 14 , Pitfalls and Troubleshooting includes a few tips on common issues faced when writing a bundle and describes a few means to troubleshoot them.

Appendix A, Eclipse, Maven, and Felix is an introduction to some of the productivity tools available for a Java developer in general and to an OSGi developer in specific. It covers the combined use of Eclipse as an Integrated Development Environment (IDE) along with plugins useful in the context of the development of OSGi bundles and Maven 2 as a build and dependency management system.

Appendix B, Where to Go from Here? provides a few leads on topics that can be investigated after having mastered the book contents, as well as a few reference sites to get more information.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.136.84