Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Liferay Portal Performance Best Practices

You're reading from   Liferay Portal Performance Best Practices To maximize the performance of your Liferay Portals you need to acquire best practices. By the end of this tutorial you'll understand making the most appropriate architectural decisions, fine-tuning, load testing, and much more.

Arrow left icon
Product type Paperback
Published in Jun 2013
Publisher Packt
ISBN-13 9781782163688
Length 150 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Samir Bhatt Samir Bhatt
Author Profile Icon Samir Bhatt
Samir Bhatt
Arrow right icon
View More author details
Toc

Portlet development best practices


We talked about some of the key UI best practices. Now let's talk about some of the key portlet development best practices to achieve best performance.

Limiting the use of dynamic queries

To implement the service and persistence layer in custom portlets, Liferay provides a very good code generator called Service Builder. Service Builder generates a persistence layer using the Hibernate framework. Service Builder also generates code in the Service and Persistence classes to cache responses in a multi-VM cache pool. Service Builder provides a way to define finder methods using an XML configuration. Responses of these finder methods are also cached in a multi-VM cache pool. Liferay Service Builder also provides a way to execute dynamic queries using the dynamic query API. Service Builder generates methods in the service and persistence layer to execute dynamic queries. Here is an example of dynamic query execution:

DynamicQuery query = DynamicQueryFactoryUtil...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image