Liferay DevOps

DevOps became necessary tool/approach in developer and sysadmin life. Most of companies introduced or will introduce own mechanisms to automate internal software processes. There are many programs that simplify and automate software development, delivery and integration. Combination of DevOps tools (for example Docker, Git, Jenkins, Bamboo, Bash scripts, Nagios etc.) can minimize human effort.

Continue Reading

Docker with Liferay DXP

What is docker?

Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment.

There are so many advantages using Docker, one for example is that the new members in a development team can easily build a local environment without spend a lot of time. With this in mind, this article shows how to build a MySQL and Liferay DXP development environment with Docker.

Continue Reading

Developing plugins for Liferay DXP with Maven

A new major version of Liferay has been release past May with a lot of new features. One of the most important is related to plug-ins architecture. Basically Liferay is a web application running in a Java EE application container where plug-ins were built as separate web applications. But DXP introduces a module framework based on the OSGi architecture.

But… What it is OSGi? As defined by OSGi Alliance (the organization in charge of this specification): The OSGi technology is a set of specifications that define a dynamic component system for Java. These specifications enable a development model where applications are (dynamically) composed of many different (reusable) components. As the aim of this article is not the OSGi architecture but how it is implemented within Liferay, we are not going to deepen in OSGi specification.  In fact, you do not need to be very familiar with all the OSGI architecture for develop plug-ins for Liferay DXP. You only need to understand this 2 concepts: modules and components.

Continue Reading

How to develop portlets with Spring MVC Portlet in Liferay

If you work as a portlet developer on Liferay Portal based applications, you will probably know that Liferay allows you to use lots of different frameworks in order to accomplish this goal. For instance, you are free to use Struts, JSF, Vaadin, Spring or any other framework you prefer. In adition, Liferay provides out of the box two extra frameworks/tools that can help us in our development tasks:
  • Liferay MVC Portlet framework: a simple, lightweight and easy to understand framework for portlets development. Using this framework, we can manage easily portlet lifecycle and all the requests that it can serve. This is an alternative to third party frameworks such as Spring MVC Portlet, Struts or JSF.
  • Service Builder: using this tool, you will be able to build in an easy way persistence and service layer for your application. This tool is used by Liferay in order to implement its own portlets.
Both of them are great framewoks and, probably, we will write about them in next articles. But, this article, is intended to be a simple guide for those Liferay developers who are interested in use Springframework in their portlets. In this article, we will talk about Spring MVC Portlet but, in coming articles, we will talk also about Spring Data and JPA Repositories. If you are wondering why to use Springframework if Liferay provides its own frameworks, the answer is simple: because you can. We live in a world of possibilities, and, if we work with Liferay Portal, we are free to chose how to develop our applications, so let’s do it. Furthermore, maybe our team are used to work with some specific frameworks in other cotexts so, if we can continue to use these frameworks, we become even more productive.

Continue Reading