Use JVM web frameworks in ABCL and launch via Gradle as a benefit for modern devops.
This is contains:
- an abcl launcher for gradle for abcl
- a working gretty target as a way to launch web services, launched via gradle
- a working jooby netty example running on abcl, launched via gradle
- Original blog post to inspire Jooby-Netty: https://notes.eatonphil.com/practical-common-lisp-on-the-jvm.html
- associated code from blog: https://github.com/eatonphil/jvm-lisp-examples/blob/main/README.md
- Gretty is described here: https://akhikhl.github.io/gretty-doc/Getting-started.html
- Blow: https://github.com/atgreen/blow
- Jooby Netty: https://github.com/jooby-project/jooby
- ningle https://github.com/fukamachi/ningle
Note, the repo here was modified to fix the outdated code. This will eventually be shared in its own project. specifically, the Wicket-convert-to-Gradle for a template to build and run Jetty / Wicket applications via Gradle. Also Blow just for inspiration to use ABCL to create web apps in Lisp on top of jetty and abcl. And the jvm-lisp-examples for a real example of another JVM based web framework example jooby netty written in Lisp.
This POC is based on https://github.com/harry0000/Wicket-convert-to-Gradle. It was fixed and converted to work in modern times.
This is an old piece of software. It needs a lot of things to modernize and finish the ideas. I can't really fork this as is. It is a rewrite, but I want to give credit to this project. So I will do an anlysis of the design, and what needs to modernize.
Off the top:
- a Makefile: convert to gradle in the poc1 dir. It only serves to make a package. No make needed.
- blow.spec : the build for Common Lisp code
- blow : a magic shell script to generate a blow project ... don't really need it. Use git clone and a special gradle target if needed
- app dir: contains sources, web-inf, js libs
- bin: just has a start script, this is replaced by a gradle target
So the first big lift is:
- get the dependencies as they are, into gradle
- see if it can build/run
Second big lift:
- evaluate effort to upgrade existing dependencies to new things
Third big lift:
- document what is actually implemented in blow or not
- start a rewrite in modern common lisp / ABCL
General directory structure of a blow project: ├── app This is your web application directory. └── bin Contains useful scripts.
Once a new framework is done, let's call it cl-spice. If I get this far...
- Bootstrap abcl with gradle as a prototype
- Look at abcl with modern Wicket
- Look at abcl with jooby ...
- Look at webmachine and forget about using gradle unless there is a way to bootstrap webmachine from gradle.
- Look at ningle and just use it
Blow is one fo the most interesting projects I've seen, simply because it combines the devops/enterprise friendliness of Java with Common Lisp, in a web framework. It uses ABCL, however, the code base is ancient and the makefile should be replaced with gradle.
Wicket is an older web framework that is promoting ideas that are not unlike those found in HTMX. This makes it interesting to maybe see if it can be used.
- gradlew (to pull your gradle)
- gradlew tasks (to list the tasks)
- gradlew jettyRun (run your configured web application on jetty)
- gradlew runLispEatonNetty (run the jooby-netty example)
- gradlew runLispScript (run the a hello world example)
- Since this runs from ABCL via gradle, there is some work to set up paths so that you can find the path to the html template.
- Finish porting a version of Blow to modernized Lisp and gradle bootstrap
- Finish a Wicket example written in Lisp, similar to the Jooby Netty