Understanding Client Extensions
Liferay DXP offers a powerful suite of features and a rich set of APIs for building custom solutions. Developers can leverage these APIs to create widgets and services, extending Liferay DXP's capabilities and crafting unique user interfaces. This includes both building components from scratch and customizing existing ones.
However, traditional extension methods (e.g., OSGi plugins) can pose challenges for scalability and upgrades. Since new widgets or services run within the same JVM as Liferay DXP, multiple processes can end up competing for the same limited resources, which can impact performance as the application grows. Additionally, extensive use of Liferay’s internal APIs can complicate platform upgrades due to breaking changes. This creates a challenge for developers: balancing the need for customization with the potential impact on performance, scalability, and maintainability.
Client extensions are Liferay's solution to this challenge, offering a more robust and sustainable approach to extending Liferay DXP.
What are Client Extensions?
Client extensions are self-contained units of code that reside outside the Liferay DXP container and interact with the platform solely through its APIs. This decoupled architecture offers several advantages over traditional extension methods, such as improved performance, enhanced scalability, and reduced maintenance overhead.
- Improved Performance: By running outside the portal container, client extensions reduce resource competition and enhance application performance.
- Enhanced Scalability: Client extensions improve scalability by allowing you to fine-tune resource consumption and distribute workloads effectively.
- Reduced Maintenance: This decoupling minimizes maintenance overhead and reduces the risk of conflicts or breaking changes during platform upgrades.
Client extensions communicate with Liferay DXP via headless REST APIs that follow the OpenAPI specification. This ensures seamless integration and interoperability between your extensions and the platform. By adhering to the OpenAPI specification, these APIs provide consistent and well-defined interfaces for accessing and manipulating data, triggering actions, building user interfaces, and managing various aspects of your Liferay DXP instance. Additionally, by leveraging APIs, client extensions support all Liferay deployment options, including Liferay SaaS.
For this decoupled architecture, security is paramount. Liferay secures all client extension communications with OAuth 2.0 by default, ensuring that interactions between client extensions and the platform, as well as communication between client extensions, are protected. This robust security framework safeguards your data and ensures that your extensions operate within a trusted environment.
Types of Client Extensions
Liferay provides multiple types of client extensions to address different business needs and use cases:
Frontend: Generally, these extensions provide design resources for modifying your site’s look and feel. You can also use them to create custom web components, registering external applications with Liferay and rendering them as page widgets.
Microservice: These extensions are external applications that execute business logic in response to events in your Liferay instance. Examples include custom workflow actions, notifications, object actions, and validations.
Configuration: These extensions configure instance settings in Liferay DXP by injecting details at runtime to modify platform behavior. This streamlines customization and enables flexible management of settings, such as using an OAuth user agent client extension to authenticate other client extensions.
Batch: These extensions provide data entities to your Liferay instance using headless batch endpoints, such as object and workflow definitions.
By understanding the different types of client extensions and their capabilities, you can leverage them to create powerful and customized solutions that seamlessly integrate with Liferay DXP.
Conclusion
Client extensions are the recommended method for extending Liferay DXP without sacrificing performance. As Clarity expands, adopting client extensions will be crucial for meeting their evolving needs. Next, you’ll explore each type of client extension in more detail.
Capabilities
Product
Education
Contact Us