Monday, March 28, 2016

Liferay 7 Features

Liferay 7 is exciting release from Liferay Inc. and it’s definitely a promising product, will have many new functional features and many architectural improvements.

Liferay is really putting lot of efforts towards to Liferay 7 development. Liferay 7 Expedition is program there we can see all new features and updates about Liferay 7.

Liferay completed alpha and beta releases and they already released the Liferay 7 RC version. Couple of months they are going to release Liferay 7 GA release and no doubt it’s really a promising product for developers and customers as well.


The following are the Liferay 7 features

OSGi Support
Bootstrap 3.0 Look and Feel
Java 8 Support
Alloy Editor
Elastic Search
Support Integration Testing through Arquillian
Application Display Templates Support for Login, Language and Breadcrumb portlets.
Improvements in Web content management
Singe Page Application Development
Document Management storages extracted as modules      
Service Builder code now uses Declarative Services instead of Spring for dependency injection

OSGi Support

Liferay 7 has supported OSGi modular based environment. Open Services Gateway initiative is standards for modular based application development.

OSGi will provide ability to create application in several components and all components together work as application and each component is independent and much decoupled from other components of course sometimes there is dependency among components.

OSGi provide container and it will responsible of components lifecycle so that we won’t need to concentrated on underlying things about component such as components lifecycle and its dependency related things.

OSGi will get rid of you from class loader issues and as for OSGi several components together became as bundle and each bundle have its own class loader. All bundles class loaders will be managed by OSGi container so that we cannot get any class loader issued and especially you can get rid of from ClassNotFoundException and NoClassDefFoundError

OSGi is dynamic modular development architecture so that we can deploy and un-deploy bundles without down the application. Another advantage is same time we can run different versions for same application such way OSGi container developed.

Traditional web application have Application server and we deploy application into application servers when we move application to another environment such as from UAT to production we need to take care many configurations and other related things.

OSGi have different way of implementation to provide web application runtime support so that each thing we can consider as service. To run web application in OSGi we need to integrate or deploy HTTP service so that we can run web applications.

Liferay 7 has implemented these OSGi support so that we can develop Liferay application as bundles or components. Running these bundles or deploy and un-deploy definitely going to be very easy when compared with before architecture.

We don’t worry about portlet, hook, Ext, theme and layout and everything going to be bundle. These bundles we can activate, run, and deactivate and we don’t need to down the application.

Liferay 7 has introduced new way of Liferay application development that is bundles. We cannot differentiate development for portlet, hook, Ext, theme and layout. We can forget about Liferay Plugins SDK environment and we can start developing Liferay Applications as OSGi bundles.

Liferay is developing application development environment and its tool called BLADE Tools which will provide way to develop Liferay Applications as OSGi bundles.
BLADE tools offer you MAVEN and GRADLE based build to create and deploy Liferay Applications as OSGi bundles.

BLADE Tools for Liferay


Liferay also started developing Liferay IDE and its used BLADE Tools to create and deploy bundles. Now it’s in progress and for now we can directly use BLADE Tools Command Line Interface to create Liferay Applications as OSGi bundles.


Liferay 7 supports to use Service builder tool in OSGi bundles, it’s also provide way to call Liferay API inside OSGi bundles and its provide support to use JSP in OSGi bundlels.
Liferay 7 have used features from Apache Felix and Eclipse Equinox OSGi implementation. It provide OSGi console (Apache GOGO) and Command Line Interface to deploy, activate and de-activate bundles in OSGi container.


Bootstrap 3.0 Look and Feel

Liferay 6.2 have used Bootstrap 2.x and Now Liferay 7 have used Bootstrap 3.0 so that look and feel for portal and its applications are really going to be good. All Liferay AUI components have used Bootstrap 2.x before and using Bootstrap 3.0 in Liferay 6.2 is really challenging and once we use bootstrap 3.0 UI developer need to put lot effort to adjust the things in theme level or AUI components level.

Now with bootstrap 3.0 all Liferay AUI components already used it and it won’t be problem to create themes with bootstrap 3.0.


Java 8 Support

Liferay 8 completely computable with Java 8. Oracle have stopped updates for Java 7 and Java 6. So now Liferay 7 completely considered only Java 8 and they implemented Liferay 7 to run on Java 8.

Java 8 have many features so it will be valued added to Liferay Application development like Lambdas and Functional Interfaces, Default and Static Methods in interfaces ,Stream API .Date Time API Improvements for Time Zones and Nashorn, JavaScript Engine are really pretty cool features in Java 8. We cannot see java.lang.OutOfMemoryError: PermGen space in Liferay 7 any more.


