Wednesday, November 5, 2014

Liferay Theoretical Architecture /Liferay Layered Architecture

Liferay is open source portal and it provides robust application features and capabilities which full fill real world end user needs.

Liferay support many functions such as Portal Management, Content Management, Work flow Management, Document Management, User Management and Security Management.

All these services liferay already implemented as it core features so that as developer we need not worry about underlaying services only we need to think about end user needs when we develop application.

Layer is also comprised of the inter related service components and features Personalization,Collaboration, Social Networking, Delivery Channels, Virtualization Tunnelling Servlets and these services we can inherited from liferay core features.

Liferay follows a Model Driven Architecture approach

Liferay follows a Model Driven Architecture

Model-driven architecture (MDA) is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model-driven architecture is a kind of domain engineering, and supports model-driven engineering of software systems. It was launched by the Object Management Group (OMG) in 2001.

Liferay follows below software engineering models

Platform Independent Model (PIM) :

A Platform-Independent Model (PIM) in software engineering is a model of a software system or business system, that is independent of the specific technological platform used to implement it.

Platform Specific Model (PSM):

A platform-specific model is a model of a software or business system that is linked to a specific technological platform (e.g. a specific programming language, operating system, document file format or database). Platform-specific models are indispensable for the actual implementation of a system.

Domain Specific Model (DSM)

Domain-specific modeling is a software engineering methodology for designing and developing systems, such as computer software. It involves systematic use of a domain-specific language to represent the various facets of a system.

Platform Specific Model (PSM) which constitutes following technologies

EJB’s, Spring Framework, Hibernate Layer, Web Services.

Service Builder Made up with implementation of Platform Specific Model (PSM) technologies such as EJB’s, Spring Framework, Hibernate Layer, Web Services.

The services builder is the Model Driven Transformation (MDT) Tool which will construct and deploy services those are required by liferay portal and portlets.

Liferay already a developed application so if any one wants to extend or add new features then liferay have given following extension frameworks these will be as part of Plugins SDK.

Extension Environment

Plugins Framework


Before 6.1 version we have separate Extension Environment later version it was added into Plugins Framework.

Extension Environment:

Extension environment is for override existing portal source.Extension environment consist same directory structure i.e. portal follows.

Extension environment override portal source files by placing in appropriate path where it actually in liferay source portal.

Extension environment have different files to override existing portal and other languages propertied files.

Plugins Framework:

Plugin framework is for customize or extend portal and its hot deployable plugins means no need stop sever when we deploy and changes will be applied after successful deployment.

Pluigns frame work consist of following types for different contextual use with respect to liferay such as Portlet,Hook,Theme,Layout and web

Hooks are used to override some source of liferay portal such as portal jsps, portal properties language properties, events and struts actions

We have following types of Hooks

JSP hooks(JSP hook used to modify the existed Liferay JSP Pages)

properties hook(these are used to modify some of portal properties and language properties file in liferay source) 
Event hooks(liferay have events action classes we can modify using event hook like post login, pre login events are examples)

Model hooks(Model hooks deal with entity actions in services)

Struts Action Hooks(from liferay 6.1 we have these feature)

Plugins frame work provide following Interfaces in development

Command Line:

Ant Targets so that we can run from command prompt.


Eclispe plugin consist GUI based interface to create pluings such as portlet,hook,layout,theme and web

Liferay supports Windows, Mac and Linux OS Operating Systems and Liferay need JVM and its operating system dependent

Liferay Portal Support many Server Environments such as Apache Tomcat, Glassfish, Geronimo, Jetty, JOnAS, JBoss, and Resin and this one of huge advantage so that we can deploy into any of the sported servers.

Each application server provide many services which will be used by application those are deployed in the server.

JNDI (Java Naming and Directory Interface)
JDBC (Java database connectivity)
JTS (Java transaction service)
JMS (Java Message Service)
JAAS (Java Authentication and Authorization Service)
JDO (Java Data Objects)
JWS (java Web Services)

Liferay Architecture Diagram


