Writing applications on Liferay’s standards-based platform makes your life easier. Whether you create headless services for clients to access, full-blown web applications with beautiful UIs, or anything in between, Liferay DXP streamlines the process to help you get your job done faster.
Liferay’s framework embraces your existing tools and build environments like Maven and Gradle. You can work with the standard technologies you know and leverage Liferay’s APIs for Documents, Permissions, Search, or Content when you need them. Here’s a high level view of what you can do:
-
Deployment of existing standards-based apps: If you have an existing app built outside of Liferay DXP, you can deploy it on Liferay DXP. The Liferay Bundler Generator and Liferay npm Bundler provide the project scaffolding and packaging to deploy Angular, React, and Vue web front-ends as Widgets. Spring Portlet MVC app conversion to PortletMVC4Spring requires only a few steps. JSF applications work almost as-is. Portlet 3.0 or 2.0 compliant portlets deploy on Liferay DXP.
-
Back-end Java services, web services, and REST services: Service Builder is an object-relational mapper where you describe your data model in a single
xml
file. From this, you can generate the tables, a Java API for accessing your data model, and web services. On top of these, REST Builder generates OpenAPI-based REST services your client applications can call. -
Authentication and single-sign on (SSO): OAuth 2.0, OpenID Connect, and SAML are built-in and ready to go.
-
Front-end web development using Java EE and/or JavaScript: Use Java EE standard Portlet technology (JSR 168, JSR 286, JSR 362) with CDI and/or JSF. Prefer Spring? PortletMVC4Spring brings the Spring MVC Framework to Liferay. Rather have a client-side app? Write it in Angular, React, or Vue. Been using Liferay DXP for a while? Liferay MVC Portlet is better than ever.
-
Frameworks and APIs for every need: Be more productive by using Liferay’s built-in and well-tested APIs that cover often-used features like file management(upload/download), permissions, comments, out-of-process messaging, or UI elements such as data tables and item selectors. Liferay DXP offers many APIs for every need, from an entire workflow framework to a streamlined way of getting request parameters.
-
Tool freedom: Liferay provides Maven archetypes, Liferay Workspace, Gradle and Maven plugins, a Yeoman-based theme generator, and Blade CLI to integrate with any development workflow. On top of that, you can use our IntelliJ plugin or the Eclipse-based Liferay Developer Studio if you need a full-blown development environment.
-
Developer community: The Liferay DXP community is helpful and active.
Getting Started with Liferay Development
Want to see what it’s like to develop an app on Liferay DXP? Here’s a quick tour.
Create Your Object Model and Database in One Shot
You don’t need a database to work with Liferay, but if your app uses one, you
can design it and your object model at the same time with Liferay’s
object-relational mapper, Service Builder.
You define your object model in a single xml
file:
<?xml version="1.0"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 7.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_7_0_0.dtd">
<service-builder auto-namespace-tables="true" package-path="com.liferay.docs.guestbook">
<author>liferay</author>
<namespace>GB</namespace>
<entity name="Guestbook" local-service="true" remote-service="true" uuid="true">
<column name="guestbookId" primary="true" type="long" />
<column name="name" type="String" />
<finder name="Name" return-type="Collection"/>
<finder-column name="name" />
</finder>
</entity>
<entity name="Entry" local-service="true" remote-service="true" uuid="true">
<column name="entryId" primary="true" type="long" />
<column name="name" type="String" />
<column name="email" type="String" />
<column name="message" type="String" />
<column name="guestbookId" type="long" />
<finder name="Email" return-type="Collection" />
<finder-column name="email" />
</finder>
</entity>
</service-builder>
Service Builder generates your object model, database, SOAP, and JSON web services automatically. Java classes are ready for you to implement your business logic around generated CRUD operations. The web services are mapped to your business logic. If you want a REST interface, you can create one.
Create a REST Interface
REST Builder helps you define REST interfaces for your APIs, using OpenAPI/Swagger. Create your YAML definition file for your REST interface along with a configuration file defining where Java classes, a client, and tests should be generated, and you have REST endpoints ready to call your API.
Next, you need a client. You can use Liferay DXP in headless mode and write your web and mobile clients any way you want. Or you can create your web clients on Liferay’s platform and take advantage of its many tools and APIs that speed up development.
Create a Web Client
Liferay DXP is an ideal platform upon which to build a web client. Its Java EE-based technology means you can pick from the best it has to offer: Spring MVC using PortletMVC4Spring, the new backwards-compatible Portlet 3, JSF using Liferay Faces, or the venerable OSGi-based Liferay MVC Portlet. If you’re a front-end developer, deploy your Angular, React, or Vue-based front-end applications to run as widgets next to the rest of Liferay DXP’s installed applications.
Use Liferay’s Frameworks
Your apps need features. Liferay has implemented tons of common functionality you can use in your applications. The Liferay-UI tag library has tons of web components like Search Container (a sortable data table), panels, buttons, and more. Liferay’s Asset Framework can publish data from your application in context wherever users need it—as a notification, a related asset, as tagged or categorized data, or as relevant data based on a user segment. Need to provide file upload/download? Use the Documents API. Need a robust permissions system? Use Liferay permissions. Want users to submit comments? Use Liferay’s comments. Need to process data outside the request/response? Use the Message Bus.
Should users select items from a list? Use the Item Selector.
Next Steps
So what’s next? Download Liferay DXP and create your first project! Have a look at our back-end, REST Builder, and front-end docs, examine what Liferay’s frameworks have to offer, and then go create the beautiful things that only you can make.