Skip to main content

The Ultimate Guide to Liferay DXP Performance Tuning: Speed Up Your Portal

The Ultimate Guide to Liferay DXP Performance Tuning: Speed Up Your Portal In the enterprise web space, milliseconds equal millions. Whether you are running a B2B commerce storefront, a customer support portal, or an employee intranet on Liferay DXP, slow load times will devastate your user experience and destroy your SEO rankings. Out of the box, Liferay is configured to run on almost any machine. This means its default settings are highly conservative to ensure compatibility, not maximum performance. If you are launching a production environment without tuning your server, you are leaving massive amounts of speed and scalability on the table. In this comprehensive, deep-dive guide, we are going to explore the critical layers of Liferay performance tuning. We will cover backend Java Virtual Machine (JVM) configuration, Database Connection Pooling, Elasticsearch optimization, and Frontend caching strategies. By the end of this guide, you will have a blazing-fast, enterprise-grade...

How to Develop Vaadin Portlet


Vaadin Portlet



The core piece of the Vaadin Framework is the Java library that is designed to make creation and maintenance of high quality web-based user interfaces easy. Here We are going to develop Vaadin portlet Using Eclips With liferay.
If you are already install ide in your eclips then only you have to add Vaadin.jar file in your plugin-packeg.properties
Other wise you have to install ide in our eclips and then add Vaadin.jar file in your plugin- packeg.properties.

Step to create vaadin portlet in liferay 6.1 :

Step 1:
Open eclips => file => new => liferay project =>Enter your project name(like demo_vaadin)=>next=>select radio button for vaadin portlet =>finish
Step 2 :
Now go to the rootfolder=>WEB-INF=>plugin-packeg.property=>add vaadin.jar file.



Step 3 :
Go to the sdk folder =>portlets=>open build.xml file now go the line 138
you will find the line......
<replacetoken><![CDATA[<name>view-jsp</name>]]></replacetoken>
replace this line by
<replacetoken><![CDATA[<name>view-template</name>]]></replacetoken>
and go to the line 129 and put following code
speed-filters-enabled=false
Step 4 :
Start your server if not already started and go to the ant build and deploy your project
now go the dock bar menu =>add=>more=>click on your demo_vaadin portlet your portlet will say Hello DemoVaadin!
Note :
In Vaadin portlet there is no use of jsp page .you will do every thing in action file which is find under docroot/WEB-INF/src/demo_vaadin. In this file init() is already created if you want to display any control(like imput box ,button ,form etc)then you have to write code under init()



Now lets Add imput box and button in our portlet


Wire following code under init() and deploy
public class DemoVaadinApplication extends Application {
@Override
public void init() {
final Window window = new Window(); //making object of main window
Label label = new Label("Hello DemoVaadin!");

window.addComponent(label);

final TextField tf = new TextField("Enter Name :");
tf.setValue("Initial content");
window.addComponent(tf);

setMainWindow(window); //this line set main window


}
}


1. if you want to display any message on your portlet then write following code under init()

Label label = new Label("Hello DemoVaadin!");

window.addComponent(label);

until you will not write window.addComponent(label) your message will not visible on your portlet.
2. for adding text box write following code

final TextField tf = new TextField("Enter Name :");
tf.setValue("Initial content");
window.addComponent(tf);







3. adding button in portlet
Button okbutton = new Button("OK");
window.addcomponent(okbutton);

Handling input box with button:

Here are code for handling input box using button:
Button show = new Button("Show", new Button.ClickListener() {
final TextField md = new TextField("Enter Name :");
md.setValue("Initial content");
window.addComponent(md);
public void buttonClick(ClickEvent event) {
String valu=(String)md.getValue();//getting value of input box

System.out.println(value);//when you click on show button you will get input value of your input box on comsole
window.addComponent(show);

How date and time will display whwn you click on display time button

Here is complete code for this:
new Button("What is the time?",
new Button.ClickListener() {
//@Override
public void buttonClick(ClickEvent event) {
// TODO Auto-generated method stub
window.showNotification(
"The time is " + new Date());
}
}));







Comments

Popular posts from this blog

service builder with crud operation in liferay

   Crud and Search opration in Liferay:      ->  Liferay use service builder techniq for Crud opration.    ->  Service builder purform by  Service.xml file.    ->  Service.xml file create table in database and also create class and diffrent method.   1)      Create service.xml file.             ->Create service.xml file in WEB-INF and write below code.             ->CODE:        < service-builder package-path = "com.test" >         < namespace > qr </ namespace >           < entity name = "Searchclass" local-service = "true"                     ...

How to create new site programmaticly in liferay with validation

Create site in liferay <%@page import="javax.portlet.PortletPreferences"%> <%@page import="com.liferay.portal.kernel.util.ParamUtil"%> <%@page import="com.liferay.portal.kernel.util.HtmlUtil"%> <%@page import="com.liferay.portal.kernel.util.StringPool"%> <%@page import="com.liferay.portal.kernel.util.UnicodeProperties"%> <%@page import="com.liferay.portal.service.LayoutSetPrototypeServiceUtil"%> <%@page import="com.liferay.portal.model.LayoutSetPrototype"%> <%@page import="com.liferay.portal.service.GroupLocalServiceUtil"%> <%@page import="java.util.List"%> <%@page import="com.liferay.portal.kernel.bean.BeanParamUtil"%> <%@page import="com.liferay.portal.theme.ThemeDisplay"%> <%@page import="com.liferay.portal.model.Group"%> <%@page import="com.liferay.portal.kernel.util.WebK...

Liferay Objects in 7.4: Build Full Applications Without Coding

Liferay Objects in 7.4: Build Full Applications Without Coding Meta Description: Learn how to use Liferay Objects in 7.4 to build full-stack applications without Service Builder. Step-by-step guide with real examples. Keywords: Liferay Objects, Liferay 7.4, Liferay tutorial, Liferay API, Liferay development, low code platform 🚀 Introduction If you have worked with Liferay earlier, you probably remember the pain of Service Builder—writing XML, generating code, deploying modules, and managing OSGi. In my experience working on Liferay-based portals , even a simple CRUD feature used to take hours or sometimes days. But with Liferay 7.4, everything changed. Liferay Objects is a powerful low-code feature that allows you to create database entities, APIs, and UI directly from the browser—without writing backend code. --- 📌 What are Liferay Objects? Liferay Objects allow you to build applications directly from the Control Panel UI. Create database tables Define re...