Foundations of Modern Liferay Application Design

Course Overview

Working with Legacy Liferay Applications

While modern Liferay applications prioritize out-of-the-box features, client extensions, and headless APIs, OSGi development remains supported for Liferay PaaS and Self-Hosted deployments. However, it's not available for Liferay SaaS. More importantly, you should consider OSGi development as a last resort when implementing new functionality.

When OSGi Customization is Necessary

In rare cases, an OSGi customization may be the only way to meet essential requirements. Before committing to this path, consult Liferay support, partners, and community resources for alternative approaches (e.g., objects, fragments, client extensions). If a customization is truly necessary, follow these best practices:

  • Minimize Scope: Only modify what is absolutely necessary.
  • Avoid Fragmentation: Avoid introducing unnecessary components if a simple modification to existing components is sufficient.
  • Maintain Upgradeability: Structure customizations to minimize disruption during future upgrades.
  • Report Needs to Liferay: Liferay may address the gap by introducing a new OOTB feature or client extension.

Maintaining Existing OSGi Applications

For organizations with existing OSGi-based Liferay solutions, a complete refactor into modern development patterns is not always necessary or cost-effective. If the existing OSGi code is functional and stable, refactoring and modernizing the solution is not required. However, refactoring is recommended when it provides tangible benefits, such as reducing long-term maintenance costs.

Consider these factors when maintaining existing OSGi solutions:

  • Assess Cost vs. Benefit: While modernizing legacy OSGi solutions can improve maintainability, refactoring is not free. Weigh the cost of migration against the ongoing maintenance effort.
  • Adopt a Hybrid Approach: Maintain functional OSGi code while using modern application patterns for new Liferay-based development.
  • Phase Out Customizations: When refactoring or upgrading solutions, look for opportunities to replace custom code with OOTB or Client Extension-based alternatives.

Conclusion

OSGi remains a viable, supported option for Liferay PaaS and Self-Hosted deployments, but it should be the last resort when designing new solutions. For legacy applications, prioritize practicality: maintain functional OSGi code while adopting modern Liferay approaches for new development. This hybrid strategy allows for gradual evolution while minimizing costs and complexity.

Next, you'll review what you've learned before taking the badge test!

  • When OSGi Customization is Necessary

  • Maintaining Existing OSGi Applications

  • Conclusion

Capabilities

Product

Education

Contact Us

Connect

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