Dueuno Elements #1 — First application in 3 steps
DISCLAIMER: DUEUNO ELEMENTS IS NOT THE PERFECT SOFTWARE YOU DREAM. THE WORLD IS NOT THE PERFECT EXPERIENCE YOU DREAM. IT’S NOT MY FAULT, IT’S NOT YOUR FAULT AND IT WORKED PRETTY WELL FOR CENTURIES SO I GUESS WE CAN TAKE A DEEP BREATH AND KEEP WALKING.
I love Philosophy. I could write thousands of words about Dueuno Elements but there’s another thing I love: Practice.
So let’s write our first Dueuno Elements application, shall we?
ATTENTION PLEASE: If you are a seasoned developer or you’re in a hurry, install Java 17, go download the Dueuno Elements Template Application, run it with
./gradlew bootRun
and these are your three steps.
STEP 1 — Forge a new Grails application
Dueuno Elements is built on top of Java 17 and the beautiful Apache Groovy & Grails Framework. The Grails website gives us what we need to quickly start up with a “blank” application project.
- Download and install Java 17
- Go here: https://start.grails.org
- Select “Java 17” — SELECT JAVA 17 (We only support Java 17. I know, life is not fair)
- Click “Generate Project”
- Download the “demo.zip” file and uncompress it on your home folder
STEP 2 — Add the Dueuno Elements dependency
Edit
~/demo/build.gradle
Find the dependencies
section and add the following line:
...
dependencies {
...
implementation 'org.dueuno:elements-core:2.1.1'
}
Edit
~/demo/grails-app/init/BootStrap.groovy
and copy the following code:
package com.example
import dueuno.elements.core.ApplicationService
class BootStrap {
ApplicationService applicationService
def init = { servletContext ->
applicationService.init {
// It's fine to leave this empty at the moment
}
}
def destroy = {
}
}
Delete
~/demo/grails-app/controllers/UrlMappings.groovy
STEP 3 — Run the application
Execute
./gradlew bootRun
Open the displayed URL: http://localhost:8080
ATTENTION PLEASE: The first time you run the application a lot of dependencies will be downloaded so go get something to drink or play Tetris. I love playing Tetris.
With a bit of luck, at this point you should be able to see something on the screen. You can login with the following username/password
:
super/super
This is the Superuser, it has full power on the system. You can create new tenants, configure the system properties and monitor the whole application.admin/admin
This is the DEFAULT Tenant Administrator. It can configure the tenant properties, manage groups, users and watch audit logs.
We can now play around with the basics of a Dueuno Elements application. When done, we can terminate the application pressing CTRL + C
.
Conclusions
If you’ve reached this point and you successfully run the application you should subscribe and stay tuned.