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.