Overview This guide walks through creating two OSGi modules in Liferay 7.4 and sharing a Java package between them using the standard API + Implementation pattern. This is the most common and correct approach for exposing reusable services in a Liferay-based architecture. In OSGi, a bundle (module) does not expose its internal packages by default — everything is private unless explicitly exported. To share code between modules, the standard practice is to split functionality into: · An API module — contains interfaces/DTOs and exports the package · A Service (Implementation) module — implements the interface, imports the package, and registers the implementation as an OSGi component/service The consuming module then simply imports the API package and looks up the service using @Reference injection. Step 1: Create the API Module Using Liferay Workspace + Blade CLI, generate a new API module: blade create -t api -p com.sgc.greeting greeting-api This generates a Gradle module unde...
Liferay Objects in 7.4: Build Full Applications Without Coding Meta Description: Learn how to use Liferay Objects in 7.4 to build full-stack applications without Service Builder. Step-by-step guide with real examples. Keywords: Liferay Objects, Liferay 7.4, Liferay tutorial, Liferay API, Liferay development, low code platform 🚀 Introduction If you have worked with Liferay earlier, you probably remember the pain of Service Builder—writing XML, generating code, deploying modules, and managing OSGi. In my experience working on Liferay-based portals , even a simple CRUD feature used to take hours or sometimes days. But with Liferay 7.4, everything changed. Liferay Objects is a powerful low-code feature that allows you to create database entities, APIs, and UI directly from the browser—without writing backend code. --- 📌 What are Liferay Objects? Liferay Objects allow you to build applications directly from the Control Panel UI. Create database tables Define re...