Portlet Framework: the Liferay way

100 %
0 %
Information about Portlet Framework: the Liferay way
Education

Published on February 28, 2014

Author: riround

Source: slideshare.net

Description

Liferay Service Builder, Portlet MVC

Portlet Framework: the Liferay way Liferay Service Builder, Portlet MVC Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Outline  Motivations  Model View Controller design pattern  Liferay Service Builder Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Portlet Framework  GenericPortlet class is not the only way of developing portlet.  Several framework are nowadays available to develop portlet:  Struts  JavaServer Faces  Spring Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Liferay MVCPortlet  Make use of a subset of the classical MVC Framework  Easier to use  Faster learning curve  Less configuration files to deal with and to synchronize with java sources  MVC: Model View Controller paradigm helps keeping the code tidy Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Model View Controller  Model: layer responsible to hold the data and the business logic to manipulate them. In case you use Liferay Service Builder to manage your Controller data, it works at the model layer level.  View: layer containing the rules to display data to the users (typically the JSP pages)  Controller: layer behaving as traffic director. Determine which action will be executed according users input. Model and View layer shouldn’t communicate each other but interact View controller Model with the Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Difference from the GenericPortlet  Unnecessary implementation of doView() and doEdit() and any others porlet API  Class is simpler, it contains just the action methods  In case you really want to use any portlet API they are available, MVCPorlet is a subclass of the GenericPortlet class Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Portlet accessing data  Several reasons to use a database behind a portlet  Java Programming offers different approach to deal with data  Object-relation mapping framework allow database access in a robust way. Java offers Persistence API (JPA) for database access  Liferay uses Hibernate to manage all its data Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Drawback in Hibernate direct usage  Development of independent portlets using Hibernate/JPA appears to work, but the runtime implications are not immediately recognizable: • Stale caches because of multiple writers. • Server resource consumption for multiple DB connections, memory usage for runtime copies of Hib/JPA objects. • Synchronization issues (two portlets given new Hib/JPA config but one forgotten). Source: Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

The Service Builder Solution Service Builder provides a single point to share code (DB access and business logic) to independent portlets, resolving the caching, resource, and synchronization issues. Source: Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Service Builder Architecture Overview Source: Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

References  Liferay in Action: http://www.manning.com/sezov/  Liferay Service Builder:  http://www.liferay.com/it/community/wiki//wiki/Main/Service+Builder  https://www.liferay.com/c/document_library/get_file?p_l_i d=8440633&fileEntryId=22887097 Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Questions ? Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

Add a comment

Related presentations

Related pages

Best Web Framework for Liferay Portlet Development

Best Web Framework for Liferay Portlet ... The framework liferay provides. (MVC Portlet, ... I would rate these frameworks in the following way:
Read more

Liferay Frameworks - Wiki | Liferay

Liferay's portlets make use of ... the framework includes a portlet that sits within ... In fact the Message Boards and the Wiki portlets have been ...
Read more

Developing Portlets in Liferay IDE - Wiki | Liferay

=== Portlet Development Demo Video. === Click the link below to see a video of portlet development demo. [[http://www.liferay.com/documents/4615837 ...
Read more

Liferay Portal 4 - Portlet development guide

The file liferay-portlet.xml may be placed in ... the framework for our portlet, ... the message board portlet. This way, ...
Read more

Portlet Development - Liferay 6.1 - Liferay Developer Network

You’re free to use any framework you prefer to develop your portlets, ... The first way is through ... of ground learning Liferay Portlet development.
Read more

liferay - Proper way to set model errors in Spring Portlet ...

Surely there has to be a better way to handle errors in Spring Portlet ... Liferay tags. The only other way ... portlet mvc framework is included in ...
Read more

Using Spring Data JPA with a Liferay portlet

Using Spring Data JPA with a Liferay portlet Service Builder is the way how developers are often ... In this example we'll use Vaadin as a UI framework, ...
Read more

Setting up Display Pages - Liferay 6.1 - Liferay Developer ...

Setting up Display Pages . ... and these work the same way they do in the Web Content Display portlet. ... to the asset framework introduced by Liferay 6.1.
Read more

How to develop portlets with Spring MVC Portlet in Liferay ...

How to develop portlets with Spring MVC Portlet in Liferay. ... we can leverage Spring MVC framework in the same way that we would do in any other web ...
Read more