Fork me on GitHub
#clojure-uk
<
2022-04-27
>
paulspencerwilliams17:04:10

So I've got a question about a side project I've been playing around with for sometime. It's a todo app for photographic subjects with tasks such as "shoot this hill on a day with clear sky, dry, frosty and I'll need my wide angle lens, tripod, and polarising filter". I've had a couple of attempts at writing it using full stacks (ELM + Phoenix and Re-Frame / Clojure backend) and I've gotten bogged down typically with front end concerns, the need for auth etc. I want to prove my model by trying another attempt, but keep things simpler. I was thinking of developing some kind of REPL UI which would support a few key functions add-idea, update-idea , suggest-ideas . However, it would need some kind of autocomplete for weather conditions, my camera gear and similar dynamic lists of values. I'm wondering whether such a REPL UI or similar would indeed be simpler to develop than a web version? If, so, can anyone recommend any good resources, libraries etc that I should investigate to support this hopefully small project?

dominicm18:04:03

It could, if you do it right ๐Ÿ˜œ

dominicm18:04:28

Ok, so, simplest version of this. Do you care about going back and forth forms?

dominicm18:04:53

If not, I'd use a shell script with fzf to prompt for the inputs one at a time and then make a curl request

Aron18:04:49

what is repl ui

dominicm18:04:15

Presumably just an interface driven from the repl.

dominicm18:04:37

But I'm assuming it really means "minimal UI" or "Dev UI"

Aron18:04:32

having a CLI first approach is certainly one way to do it

paulspencerwilliams18:04:55

It's the simplest UI I can develop that allows me to conveniently call a set of functions, similar to a Clojure REPL.

Aron18:04:00

how much simpler, not sure, web ui is not difficult ๐Ÿ˜„

paulspencerwilliams18:04:01

I agree that Web UI isn't difficult, and it typically uses more mature tooling etc. However, there's definitely a lot of incidental complexity.

paulspencerwilliams18:04:22

At this moment, I just want to prove my model by adding a few hundred items over a few months.

Aron18:04:50

Personally, I always said that most of the complexity is in the "network layer", not in FE or BE

paulspencerwilliams18:04:03

But starting a local web app just to add one item as I read a photographic magazine is a PITA.

paulspencerwilliams18:04:20

Deploying a web app so I don't have to start it each time (Heroku etc) needs authentication.

paulspencerwilliams18:04:32

I've enjoyed learning various technologies previously, but end up yak shaving something or other, so thought a constrained CLI might keep me on track.

paulspencerwilliams18:04:38

@U09LZR36F your suggestion sounds plausible. I'd not heard of fzf but that's the kind of I was thinking off, although it would be nice if I was coding in Clojure. Suppose Babashka could work..

Aron18:04:45

bunch of things are not clear for me. Is this something you want to share with others, is this something where the data needs to go through the internet, is this something where you want to do something with the data later, or can be forgotten after the task was completed?

dominicm18:04:23

@U064B4L0K you can call fzf from clojure using ProcessBuilder, no problem.

dominicm18:04:53

Babashka also has ProcessBuilder, so it's a perfectly good candidate too

paulspencerwilliams18:04:46

@aron it's not to be shared with others, at least this iteration. If I find the model works really well, and demonstrate it to photographers at my local club, I might redevelop as a fully blown web app. But there's lots of ifs in that.

paulspencerwilliams18:04:11

@U0VQ4N5EE however, I would want the data to be persistent for a long time - I'd hope it would support my photography for decades if it works well enough.

Aron18:04:45

yea, I am with dominicm on this, unsurprisingly ๐Ÿ™‚ UI is for people who need to be convinced to use it, has to be easy and convenient

paulspencerwilliams18:04:51

And just because a task is done, doesn't mean I don't want to do it again. Imagine taking a great shot of a mountain, ticking it off, and then even better conditions occur later.

paulspencerwilliams18:04:24

Yeah, I don't need to convince others of it being a 'fully built' solution. It's mainly to support me, but demonstrating the conceptually ability to friendly devs would be sufficient to gain feedback if I did ever want to productise it.

Aron18:04:33

if you can do it, and looks like you can, with just a couple scripts from CLI, that is a great way to prototype the more difficult parts

dominicm18:04:37

https://github.com/lotabout/skim has more features, if you want a slightly more complicated UI. The interactive mode in particular.

๐Ÿ”– 1
Aron18:04:41

and from my experience, it's much easier to build a UI over established stuff

dominicm18:04:02

I'm excited to hear about how you get on with this approach

paulspencerwilliams18:04:44

Yeah, I'll try and blog about it.

paulspencerwilliams18:04:25

Cheers for the input guys. I'm going to do some digging and thinking.

maleghast08:04:22

I am coming late to this, but if you are prepared to use Cljs, you may want to take a look at NBB and the Node Library Inquirer. There's a good video that inspired me to work on my own CLI app (as an exercise rather than an app I am going to actively use admittedly) The README on my little project has the link to the video... https://github.com/maleghast/birthdayman-sqlite

maleghast08:04:06

(I still need to return to this to properly package it for NPM, but the source might be of help to you..?)

paulspencerwilliams09:04:58

Oh cheers, I will dig into this!

๐Ÿ‘ 1
maleghast09:04:10

Happy to pay it forward - Michiel (@U04V15CAJ) really helped me out when I was stuck (and being a dreadful n00b when it came to nodeJS and differences)