Liferay Portal is an open-source enterprise portal software declared as the Best open-source Portal by InfoWorld in 2007. It allows creating a web portal adopting flexible architecture and divides a webpage into a theme, layout, and portlets.
In this comprehensive Liferay tutorial, we will learn the basic concepts of Liferay and its features.
If you want to enrich your career and become a professional in Liferay, then visit Mindmajix - a global online training platform: "Liferay Training" This course will help you to achieve excellence in this domain.
9. Managed Bean
10. JSF View
What is Liferay?
Liferay is an open-source Enterprise software development platform based on modern J2EE technology. It is a leading Portlet container that is used for creating a standard, scalable, and enterprise web application.
This Portlet technology follows JSR 168 and JSR 286 complaints, including many portlets, and each portlet has its response and request.
It sends a request and gets a response from the server; then, the response belongs to the portal only that sends the request.
The Liferay portal includes a set of portlets and is used to build a web application and develop a new portlet application. It has a framework and standards to add a new feature and customize the existing portal.
Liferay has two types of portals.
Liferay Community Edition is an open-source portal and can get source code to add or customize the application. It includes an excellent working group and community people and allows users to contribute their work to the Liferay community.
Liferay Enterprise Edition is a paid portal that has an enterprise permit from Liferay Inc. It includes several advantages over the Liferay Community Edition.
Liferay is a dynamic and highly scalable platform that interactive websites and enterprise portals are created. Liferay DXP includes several functions called portlet that provide extensive support for various programming languages such as C++, .NET, Java, PHP, etc.
[Related Article: Latest Core Java]
There are many reasons to consider using Liferay Portals in organizations.
It can work using HTML5, CSS, XHTML, and a host of other design methods. It provides UI/UX compatibility with its drag-and-drop feature used to move different entities in the portlets.
It offers a unique workflow APIs for an excellent user experience and allows users to create and apply workflow with custom entities.
Liferay is a Java-based platform, and it is easy to implement the application using different resources available in the market.
It allows users to personalize the web portals and website pages and easily allows a robust Enterprise Content Management System to Add/Remove/Edit the content on websites and portals.
It allows users to integrate with modern and existing technologies such as Spring, Hibernate, JBoss, and other such databases.
The features of Liferay are as follows:
It provides extensive support for various platforms such as documents, files, bookmarks, web content, wiki pages, blogs, etc.
The administrator or user can edit, add, and customize Liferay's portlets' attributes without modifying the company database.
It offers a simplified User Interface for different users and allows users to use a single presentation layer for all businesses.
It enables users to access the application by logging through the Secure Single Sign-On to integrate with different end-users' systems.
It provides a single click configuration so that everyone can use the benefit of a fast User Interface.
It offers a set of performance accessing tools to the administrator.
It allows users the drag-and-drop feature to move various entities of portals.
Liferay allows users to create the workflow as per the operational requirements and offers workflow APIs for a better user experience.
To download Liferay, follow the below steps and ensure that you have installed the Liferay portal and ran through the Eclipse.
4. Click Next and extracted the Liferay file to browse them.
5. Click Next and Finish.
6. From the Servers pane, start the server.
7. Wait until the server gets started and opens the browser.
8. Fill in the details and click Finish Configuration.
9. A message appears on a successful configuration and clicks Go to My Portal.
10. Accept the terms and Enter the required Login credentials and click save.
11. A Liferay Dashboard appears on the screen.
To create a Liferay Portlet, an Eclipse Plugin has to be installed. It helps you to create a Liferay Portlet along with the properties to deploy. To install Liferay Eclipse Plugin, do the following steps.
Add the latest Liferay tools link to start working.
Click Next and Accept the terms and conditions.
Liferay plugin is used to obtain an example of Liferay JSF Portlet and provide a broad range of Liferay Portlet types and containers. To create a Liferay Portlet, do follow the steps below.
In the Liferay, select Liferay Portlet from the menu and click Next.
Eclipse asks you that if you want to open the new Liferay Plugin Project wizard, answer yes. It enables you to create the Liferay Portlet as Liferay Plugin.
New Liferay Plugin Project window opens, fill in the details required.
5. Click Create New Maven Profile depending on the Liferay Runtime that is next to the Active Profiles input.
6. Click Next and select the portlet framework JSF 2.x.
7. Click Next and select the JSF Component suite, enable JSF standard.
8. Click Finish.
Database design is a design that illustrates the details that are stored in the database. For instance, an Employee table, as shown in the figure.
And you will be able to create a database with SQL queries.
Employee Model is a model that is defined to pass the data like the regular Java class.
As per the JSF, the managed bean is used to handle the presentation logic, which embeds the view. For example, an employee must be saved over our database; the managed bean has characterized a register Listener technique liable for saving the Employee.
This is the JSF implementation responsibility, and so it should focus on the business requirements instead of getting involved with ad-hoc work.
We have a single view responsible for entering employee’s details and notify them if the operation was completed or went wrong.
The detailed description of the code must include the following.
Employee’s Identifier is required; if you exclude it, the form will notify you.
The identifier should include a set of numbers.
An employee’s Salary is required, and it even has a set of numbers.
Employee’s Salary should be 2-4 digits.
Messages will help you to get notified of the status of the operation.
Register submit action offers you to send the entered information to be saved.
EmloyeeDAO and connection utilities are used together for handling all the database tasks. It is responsible for saving an employee when the database connectivity is handled by Connection Utility.
This session helps you to access Liferay Portal and run using your login credentials in the Dashboard.
Expand the dropdown that is beside your name and select My Dashboard from the list.
The Dashboard allows the user to add, remove, and modify the Portlets. The Plus button allows you to add the portlet.
A new pane has been viewed, and a set of tabs are shown. Drag the Portlets into the dashboard.
When you try to submit an empty form, an error message will notify you what went wrong and the involvement requirements.
So, fill in the required details and try to register.
And finally, you can see the employee registered inside the database.
By concluding, Liferay has tools used in three environments, such as the command-line environment, which integrates with different tools, Easy-to-use Liferay IDE that reduces the learning curves, and Maven environment is an adopted project management system. In this tutorial, we have learned the basic understanding of Liferay, how to create Liferay Plugin Portlets and Projects, and the benefits of using Liferay. If you want to achieve in-depth knowledge on Liferay, check out our Liferay Training curriculum without further delay.
Keerthana Jonnalagadda working as a Content Writer at Mindmajix Technologies Inc. She writes on emerging IT technology related topics and likes to share the good quality content through her writings. You can reach her through LinkedIn.