Each layer is differentiated by different color and each layer consist one more components.

Layer: 1

Any Software that required Operating System to its base layer for any software. In the diagram is bottom layer represent Operating System.
We already know liferay support Windows,Mac and Linux.

Layer: 2

As we know any software required native run time environment and liferay is java portal so we need Java Virtual Mechine (JVM). If we install Java then we will be ready with JVM.Each OS have its platform depended JVM

Layer: 3

Liferay is java web portal and to run any web application we need application server and application server will be running with help of JVM.
Liferay support many application servers such as Apache Tomcat, Glassfish, Geronimo, Jetty, JOnAS, JBoss, and Resin.

Each application servers by default provide many services which will be used by deployed applications.Liferay Portal Application also used different application server services such as JNDI, JDBC, JTS, JMS, JAAS, JDO, JWS, JSP/Servlets, and JavaMail
This layer we can say Application Server and Its services

liferay also use external services and These services can be deployed into application services and these services can be used by liferay such as SOLR Search engine DROOLS Rule Engine and Tunneling Servlets.When we required then we can deploy these services so that liferay can use.
Search engines(SOLR/Lucene) provide capabilities like clustering, faceted search and filtering.

Layer: 4

This layer is actual liferay core implementation and its technologies.its provide robust capabilities to run and integrate other applications into liferay.

Language adopter provide mechanism to develop and run other language portlet such as PHP, Ruby, Python and Groovy.

Portlet Bridge / JSR 168/286

Liferay implemented Portlet Bridge for deploy JSR 168/286 portlets and supports RIA applications

We can also use Web framework related Portlet Bridges to convert Web work flow into Portlet Work flow

Struts Portlet Bridges:

To run Struts framework based portlet applications.

Spring Portlet Bridge(Spring Portlet MVC):

To run spring frame work based portlets.

JSF Portet Bridge:

For JSF based portlets

JCR ( Java Content Repository):

Liferay use the JCR ( Java Content Repository) based implementation to maintain WCM such as Documents and Files.Liferay used Jackrabbit JCR implementation by default.Liferay also provide easy integration with other JCR implementation such as Alfresco.

BPM(Business Process Management):

Its provide work flow management services in liferay portal. Liferay used Kalio work flow and JBPM(jBoss Business Process Management) these are reference implementation for BPM.

Lucene Engine:

Lucene Engine is inbuilt search engine in Liferay and its also support configurable SOLR search Engine and SOLR Search Engine also implemented based in Lucene.

Liferay use different technologies to provide database relates services and other application services i.e. Spring,Hibernate and EJP are portal service implementation technologies.

Layer: 5

This layer provide defined mechanism such that we can customize or extend liferay features and provide rapid services implementation tools such as service builder.

Liferay Service Builder Tool

Liferay Service Builder Tool provide construct and deploy services and these tool use Spring and Hibernate to implement services.

Portlet plug-in :

The portlet plug-in leverages on the portlet bridge to provide dynamically generated portlets to the end users and enhanced RIA integration.

Hooks plug-in:

The hooks plug-in provide convenient access to intercept and alter the services and functionality of the Liferay instance in a standardized approach

Portal Service/Custom Services:

Portal Service/Custom Services are like core liferay services such as Group,Organization,Site,User and Roles services we can also customize services.

OOTB(Out of Box)/Custom portlets:

Liferay also capable of develop and run OOTB portlets. Liferay provide custom portlet development through plugins SDK and OOTB portlet we can use any other webapplication frameworks such as spring,struts,JSF and vaadin.

Layer 6:

Layer:6 is real world application layer that user can experiences. Liferay used all above services and capabilities and it provide robust core features such as Portal Management, Web Content Management, Enterprise Content Management, Document Management, User Management, Work flow Management, Security Management.

We will use Layer:6 liferay core capabilities and we will turn it into Personalization, Collaboration, Virtualization, Social Networking and integrates Dynamic Delivery Channels, and Tunneling Services

Reference Source Article


Post a Comment

Recent Posts

Recent Posts Widget

Popular Posts