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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Pure Headless vs Hybrid Headless CMS: A Practical Decision Framework
  • Strapi v5: Customization Nuances
  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Build a REST API With Just 2 Classes in Java and Quarkus

Trending

  • Idempotency Under Concurrency: Why Your Application Check Isn't the Last Line of Defense
  • Build Software Faster With Three Simple Principles
  • Building a Practical Cloud-Native Golden Path: A Guide to Kubernetes-Based Service Delivery, Self-Service, and Developer-Friendly Defaults
  • Detection and Response Did Its Job. Now Someone Has to Actually Fix It.

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  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
·
Mar. 14, 19 · Analysis
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
15.6K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

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

  • Pure Headless vs Hybrid Headless CMS: A Practical Decision Framework
  • Strapi v5: Customization Nuances
  • Graceful Shutdown: Spring Framework vs Golang Web Services
  • Build a REST API With Just 2 Classes in Java and Quarkus

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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