DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Strapi v5: Customization Nuances
  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Build a REST API With Just 2 Classes in Java and Quarkus
  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices

Trending

  • Multi-Scale Feature Learning in CNN and U-Net Architectures
  • S3 Vectors: How to Build a RAG Without a Vector Database
  • Build Self-Managing Data Pipelines With an LLM Agent
  • The Hidden Bottlenecks That Break Microservices in Production
  1. DZone
  2. Coding
  3. Frameworks
  4. Learn How to Rapidly Create a Customized CMS with this Java Framework!

Learn How to Rapidly Create a Customized CMS with this Java Framework!

A look at how this CMS allows you to focus on one thing and one thing only, the definition of your own domain.

By 
Ryan Susana user avatar
Ryan Susana
·
Mar. 14, 19 · Analysis
Likes (8)
Comment
Save
Tweet
Share
15.4K Views

Join the DZone community and get the full member experience.

Join For Free

Over the years of being a freelance developer for small to medium businesses, there has been one constant, CRUD applications. They usually consisted of some sort of ‘backend’ that handled the content of an app or website.

Well, for a website, the solution is easy; Wordpress, or maybe Joomla?

Well what, about apps? Back to square one...

I Present to You, Elepy.

Elepy (also on GitHub) is an open-source Headless Content Management Framework for Java and Kotlin. The framework comes bundled with an Admin Control Panel that lets you easily control your content.

The framework lets you focus on one thing and one thing only, the definition of your own domain.

Don’t Believe Me? Just Watch!

Creation of a content type is as easy as annotating the POJOs that define your domain.

import com.elepy.annotations.*;
import com.elepy.models.TextType;

@RestModel(slug = "/products", name = "Name")
public class Product {

    @Identifier
    private String id;

    @Number(minimum = 0)
    private BigDecimal price;

    @Unique
    @Searchable
    private String name;

    @DateTime(maxDate = "2050-01-01")
    private Date expirationDate;

    @Text(TextType.TEXTAREA)
    private String shortDescription;

    @Text(TextType.HTML)
    @PrettyName("This is a detailed description of the Product")
    private String longDescription;


    // Getters and setters. I like to use Project Lombok to automate this :D

}


What about the Database?

Well by default, Elepy uses MongoDB, but provides support for the different flavors of SQL through a Hibernate/JPA extension.

import com.elepy.Elepy;
import com.elepy.admin.ElepyAdminPanel;
import com.mongodb.DB;
import com.mongodb.MongoClient;

public class Main {

    public static void main(String[] args) {

        MongoClient mongoClient = someMongoClientWithConfiguration; // Configure your MongoClient
        DB exampleDB = mongoClient.getDB("example1");

        new Elepy()
                .connectDB(exampleDB)
                .onPort(7777)
                .addModel(Product.class)
                .addExtension(new ElepyAdminPanel())

                //Start Elepy!
                .start();
    }

}

Well, What Now?

That’s it, you just created a CMS!

By navigating to http://localhost:7777/admin, you can log in and administrate your content. Username and Password (in version 1): admin

What Else Can Elepy Do?

Well, it’s a long list. A growing list, because Elepy 2 is under construction! To name a few features: pagination, searching, sorting, and 25+ annotations.

But the true beauty of Elepy lies in its customizability and extendability. It has an entire plugin/module ecosystem, a dependency injection micro-framework, and a routing micro-framework that you can make use of. The best part is that every part of the framework can be extended or replaced. Everything from the presentation to the data access layer.

Keep Up With Elepy

  • Find documentation on https://elepy.com and https://docs.elepy.com
  • (please) Star, follow and contribute to the project on GitHub
  • Google Slides: The Elepy Presentation
  • Elepy Example Repo
Content management system Framework Java (programming language)

Opinions expressed by DZone contributors are their own.

Related

  • Strapi v5: Customization Nuances
  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Build a REST API With Just 2 Classes in Java and Quarkus
  • Dropwizard vs. Micronaut: Unpacking the Best Framework for Microservices

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook