How Proxy Objects (Beta-Feature) in Liferay 7.4 Can Transform Your Development Workflow?

How Proxy Objects (Beta-Feature) in Liferay 7.4 Can Transform Your Development Workflow?

How Proxy Objects (Beta-Feature) in Liferay 7.4 Can Transform Your Development Workflow?
lurantech-author
Yamish R. Bhalara
blog-display-date
Thu Jan 23 2025
How Proxy Objects (Beta-Feature) in Liferay 7.4 Can Transform Your Development Workflow?

Liferay 7.4 introduces a cutting-edge feature in its beta release - Proxy Objects. This new functionality is set to enhance the way developers build and manage applications within Liferay, providing them with greater performance, flexibility, and efficiency. But what exactly are Proxy Objects, and how can they be used in your Liferay projects? In this blog, we'll break down everything you need to know about this feature and how to leverage it for better results.


Why do we need or use proxy objects?

When you are exploring new things and some unfamiliar words come to our attention, the first thing that comes to mind is, "Why?", right? So here, for proxy objects, why should we use them, right?

Let's start with a simple explanation.

liferay-proxy-object

Now, as you can see, the information or data we need comes from other sources, is stored in our database, and then rendered on our portlets. This approach makes things more complicated, like having to get data from other services, verify the data, store it in our database, and then render it on portlets. Now, what if we could do something like this?

liferay-proxy-object

Well, this looks much simpler and saves a lot of space in our database, and it saves us from configuring many things. We can directly use data from its source without storing it in our database.

Definitely, this is a much better solution. Now, how can we do these things? Well, for that, we also have many options, like:

  • Custom Fragments
  • Liferay MVC Modules
  • Proxy Objects (Liferay's beta feature)

Now the question arises: What should we use? Well, if you are familiar with Custom Fragments and Liferay MVC Modules, you know it still requires a lot of configuration to connect with those objects.

In the upcoming era of development, the first thing we want to implement is Low-code or No-code.

To fulfill that requirement, Liferay introduces features like proxy objects.

What are Proxy Objects in Liferay 7.4 and their benefits?

Liferay Objects offer a low-code solution for designing data models and integrating business logic within Liferay DXP. This feature enables you to build tailored user experiences, complete with customized workflows, validations, notifications, and more.

Typically, object definitions automatically generate database tables in Liferay to store entry data. However, you have the option to set up your object as a proxy, allowing it to interact with and retrieve data from external sources, such as Salesforce.

Instead of duplicating and synchronizing data across systems, the proxy model enables you to rely on a single external data source. This helps to minimize inconsistencies and conflicts that can arise between different systems. Traditional solutions to this challenge often involve expensive and complex custom development. With proxy objects, you can take advantage of Liferay's low-code capabilities, ensuring consistent user experiences, reducing redundant processes, and simplifying data management.

In the case of proxy objects, the fields within the object are directly mapped to columns in an external system's database. As a result, actions performed on the object—such as creating or updating entries—are reflected immediately in the external system's database. For instance, when a user creates an object entry, Liferay sends a POST request to the external system's API endpoints, adding the data directly to that system's database.

How to use proxy objects?

To enable proxy objects in Liferay, go to - Instance Settings - Flag Features - Enable Proxy Object flag.

liferay-proxy-object

Now, whenever you create a new object, you can see the beta feature enabled in the model. Here, you can select the storage type, and it's all set to go.

liferay-proxy-object

Here, you can use objects connected with Salesforce and SugarCRM directly. First, you need to connect your Liferay with Salesforce or SugarCRM with login and OAuth credentials.

Now, you can directly map those objects from Salesforce or SugarCRM with Liferay's objects. Here, you are not storing your data in Liferay's database, but instead using it in the Liferay platform, and you can easily access and modify the data of those objects.

If you have any other objects apart from Salesforce and SugarCRM, you can use the Microservice Client Extension to connect, just define some REST services, and you're all set.

For any query or more information related our blog don't hesitate to Reach us out.

Ready to Work, Let's Chat
Our team of experts is ready to collaborate with
you every step of the way, from initial consultation to implementation.
Contact Us Today!