Foundations of Modern Liferay Application Design

Understanding Modern Liferay Applications

The term "modern Liferay applications" can encompass a range of interpretations and perspectives. However, any modern approach to application design shares some key principles. For instance, modern applications must prioritize efficiency, maintainability, and scalability. To achieve these goals, they should leverage Liferay's out-of-the-box (OOTB) features, minimize customizations, and adopt the latest development practices to satisfy business requirements. Understanding these principles is essential to the modern Liferay mindset.

Key Principles

Modern Liferay applications are distinguished by a thoughtful, strategic approach to development. This approach maximizes the platform's strengths while minimizing complexity, cost, and long-term maintenance overhead. Four key principles guide these projects:

  • Evaluating Business Requirements
  • Maximizing Out-of-the-Box Features
  • Avoiding OSGi-Based Customizations
  • Limiting Module JARs and Portlet WARs

These principles serve as the foundational guidelines for developing applications that are efficient, maintainable, and aligned with evolving business needs.

Evaluating Business Requirements

All modern application projects should begin with a thorough evaluation of business requirements. This enables decision-makers to weigh the trade-offs between complexity, cost, and functionality. In fact, reducing implementation costs often comes down to simplifying the business requirements. During this process, consider using a method like MoSCoW to rank requirements by importance:

  • M - Must Have: Essential requirements critical for the project's success.
  • S - Should Have: Important but not critical requirements for the initial release.
  • C - Could Have: Desirable features that enhance the product but are not essential.
  • W - Won't Have: Features currently out of scope but may be revisited later.

By applying the MoSCoW method, teams can begin designing their solution and develop cost estimates for alternative approaches.

By applying this prioritization, teams can begin designing their solution and develop cost estimates for alternative approaches.

Liferay’s flexible and feature rich platform enables you to solve many requirements without extensive development or customization. However, complex requirements may require extending the platform. Keep in mind, increased complexity leads to increased implementation costs (i.e., in time, money, and resources). It's important to simplify requirements whenever possible. Then teams can determine the most appropriate solution at the lowest implementation cost.

Not all Liferay-based solutions must be hosted by or within Liferay. In fact, with features like headless APIs, Objects and Client Extensions, you can integrate external applications (e.g., mobile applications, ETL tools) that still leverage Liferay features to reduce overall costs. Remember, Liferay can be part of the solution; it doesn’t have to be the entire solution.

Maximizing Out-of-the-Box Features

Liferay provides an extensive suite of built-in capabilities that can address a wide array of business needs without custom development. These features include content management, commerce, workflow, personalization, and much more. For this reason, modern Liferay applications should leverage OOTB features as much as possible.

This approach provides several benefits:

  • Reduced Development Time: Eliminates the need for time-consuming custom development.
  • Lower Maintenance Costs: Liferay maintains and improves OOTB features, reducing the need for ongoing maintenance of custom code.
  • Improved Reliability and Security: Built-in features are extensively tested, documented, and regularly updated to address security vulnerabilities.
  • Faster Time-to-Market: Solutions that maximize Liferay's existing capabilities can be deployed more rapidly.

Modern Liferay applications stand out by making the most of the platform's powerful, built-in features. By reducing custom code and maximizing OOTB capabilities, organizations can achieve cost-effective, maintainable, and scalable solutions that grow alongside their business needs.

To effectively leverage Liferay's OOTB features, consider these best practices:

  • Assess First, Customize Last: Always evaluate whether Liferay's existing tools meet requirements before considering custom development.
  • Stay Updated: Keep track of new features in Liferay's regular updates to avoid redundant customizations.
  • Modular Extension: Use Liferay's extension frameworks (e.g., Client Extensions) to extend capabilities while minimizing direct customization.

This approach enables you to streamline development, reduce complexity, and create more maintainable and scalable solutions.

Avoiding OSGi-Based Customizations

