News for hackers. Stuff that matters.
Re:The Re-Frame Guide: Front-End Architecture in Clojure by yogthos on Sunday July 09, 2017 @12:35AM (#14728387)
My team has been using Clojure for about 6 years now, but we only started introducing ClojureScript last year. Figwheel and Reagent workflow was what sold us on it.
Re:The Re-Frame Guide: Front-End Architecture in Clojure by likeclockwork on Sunday July 09, 2017 @02:04AM (#14728580)
I notice that you recommend figwheel a lot, I wanted to ask you: Have you ever tried the boot tooling (boot-cljs, boot-cljs-repl, and boot-reload) and if so do you have any opinion on it vs leiningen+figwheel?

So far I've personally found boot a lot easier to work with than leiningen and the cljs repl is easier to get going and integrated with CIDER.

Re:The Re-Frame Guide: Front-End Architecture in Clojure by yogthos on Monday July 10, 2017 @11:29AM (#14736808)
I have very little experience using boot. The main benefit of Figwheel is that it allows you to retain the state while hot loading code. I find this makes a really big difference when working on complex UIs. I can get the application in a particular state, and then tweak the UI in that context.

There's a https://github.com/boot-clj/boot-figreload plugin that adapts Figwheel for boot, but I haven't used it myself.

Re:The Re-Frame Guide: Front-End Architecture in Clojure by likeclockwork on Tuesday July 11, 2017 @12:59AM (#14741673)
Ah, I was just wondering if you had experience there.

boot-reload[0] replicates everything figwheel does in terms of hot reloading the cljs. I started using boot because I wanted better tooling for cljs, which I think it provides. I wanted to ask if you had any experience with it because I know you have a lot of experience with cljs and was wondering if you had any insight into potential hidden costs.

I agree that hot reloading is a huge upgrade over the old workflow, it saves so much time.

0: https://github.com/adzerk-oss/boot-reload

Re:The Re-Frame Guide: Front-End Architecture in Clojure by yogthos on Tuesday July 11, 2017 @03:50PM (#14747400)
Ah I see, and yeah I haven't really used boot since I already got comfortable with lein by the time it came out. It sounds like they both work pretty well nowadays though.
Re:The Re-Frame Guide: Front-End Architecture in Clojure by bpicolo on Sunday July 09, 2017 @11:41AM (#14730222)
The main thing preventing me from using Clojure on the backend has been that db libs (pgsql, mysql) seem to not be under particularly active maintenance/development, which also feels at least somewhat true for other libs in the ecosystem. HugSQL as recommended by Luminus hasn't seen any development in the last year. What's been your experience here?
Re:The Re-Frame Guide: Front-End Architecture in Clojure by yogthos on Monday July 10, 2017 @11:38AM (#14736901)
All the heavy lifting is done by the JDBC drivers implemented in Java. These are mature and very stable. Clojure libraries wrapping these drivers simply provide a more idiomatic API to them.

I'm not sure which db libs you've looked at, but the most used one is https://github.com/clojure/java.jdbc and it's just a wrapper for the Java JDBC API. The Postgres/MySQL connections are managed by the official org.postgresql/postgresql and mysql/mysql-connector-java driver libraries.

HugSQL hasn't seen much development, because it works well. I'm using it in all my projects, and it's been working perfectly for me. The library has a fixed feature set, which is taking SQL templates and generating functions that make JDBC calls based on them. Now that it's feature complete, the only time you'd see changes would be if the underlying API changed, or for a bugfix. The last commit actually happened 28 days ago, and it was a bump in dependencies.

Just because the repo isn't active is not an indication that the library is abandoned. My experience with Clojure libraries, is that this is usually an indication that the library works well and most bugs have been ironed out. Looking through the issues is generally a better approach of checking the health of the project I find.

If stability of database connection libraries has been your concern, I can assure you that it's misplaced.

Re:The Re-Frame Guide: Front-End Architecture in Clojure by bpicolo on Monday July 10, 2017 @12:00PM (#14737104)
Thanks for the reply! What would you recommend if I wanted something with a query-builder style API? In my head it seems like clojure would be a really great fit for that as a modular way to build statements.
Re:The Re-Frame Guide: Front-End Architecture in Clojure by yogthos on Monday July 10, 2017 @04:34PM (#14739400)
I would recommend taking a look at https://github.com/jkk/honeysql that uses Clojure data structures to represent SQL statements. It's similar idea to Hiccup for HTML.