Liferay DXP architecture comprises these parts:
Core: Bootstraps Liferay DXP and its frameworks. The Core provides a runtime environment for managing services, UI components, and customizations.
Services: Liferay and custom functionality is exposed via Java APIs and web APIs.
UI: The optional web application UI for adding portals, sites, pages, widgets, and content.
You can use the Liferay DXP 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.
Core
Liferay DXP is a web application that runs on your application server. The Core bootstraps the application and Liferay’s built-in frameworks.
There are frameworks for these things and more:
- Adaptive Media
- Application Configuration
- Application Security
- Asset Framework
- File Management
- Localization
- Search
- Segmentation and Personalization
- Upgrade Processes
- Web Fragments
- Workflow
The Core provides the component runtime environment for the frameworks, services, and UI. Here are some component examples:
- Services
- Service customizations
- Portlets (templates, controllers, and resources)
- JavaScript applications (templates, routers, and resources)
- JSP customization via Portlet Filters
- Theme
- Shared Language Keys
- Navigation components
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.
Customization: The PortletA Filter
intercepts and modifies requests to and
responses from PortletA
, affecting the content PortletA
displays.
Component WAR and module JAR projects install as OSGi bundles (modules). Liferay DXP’s OSGi framework defines the module lifecycle, 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 Server Administration panels.
The service components provide business functionality.
Services
Business logic is implemented in services deployed to the component runtime environment. Built-in Core services and framework services operate on Liferay models such as Users, Roles, Web Content, Documents and Media, and more. You can write and deploy custom services to introduce new models and functionality. Service components can access each other in Liferay DXP 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 Liferay DXP 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 Liferay DXP applications and external clients invoking Liferay services.
Liferay services are built using Service Builder and made REST-ful using REST Builder. The services are easy to override and extend too.
Liferay DXP also provides a web-based UI, which makes content and service functionality available in browsers.
UI
Liferay DXP’s UI helps people do work, collaborate, and enjoy content. The UI consists of
-
Liferay DXP 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 concepts article digs deeper into developing and customizing UI components.
As you can see, the Liferay DXP 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 Liferay DXP architecture!