Foundations of Liferay Client Extensions

Exploring Types of Client Extensions

Liferay provides four general categories of client extensions: Frontend, Microservice, Configuration, and Batch. Each type offers unique methods for extending and adapting the platform to your business needs. When used together, these extensions create a rich ecosystem of components that seamlessly enhance and extend your Liferay DXP environments.

Liferay provides four general categories of client extensions: Frontend, Microservice, Configuration, and Batch.

This article provides a brief overview of each type, highlighting their unique capabilities and benefits.

Frontend Client Extensions

Frontend client extensions provide front-end resources to your Liferay DXP instance for enhancing the presentation layer of your sites. These resources can range from custom CSS and JavaScript files to fully interactive web components that seamlessly integrate with Liferay's UI. Due to the variety of frontend use cases, this category includes several subtypes.

Most of these subtypes provide resources to enhance the look and feel of Liferay sites. This enables fine-grained control over all visual elements, including color schemes, typography, icons, and more. You can apply these extensions at the site level or for individual pages and page elements.

Additionally, you can use frontend client extensions to create custom elements that integrate external applications as page widgets. These custom elements can leverage Liferay APIs to interact with and extend the platform's functionality. For example, you can use them to retrieve and display Liferay data or create forms for receiving user input. You can also use these extensions to integrate fully independent applications into the Liferay ecosystem.

While each type of frontend client extension has its own scope within Liferay, they share the common purpose of extending the platform’s presentation layer.

Business Value

Taken together, frontend client extensions offer many benefits:

  • Centralized and Shared Resources: Centralize organization-wide assets to eliminates redundant efforts, streamlines maintenance, and promote consistency.
  • Decoupled Development: Decouple front-end resources from Liferay's core to ensure smoother upgrades and minimize concerns about breaking API changes.
  • Enhanced Flexibility: Use your preferred front-end tools and frameworks to build your solutions (e.g., React, Angular).

These benefits make frontend client extensions a powerful tool for extending and enhancing your Liferay DXP sites. Gain hands on experience building and deploying custom elements and styling extensions for Clarity in the Mastering Frontend Client Extensions course.

Microservice Client Extensions

Microservice client extensions are external, standalone applications that communicate with Liferay DXP via OAuth 2.0 and execute actions in response to events within the instance. This category operates as a decoupled server process and includes various subtypes that handle business logic, manage data, integrate third-party systems, and perform other data-driven actions. You can use these microservices to extend out-of-the-box capabilities for Liferay objects, workflow, commerce, and more.

With the exception of Cron Jobs, all subtypes share the same basic execution behavior. Typically, this starts with Liferay DXP sending a request (commonly asynchronously) to the application server and receiving a response.

Business Value

Microservice client extensions offer numerous benefits for extending and integrating Liferay DXP with external systems:

  • Decoupled Systems: Maintain loose coupling between Liferay and external systems, reducing dependencies and improving maintainability.
  • Decoupled Teams: Allow independent teams to work on separate microservices, promoting parallel development and efficient resource allocation.
  • Highly Scalable Solutions: Facilitate the development of scalable solutions by distributing functionality across multiple microservices.

These are just a few of the advantages of using microservice client extensions. Learn more and gain hands-on experience building and deploying these extensions for Clarity in the Mastering Backend Client Extensions course.

Configuration Client Extensions

Configuration client extensions offer a streamlined approach to managing and deploying Liferay configurations, including instance settings and OAuth details. These extensions use a “configuration as code” approach to extend Liferay’s environment settings by handling configurations as reusable, version-controlled assets. This reduces manual workload and helps ensure consistency across deployments.

Business Value

Configuration client extensions provide significant value by automating configuration management and reducing the risks associated with manual intervention.

  • Enhanced Reliability: Achieve consistent and predictable results across deployments by treating configuration settings as reusable, version-controlled assets.
  • Faster Deployment: Streamline the setup of new environments and accelerate the implementation of configuration changes.
  • Improved Security and Compliance: Support strong security practices by enabling audit trails and change management records for all configuration deployments.

These benefits make configuration client extensions especially valuable for large-scale and complex Liferay deployments. Learn how to create and deploy configuration client extensions for Clarity in the Mastering Backend Client Extensions course.

Batch Client Extensions

Batch client extensions provide a mechanism for importing data into Liferay instances from your workspace. To achieve this, batch client extensions leverage Liferay’s batch engine framework. This is especially useful for migrating data models (e.g., object definitions and picklists) between Liferay instances, ensuring consistency and simplifying the promotion of changes across environments. Because client extensions connect with Liferay’s headless APIs, you can use batch client extensions to import nearly all types of data within the platform, automating manual data import activities and streamlining development.

Using batch client extensions, you can migrate data between Liferay instances or import data from an external system. When migrating data between Liferay instances, you can export data from one instance via cURL or the Data Migration Center (Beta), add it to a batch client extension, and deploy it to another instance. If importing data from an external system, you must first transform the data to ensure it conforms to Liferay's data structures.

Business Value

Batch client extensions offer significant value by automating data management tasks and ensuring consistency across Liferay DXP instances.

  • Automated Data Model Migration: Streamline the process of migrating data models between environments (e.g., object definitions, picklists, workflow definitions). This reduces manual effort and helps ensure consistency across your Liferay DXP instances during development, testing, and deployment.
  • Automated Data Import: Populate your Liferay instance with data using headless batch endpoints. This automates the process of seeding and loading entry data.

By automating these crucial data management tasks, batch client extensions free up valuable time and resources while promoting consistency. Gain hands-on experience building and deploying batch client extensions for Clarity in the Mastering Backend Client Extensions course.

Conclusion

Each type of client extension provides unique and powerful methods for extending Liferay DXP. By understanding and leveraging them effectively, you can implement complex, scalable solutions that meet your business needs. Next, you'll explore the basics of setting up client extension projects.

  • Frontend Client Extensions

  • Microservice Client Extensions

  • Configuration Client Extensions

  • Batch Client Extensions

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy