osgi modularity with liferay exhibits better programming scopes for developers

5
OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers There have been various developments in the field of Java since its evolution. It has provided a robust programming platform for the developers. Additionally, Java has also served as a true source to various other programing interfaces. Liferay has been the one which has enabled multiple organizations to work on same platform. Having not so much time of its release, Liferay has been well accredited by the users. Apparently, known to all the developers, Liferay has also been created into various versions so far. The beta version of Liferay 7 has been released recently for the developers. This newer version allows the old plugins to run swiftly. However, at some places the APIs have been modified, which would have to be adapted for the new version. Apart from all these, Liferay has come with various changes; the one noticeable among which is working with OSGI. What Is OSGI? Open Source Gateway Initiated or OSGI as it is mostly abbreviated, is a framework. This is used to develop modular Java applications. The components also referred to as the bundles could be easily installed, uninstalled, started or stopped and that too remotely. The current version of Liferay i.e. Liferay 6.2 , includes OSGI runtime which could run OSGI bundles encapsulated with Liferay plugins. OSGI is basically an open standards organization which has been maintaining its OSGI standard since March 1999. It comes up as a modular system and a service platform for Java programming language. The service registry of OSGI

Upload: azilen-technologies-pvt-ltd

Post on 06-Jan-2017

117 views

Category:

Software


6 download

TRANSCRIPT

Page 1: OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers

OSGI Modularity With Liferay Exhibits BetterProgramming Scopes For Developers

There have been various developments in the field of Java since its evolution. Ithas provided a robust programming platform for the developers. Additionally,Java has also served as a true source to various other programing interfaces.Liferay has been the one which has enabled multiple organizations to work onsame platform. Having not so much time of its release, Liferay has been wellaccredited by the users.

Apparently, known to all the developers, Liferay has also been created intovarious versions so far. The beta version of Liferay 7 has been released recentlyfor the developers. This newer version allows the old plugins to run swiftly.However, at some places the APIs have been modified, which would have to beadapted for the new version. Apart from all these, Liferay has come withvarious changes; the one noticeable among which is working with OSGI.

What Is OSGI? Open Source Gateway Initiated or OSGI as it is mostlyabbreviated, is a framework. This is used to develop modular Java applications.The components also referred to as the bundles could be easily installed,uninstalled, started or stopped and that too remotely. The current version of

Liferay i.e. Liferay 6.2, includes OSGI runtime which could run OSGI bundlesencapsulated with Liferay plugins.

OSGI is basically an open standards organization which has been maintaining

its OSGI standard since March 1999. It comes up as a modular system and aservice platform for Java programming language. The service registry of OSGI

Page 2: OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers

also helps the bundles to determine the inclusion or exclusion of the service. Ithas various illustrious members like that of IBM, Oracle, Red Hat, Adobe,Siemens, TIBCO, France Telecom, Deutsche Telekom, Technicolor and manymore.

Liferay OSGI Plugins- Generally distributed as JAR fi les, OSGI web bundlesare similar to standard web application archives in terms of their architecture.OSGI specification doesn’t need any fi le extension for web application bundles.Further, in order to create an OSGI plugin for Liferay, the user will need a Liferay

Plugin SDK. The plugins could also be downloaded from the link.

After the Plugins SDK are extracted and navigated to the shared folder, the usermust create a folder for OSGI plugin project in the shared folder. A projectmade in such a format must end with “–shared”.

OSGI Areas of Specification- The OSGI framework, apart from themodularity also consists of services, lifecycle & dynamicity and security. Otherthan that, the services and components on top of framework for the enterprisealso offer addressing enterprise use cases like

Service Distribution

Component models and IoC

Configuration management

JavaEE integration

Cloud computing

Page 3: OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers

And so on. The other illustrious OSGI implementations are open source whichinclude eclipse equinox, Apache Felix, JBoss AS 7, Knopfl erfish along withOracle GlassFish, Eclipse ECF to name some of them.

Advantages of OSGI Modularity-

Implementation of OSGI modularity brings in various sorts of advantages.

Some of these include-

Improvement in maintainability

• As it tends to improve cohesion and reduces coupling and also makesthe module boundaries and functionalities clear.

Non Monolithic

• It allows for fine-grained updates of the system

Concurrent versions

• Same modules with multiple versions could co-exist

• It also allows for gradual updates.

Benefits of OSGI for Developers-

OSGI has come up with better scopes and opportunities for the developers.Take a look at its benefits that developers will have while using this platform-

It has been known to reduce the complexity.

It offers modular architecture for large scale distributed system as wellas for small embedded applications.

Significant building of systems from in-house and off-shelf modules.

Reduces maintenance and development expenses.

Realizes the promise of component based systems.

Benefits of OSGI for Businesses-

Apart from providing programming convenience to the developers, OSGI alsobenefits to the businesses. It helps to reduce the operational costs byintegrating multiple devices through a single network. This allows it to dealeffectively with the costly application development along with remote servicemanagement.

Page 4: OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers

Some of its other benefits for the businesses include-

Package level versioning policy against bundle level versioning.

Independent starting, stopping and dynamic updating of the modules.

Single functionality implementations by acute modules that makes it easyfor managing, bug fixing and testing of the applications.

The user has the authentication to access the internal details of theinstalled modules.

Bringing Modularity Into Practice-

While implementing OSGI into regular coding, you need to use classes normallyfrom the point of Java. Consider the following code snippet-

Further when it comes to the OSGI Module Metadata in Manifest.MF then the utilization ofpackages would be like:

From the services, modularity and results, it could be certainly mentioned that

implementation of OSGI with liferay portal development has truly brought a favorablechange to the programming techniques and resultant outputs not only for the developersbut also for the campaigns.

Page 5: OSGI Modularity With Liferay Exhibits Better Programming Scopes For Developers