Liferay DXP and Portal’s architecture has three parts:
Core: Bootstraps DXP/Portal and its frameworks. The Core provides a runtime environment for managing services, UI components, and customizations.
Services: Expose DXP/Portal functionality and custom functionality via Java APIs and web APIs.
UI: The optional web application UI for adding portals, sites, pages, widgets, and content.
You can use the UI and services together or focus solely on using services via REST web APIs.
The architecture satisfies these requirements:
Supports using common development technologies
Leverages development standards
Facilitates swapping components
Starts fast and performs well
Its runtime is easy to configure and inspect
The Core supports UI and service deployments and orchestrates wiring them together.
DXP/Portal is a web application that runs on your application server. The Core bootstraps the application and its frameworks.
There are frameworks for these things and more:
Segmentation and Personalization
The Core provides the component runtime environment for the frameworks, services, and UI. Here are some component examples:
The following figure shows these component types in the runtime environment.
The runtime environment supports adding, replacing, and customizing components on-the-fly. This makes the following scenarios possible:
Replacement: If the
ServiceC Impl 2 component has a higher ranking than existing component
ServiceC Impl 1,
ServiceC Impl 2 is used in its place.
PortletA Filter intercepts and modifies requests to and responses from
PortletA, affecting the content
Component WAR and module JAR projects install as OSGi bundles (modules). Liferay’s OSGi framework defines the module life cycle, enforces dependencies, defines the class loading structure, and provides an API and CLI (Felix Gogo Shell) for managing modules and components. The Core is configured via portal properties files and System Settings.
The service components provide business functionality.
Business logic is implemented in services deployed to the component runtime environment. Built-in Core services and framework services operate on models such as Users, Roles, Web Content, Documents and Media, and more. You can introduce new models and functionality through custom services. Service components can access each other via dependency injection.
Front-end applications invoke the services to do work. You can deploy Java-based applications that call services directly using the Java APIs, and any web-based (Java and non-Java) application, whether deployed on DXP/Portal or not, can use the web APIs, which include headless REST APIs that conform to the OpenAPI standard and include plain web/REST services. The following figure shows applications and external clients invoking Liferay services.
The web-based UI makes content and service functionality available in browsers.
The UI helps people do work, collaborate, and enjoy content. The UI consists of
DXP/Portal application: The web application for managing Portals, Sites, Users, Pages, Widgets, and more.
Applications: Widgets that provide a user interface for services already deployed.
Themes: Plugins for styling Sites with a unique look and feel.
The UI architecture articles dig deeper into developing and customizing UI components.
As you can see, the architecture supports developing services, UI components, and customizations. The architecture section covers Core, service, and UI topics. Next, we dive into the Core to describe class loading, modularity, and more. But you can jump ahead to any service or UI architecture topics, if you like. Enjoy exploring the architecture!