Modern Liferay application design avoids OSGi-based customizations. While Liferay's OSGi framework allows for extending, overriding, or replacing components and widgets, this approach has significant drawbacks:

  • Increased Development Time: Researching, developing, and testing OSGi-based customizations requires considerable time and expertise.
  • Maintenance Overhead: Each Liferay upgrade necessitates a review and potential adjustment of custom code, increasing ongoing maintenance costs.
  • Compatibility Risks: Customizations may break or cause unexpected behavior when new features or patches are introduced.

For these reasons, only use OSGi customizations as a last resort. Modern solutions should instead prioritize these approaches to extending Liferay DXP:

  • Out-of-the-Box (OOTB) Features: Evaluate existing capabilities before considering custom development.
  • Low-Code Tools: Use Liferay Objects and Workflow capabilities to build solutions without writing extensive custom code.
  • Client Extensions (CX): Leverage client extensions to add functionality with minimal impact on the core platform.

This shift reduces initial development time while mitigating upgrade-related challenges in the future.

Despite best efforts, some scenarios may still require OSGi-based customizations. Liferay continues to support the classic customization model, and it remains a valid option when necessary. However, before proceeding with a customization, architects should consult Liferay resources to explore potential modern alternatives. This is essential for reducing costs, complexity, and maintenance overhead.

Limiting Module JARs and Portlet WARs

In line with minimizing customizations, modern Liferay applications also aim to limit or avoid using traditional OSGi portlet module JARs and portlet WARs. While historically common, these approaches present similar challenges to OSGi-based customizations and can be replaced with more modern, flexible alternatives.

Deploying applications using traditional JARs and WARs has several challenges:

  • Complex Deployment and Maintenance: These deployments often require manual intervention and careful version management, increasing overhead and the risk of errors.
  • Increased Development Effort: Developing, testing, and debugging custom modules and portlets can be significantly more time-consuming than using Liferay's built-in tools and frameworks.
  • Compatibility Issues: Legacy modules may require refactoring or reworking when upgrading Liferay DXP, increasing upgrade costs and complexity.

Given these challenges, you should prioritize modern alternatives (i.e., OOTB features, low-code capabilities, and client extensions). These alternatives offer a more flexible, modular approach to creating scalable and easily maintainable applications.

For clients upgrading from older Liferay versions, maintaining existing JARs and WARs may be more cost-effective than reworking the application from scratch. In these cases, follow these guidelines:

  • Evaluate First: Assess whether legacy components can continue to function effectively after the upgrade.
  • Incremental Modernization: Gradually replace legacy modules with modern alternatives over time.
  • Consult with Liferay: Reach out to Liferay via public forums or private support channels to explore potential modernization strategies and ensure that the best approach is taken.

While JARs and WARs are still supported and valid for certain scenarios, modern Liferay applications benefit from limiting their use. By embracing OOTB features, low-code solutions, and client extensions, teams can create applications that are easier to maintain, extend, and upgrade. When legacy components appear unavoidable, expert guidance from Liferay can often reveal more modern, efficient alternatives.

The Modern Liferay Mindset

The overarching mindset for modern Liferay application development is one of strategic simplicity. By embracing the platform's native capabilities and adopting modern extension techniques, teams can build applications that are both innovative and cost-efficient.

Crucially, the decision to use more traditional customization techniques should be informed by careful analysis and consultation with Liferay resources. Whether through public forums or official support channels, collaboration with the wider Liferay community can reveal new, more efficient approaches to old challenges.

Ultimately, modern Liferay applications are about achieving business goals with the least complexity necessary—maximizing value while minimizing effort and risk.

Conclusion

Modern Liferay applications prioritize efficiency and maintainability by leveraging OOTB features, low-code capabilities, and client extensions. This approach enables you to build robust, cost-effective solutions that adapt to evolving business needs while ensuring long-term sustainability.

Next, you’ll learn how you can leverage Liferay Objects to model data structures.

  • Key Principles

  • The Modern Liferay Mindset

  • Conclusion

Capabilities

Product

Education

Contact Us

Connect

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