Foundations of Liferay Client Extensions

Deciding Between Client Extensions and Plugins

Traditionally, extending Liferay required creating and deploying custom OSGi plugins. These plugins are written in Java and can interact with Liferay’s core services. While this method is a powerful and comprehensive way to extend Liferay’s functionalities, it has notable drawbacks.

  • Specialized Resources: OSGi plugins require developers with Liferay expertise to build them safely and properly, which limits the pool of developer resources.
  • Increased Development Time: Since they involve intricate Java development, OSGi plugins increase the time for delivering solutions.
  • Higher Risk of Breaking Changes: Since they run within Liferay and can modify its core, OSGi plugins are more susceptible to breaking changes in Liferay’s APIs as updates are applied to the solution.
  • Deployment Restrictions: Liferay SaaS does not support the deployment of custom OSGi plugins; they are only viable for Liferay Self-Hosted and Liferay PaaS deployments.

Generally speaking, OSGi plugins should only be used if your requirements are not satisfied by out-of-the-box features or client extensions. Client extensions provide a far more flexible development model and avoid drawbacks associated with traditional OSGi plugins. By separating customizations from the Liferay core, client extensions simplify updates and free you to build solutions using your preferred technologies or deployment strategy. These are just some of the benefits of this development model.

  • Simplified Upgrades and Maintenance: Since client extension maintenance events are decoupled from Liferay, they won’t break when upgrading or updating Liferay and deployments can happen in any window. Also, since they are self-contained, one buggy extension won’t effect the entire server.
  • Improved Stability: Since they don’t modify Liferay’s core and use versioned headless APIs for integration, client extensions reduce the risk of breaking changes.
  • Reduced Learning Curve: Client extensions reduce the need for specialized Liferay knowledge and empower developers to use their preferred technologies and frameworks.
  • Accelerated Development: Due to their independence and flexibility, developers can enhance and iterate on client extensions much faster than OSGi Plugins.
  • Platform Deployment Support: Client extensions support all of Liferay’s deployment models (i.e., Self-Hosted, Liferay PaaS, and Liferay SaaS).

Client extensions should be your first choice when extending Liferay beyond its out-of-the-box capabilities. OSGi plugins should only be used for cases where client extensions cannot meet the needs of a business.

Conclusion

Congratulations! You’ve completed the Foundations of Liferay Client Extensions course. Client extensions offer a compelling alternative to traditional OSGi plugins for extending Liferay DXP. Their decoupled architecture, simplified development process, and enhanced scalability make them a more robust and future-proof solution for many use cases. Next, complete the course exam to earn your badge!

  • Conclusion

Loading Knowledge

Capabilities

Product

Education

Contact Us

Connect

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