2022-05-18 Update

It is time for another update.

I am done for the time being editing and making changes to my site. For now I will stick with WordPress, and I will leave the old posts intact.

I have been working more with Clojure. I have not done a lot with Programming Clojure, and at some point I plan on finishing it. I need to work on learning more about Clojure and its capabilities, but I think I want to make an app, even a small one. I think it can help some of the information stick more, and after a while just doing tutorials is a slog. Granted, maybe if I kept going for a few more pages, I would read about something that would give me an idea, but for now I will look into other things. I have mentioned this in the past, but I would like to get into the Clojure rules engine Clara. (Granted, there are a lot of things I would like to do.)

I have been looking into web frameworks for Clojure. I started looking into Luminus more. I went through the first few pages of the tutorial a few years ago, but recently when I tried to run the application it did not work. So I started over. There have been a few changes. My goal was to be able to add some code to get the same results as the Rails routes for a database table. I know a lot of people like to make REST apps, but from what I have seen, when people make REST apps they add data by sending JSON requests and typing them by hand. I find this to be tedious. I went through a tutorial on Pluralsight on making web services with Go, and typing requests in Postman was a drag. This was a few years ago, and I looked at Postman again more recently for work. There were limits on what you could do with the free version. Maybe making forms on HTML pages is more work, but I was put off by Postman.

So I started going through the Luminus tutorial and taking more thorough notes. I went to the Luminus channel on the Clojurians Slack, and someone made a reference to a new framework named Kit. The developer behind Luminus (who goes by “Yogthos” online) is one of the Kit developers. I get the feeling that Kit is intended to replace Luminus. Judging by the projects’ commit histories, Yogthos seems to be spending more time on Kit than Luminus lately. He has a post on his website about Kit; he never comes out and says that Kit is replacing Luminus, but that seems to be the takeaway. Another one of the Kit developers has a post on his site here.

Also, Kit uses the Clojure CLI tools. Luminus uses Leiningen, and gives you the option to use Boot as well (which I think is a hint that Luminus will get less attention going forward than Kit). The CLI tools seemed to have killed Boot stone dead. The most recent tag in the Boot repo was on 2019-04-13. (Granted, Luminus’s most recent tag was in 2015.) I have been seeing fewer mentions of Boot since the CLI tools came out. I think CLI really took away a lot of Boot’s momentum. I am getting the feeling that CLI is also taking some mindshare from Leiningen, although this is happening more slowly since Boot was not as popular as Leiningen. It looks like CLI tools are the future.

So I have also spent some time with the CLI tools. There is a site with some Clojure tutorials called Practicalli. They have a nice page on the CLI tools and a repo with a nice deps.edn config file. For the most part it is pretty easy, but it is a drag learning something else. I am not sure I have got the hang of using CIDER with the CLI tools. I had to run the app in one terminal, and fire up Emacs in another to use CIDER. With Leiningen, I could do it all in Emacs.

Another difference is Luminus manages state with Mount, while Kit uses Integrant. I need to spend some time studying Integrant.

I then “pivoted” to Coast, a web framework that tries to be the Rails for Clojure (site here, Github repo here). It has been around for a few years. I did not look at it because it uses the CLI tools, and for a long time I was not interested in learning about CLI tools. Coast also uses make, which strikes me as odd. Right now I am intersted in making a web app in order to quickly work with data, so I thought that since I am looking into CLI tools, why not try Coast. Plus it looks like Kit is still a work in progress (the devs pretty much said that on Slack), so I will let it percolate for a while. Interesting note: I think Yogthos starting working on Kit not too long after the third edition of his book came out.

Coast uses Make for some tasks. That is make, or as cats on the internet would put it: The thing that runz ur see code. Although if you look at the Makefile, the Make commands are aliases to clj commands. So if you really wanted to stick with pure Clojure, you could just run the clj commands.

Recently there was a post on Hacker News about a new web framework for Go called Bud (Hacker News post here, Github repo here). One of the commenters told the Bud developer to try to avoid the word “framework” because a lot of people in the Go community hate the concept, even though some commenters thought that frameworks are useful. When I was in The Starter League, one of the instructors said he liked to handle sessions and authentication himself. I never understood this mentality. A lot of web apps are going to have common needs: handling sessions, routes, authentication, authorization, database connections. What you usually care about is what comes after. I would like to make some pages so I can create data so I can look into a rules engine.

I think you are more likely to make changes to an existing app than build one from scratch. So score one for the framework crowd. Plus, whether the anti-framework people like it or not, this question will come up until there is an answer. I bet nobody looks at Ruby and asks how to write a web app in Ruby.

Image from an 11th century manuscript known as Dionysiou 587, created and housed at the Monastery Agios Dionisiou on Mount Athos, assumed allowed under Public Domain.

1 thought on “2022-05-18 Update”

Comments are closed.

There are 1130 words in this article.