Garden planner - switching to Clojure(Script)

I liked Clojure since the first day I met it. This week, for the first time, I went seriously far from evaluating a few expressions in the REPL.

Last week I had a first draft of the schema and I decided to do this project in Clojure, without giving much thought to how difficult it will be. I am under no illusion - this will not be an easy journey. But it will be a fun one!

So, having decided to go the Clojure route, I've done the basics - set up my local machine for Clojure development, got myself into the Clojurians slack channel, and started looking at the schema again.

The first thing I did was to convert the schema to edn instead of graphql. I will no longer be using GraphQL, because it simply doesn't make sense to me to add the additional dependencies only to operate in the Neo4J database. A friend was nice enough to open-source his Neo4J driver, so I will be using that one.

The edn format work well for me and my needs with this schema. It's also very easy to read, if indented correctly. For all things Clojure, I use the Calva extension for VSCode, which works like a charm and quickly cleans up my messy edn or parens.

Processing that schema into one that the front-end will receive, to use for generating forms, was not as hard as I had anticipated, nor as messy as I thought it would be. Keywords, combined with built-in Clojure functions, made life fairly easy. A quick pair-programming session with my better half helped with understanding some syntax issues. Yey for teamwork!

Now I gotta figure out how to send EDN formatted data through websockets - so I don't have to deal with encoding / decoding. Since the front-end is also done in Clojure, it's pointless to convert the data from one format to another. I am sure this is possible, I just need to find out how exactly to do it in my project.

A lingering issue is the representation of relations in the form schema. I should be able to make assumptions about the node label, but I'd rather not.

Front-end-wise, switching from Vue.js to Reagent is no trivial affair. I must say that I enjoy the REPL tremendously, but I miss the Vue.js Developer Tools. I guess I will just have to learn how things work in React / Reagent.

Care to share?