Alloy Editor

Alloy Editor is one of project from Liferay and it has provided better way of edit and create web content in Liferay. Liferay previous versions have used CKEditor and Now Liferay 7 have used Alloy Editor.

Alloy Editor Build on top CKEditor and its provided better and good look feel option to edit or create content. This editor we use extensively for WCM, Blogs, Wikis and Message boards in Liferay and also we can use it for custom portlets.

Nice feature is that it provides inline content edit so that edit control will available for each elements in content like text, images, headers and links. So that we can directly click on elements can see the edit control.


Elastic Search

Liferay before it’s used the Lucene search engine to search content in Liferay and Liferay 7 integrated Elastic Search as default search.


Support Integration Testing through Arquillian

One of the challenging thing Liferay is testing of application and there is no specific way to test and run test cases in Liferay. Generally we use Junit for unit testing.
Liferay have come up with better testing support to test and execute Liferay applications and Liferay 7 have given flexibility to use integration testing for portlets and OSGi plugins using Arquillian integration framework. This really cool for test Liferay applications such as OSGi bundles and portlet.


Application Display Templates Support for Login, Language and Breadcrumb portlets.

ADT is great way of customize the look and feel of existed portlets in Liferay through Free Marker Templates. In Liferay 6.2 have given ADT support for few portlets such as Asset Publisher, Blogs, Wikis, Navigation and Category Navigation  and it added few more portlet in the list such as Login, Language and Breadcrumb portlets.


Improvements in Web content management

Liferay 7 brings some of cool improvements in Web content management system such as Alloy UI editor to create and edit web content and ability to create mail templates for multiple languages and its changed CKFile browser to Liferay own file browser in side Alloy Editor.

Singe Page Application (SPA) Development

Now trends is Single Page Application using MVC based java script libraries with awesome look and feel with bootstrap. Liferay 7 have bring support for SPA application using SennaJs. Now all portlet become as Single Page Application so that user can navigate to anywhere without reloading entire portal page.


Document Management storages extracted as modules

Previous Liferay version have different ways of documents storage systems such as Jackrabbit (JCR) , DB Store and Advanced Filesystem when we want switch among these stores we need to do configuration in portal properties files and to effect the changes we need to stop server and start it.

Now Liferay 7 have introduced these features as OSGi modules so that we can dynamically active or deactivate bundles so that we can easily switch among these storage systems.
Liferay 7 have introduced following types of document storage as bundles such as Advanced Filesystem, CMIS, DB, Filesystem, JCR and S3.

Service Builder code now uses Declarative Services instead of Spring for dependency injection

Declarative Services is one of run time service provided by OSGi container to specify dependency services to other components and it make available these services to consumer bundle/component.

These dependency services declared as XML configuration so that when we deploy bundle into OSGi container then its resolves the all the dependency services otherwise bundle won’t be activate and its responsibility taken care by Service Component Runtime, we can use either Equinox Declarative Service or Apache Felix SCR to provide feature in OSGi container. Liferay 7 have used default OSGi Declarative Service model than Spring dependency. Generally Declarative Service model service will be available or activates when it started using otherwise it won’t be start but Spring Decency, the spring container will prepare the object based on XML configuration it will inject all objects and make it available complex Object in the spring container even we use it or not.

Due to Declarative Service we can resolve all dependency services resolution before bundle activated so that there is no run time exceptions or errors with respect dependency services.

Challenges

Liferay 7 is really good exciting but migration from older Liferay version to Liferay 7 is really challenging task because changes made at articular level.

One good thing is that Liferay 7 still used the traditional application server to run Liferay core portal than completely switching to OSGi HTTP based service. This really sign that we can migrate older versions to Liferay 7.

Due to Liferay 7 still used the Traditional application server so that we have more possibility to deploy all Liferay applications which are developed for previous versions will work and run in Liferay 7

Of course Liferay 7 already focused on conversion process from old Liferay plugins to OSGi based bundles.

Developer really need to habituate to OSGi based bundles development for Liferay 7 so its take some time for developer to understand development process. Because several years developers habituated to Liferay Plugins SDK and different types Liferay application like hooks, portlet, theme, layout and Ext and next we need to look at in the context that everything is OSGi bundle.

Sources:



Author

0 comments :

Post a Comment

Recent Posts

Recent Posts Widget

Popular Posts