THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Wiki Markup |
---|
{include:apache-felix-ipojo-header} {html} <div class="content"> {html} h1. Why choose iPOJO? _The OSGi Service Platform provides an excellent foundation for building dynamically extensible Java-based applications. However, such power and flexibility does not come without cost. In addition to new APIs and packaging formats, OSGi developers must shift their thinking to be able to design highly dynamic applications. Early efforts, such as the Service Binder and Service Tracker, attempted to alleviate some of these issues, as well as more recent efforts, such as Declarative Services and Spring Dynamic Modules. iPOJO is another such effort in this area. It is a service-oriented component model created *specifically* for the OSGi Service Platform._ _The purpose behind iPOJO is two-fold. The first goal is to simplify OSGi development to the bare necessities. This means that providing services, using services, and dealing with dynamism should require as little effort as possible from the developer. The second goal is to push beyond support for basic OSGi mechanisms and try to more seamlessly incorporate advanced features, including component configuration, synchronization, and composition. This page summaries the key point of iPOJO._ h2. Simplicity Trying to create an OSGi-based application with services is challenging. The OSGi API is complex and a lot of knowledgeknowledges about internal mechanisms has to be known to avoid synchronization issues. iPOJO provides a very simple development model; let's look: {code:java|Providing a service} @Component @Provides public class MyServiceImplementation implements MyService { //.... } {code} \\ {code:java|Requiring a service} @Component public class MyServiceConsumer { @Requires private MyService myservice; // Just use your required service as any regular field } {code} Isn't that easy? Providing and requiring OSGi services have never been so simple. h2. Power Supporting OSGi services is not the only feature of iPOJO. iPOJO provides many other features that to simplify developing sophisticated applications. For example, iPOJO supports configuring components with Configuration Admin, sending/receiving events with the Event Admin, remote configuration with JMX, and more. h2. Flexibility Is iPOJO missing a feature you need? No problem. iPOJO provides an extensibility mechanism that allows you to mange other (custom) requirements. You can easily adapt iPOJO for your own needs. Creating an extension does not require modifications to the core, you only need to implement a custom _handler_ that will be plugged on your instance. Your handlers can also use any of the other iPOJO features. h2. Portability iPOJO works on any R4.1 OSGi implementation. It also works on many Java virtual machines such as Oracle JRockit, JamVM, Dalvik (Android), and Mika. iPOJO only requires a *J2ME Foundation 1.1* virtual machine. So, iPOJO can be embedded inside mobile phone applications or inside your washing machine. h2. Performance Being powerful is great, but what about footprint and performances? iPOJO is small and was designed to stay small. The core size of iPOJO is approximately *205k* (compared to 816k for Guice-Peaberry and 2112k for the minimal Spring-DM configuration). In addition to the core, you only deploy the features you require. For example, if you need proxy injection, just deploy the temporal dependency bundle (less than 70Kb). The run-time overhead of iPOJO is also small. On the [Peaberry benchmark|http://code.google.com/p/peaberry/wiki/Benchmarks], iPOJO has very good performance: {div:class=shell} Guice-Peaberry: 276.00 ns/call {color:#ff0000}iPOJO Service Dependency: 118.00 ns/call{color} Spring-DM: 2384.00 ns/call {color:#ff0000}iPOJO Temporal Dependency: 159.00 ns/call{color} {color:#ff0000}iPOJO Temporal Dependency w/ proxy: 173.00 ns/call{color} {div} For French readers, you can find additional benchmarks in chapter 10 of [iPOJO - A flexible service-oriented component model for dynamic systems|http://clement.plop-plop.net/thesis/These%20-%20FINAL.pdf] h2. Development support Developing OSGi applications can quickly become a nightmare, when things are working as expected. iPOJO helps you debug your application (and it often happen). For starters, you can debug iPOJO components as normal OSGi applications (stack traces and line number are not modified). But thanks to iPOJO's introspection mechanisms, you can also know the structure of your application (which instance uses which service...), so you easily understand why a service dependency is not fulfilled, the value of properties, etc. h2. Design support iPOJO also provides an architecture description language to design applications in a flexible and hierarchic manner. Designed applications are expressed in terms of services and are natively dynamic, meaning they support implementation evolution and substitution. Moreover, iPOJO supports service isolation to get your own private service. h2. Conclusion [Give it a try\!|iPOJO in 10 minutes]. For any questions or feedback, send an email on the [mailto:users@felix.apache.org] mailing list (send a mail to [mailto:users-subscribe@felix.apache.org] to subscribe). \\ \\ {include:apache-felix-ipojo-footer} |