Skip to content

BlackBeltTechnology/judo-community

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A low-code development toolbox optimized for creating and operating enterprise applications.

License Discord Documentation

What is low-code?

Simply put, low-code development is a paradigm that uses models as the primary artifact of the development process, and the implementation is (semi-)automatically generated from the models.

Target audience

JUDO is designed for Java developers who want to speed up their work and focus on business needs instead of typing architectural glue code and copying design patterns.

System Requirements

JDK 11

The JUDO platform is developed and tested against OpenJDK 11. Our recommended vendor is Zulu JDK

Checking your JDK version:

java -version

Which should display something similar to:

openjdk version "11.0.16" 2022-07-19 LTS
OpenJDK Runtime Environment Zulu11.58+15-CA (build 11.0.16+8-LTS)
...

The key here the version number, which in our case is: 11.0.16. The version number should start with 11, however the gerenerated code and applications could run on more current JDK versions.

Maven 3.8.x

Our project orchestrator and build tool is Apache Maven v3.8.x.

Checking your Maven version:

mvn -version

Which should display something similar to:

Apache Maven 3.8.6
Maven home: /usr/share/maven
...

The key here is again, the version number, which in our case is: 3.8.6. The version number MUST start with 3.8!

Getting started

Bootstrap a project from an archetype

Open your terminal, and go to a folder where you would like the archetype to generate your project under (e.g.: ~/projects/).

Running the following command generates a Spring Boot project with a test model and a simple integration test:

mvn org.apache.maven.plugins:maven-archetype-plugin:3.1.1:generate -B \
  -DarchetypeGroupId=hu.blackbelt.judo.jsl \
  -DarchetypeArtifactId=judo-jsl-springboot-archetype \
  -DarchetypeVersion=1.0.3 \
  -DgroupId=com.example \
  -DmodelName=Test

For detailed documentation on the Archetype, please visit the judo-jsl-springboot-archetype repository

Once the archetype has finished generating sources, your project should be available under ~/projects/com.example.Test

Running mvn clean install under your project will run the build and tests as well. If you haven’t modified anything, the process should finish without any errors.

Bootstrapped sources

application.properties

Located under: src/main/resources

This is a standard Spring Boot resource which by default is generated to utilize HSQL Database (we support PostgreSQL as well).

spring.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver
spring.datasource.url=jdbc:hsqldb:mem:testdb;DB_CLOSE_DELAY=-1
spring.datasource.username=sa
spring.datasource.password=
spring.liquibase.change-log=classpath:model/Test-liquibase_hsqldb.changelog.xml
judo.modelName=Test

Test.jsl

Located under: src/main/resources/model

The model defines a custom type named String, an entity Person which - for the sake of having fun - also has a derived attribute called fullName.

model Test;

type string String(min-size = 0, max-size = 128);

entity Person {
    field String firstName;
    field String lastName;
    derived String fullName => self.firstName + " " + self.lastName;
}

TestSpringApplication.java

Located under: src/main/java/com/example/test

This is the entry point of a bare-bones Spring Boot Application similar to what you’d get if you’d have used the start.spring.io generator

TestSpringApplicationTests.java

Located under: src/test/java/com/example/test

package com.example.test;

import com.example.test.test.sdk.test.test.Person;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.Optional;

import static org.junit.jupiter.api.Assertions.assertEquals;

@SpringBootTest
class TestSpringApplicationTests {
    @Autowired
    Person.PersonDao personDao;

    @Test
    void testDaoFunctions() {
        Person createdPerson = personDao.create(Person.builder()
                .withFirstName("FirstName")
                .withLastName("LastName")
                .build());

        assertEquals(Optional.of("FirstName"), createdPerson.getFirstName());
        assertEquals(Optional.of("LastName"), createdPerson.getLastName());
        // Test derived
        assertEquals(Optional.of("FirstName LastName"), createdPerson.getFullName());
    }
}

Documentation

Our official documentation page can be found at https://documentation.judo.technology.

Questions

For questions and support please use the official Discord channel. The issue list of this repo is exclusively for bug reports and feature requests.

Issues

For issue submission, please follow the guidelines displayed under each issue category.

Please keep in mind that this repository is only an aggregator, therefore if you have a specific problem / idea / suggestion for a certain sub-repo, then it is encouraged to open the ticket there.

Contributing to JUDO

Everyone is welcome to contribute to JUDO! As a starter, please read the corresponding CONTRIBUTING guide for details!

License

JUDO Community modules are licensed under the Eclipse Public License - v 2.0.