Abstract Clojure
juxt.pro
Abstract Clojure
1–10 of 43 posts
Re: Abstract Clojure
#2I actually feel like I understand everything that happens in the system now, and when problems arise I can REPL in and hunt them down with confidence.
Though I don’t use Clojure professionally, I’ve definitely become a better developer just from playing with it, a contrast to JavaScript where I feel like learning it actually lowered my iq…
Re: Abstract Clojure
#3Re: Abstract Clojure
#4Having a protocol for your data layer and an in memory implementation of that for testing can make sense, especially when your real data store is expensive to bring up, but I would try to minimize the number of seams like this in my system. Each one introduces cognitive overhead due to indirection, so you should use them judiciously.
Re: Abstract Clojure
#5That seems like a huge loss. I feel like that approach could be great for business logic maybe? There's the "business logic as a library" technique that works well for this, and allows for easy testing.
Re: Abstract Clojure
#6> One of the trade-offs with this approach is that it results in additional wiring; functions must be passed their dependencies and wired together to form a system. The indirection means we can no longer jump to the definition of get-article-by-id in the server namespace. That seems like a huge loss. I feel like that approach could be great for business logic maybe? There's the "business logic as a library" technique…
Re: Abstract Clojure
#7Clojure is such a practical language.
Re: Abstract Clojure
#8I'm not sure I agree here. There's not too much value in testing these two or three lines of code in the get-article handler. And the passing around of compositions of higher order functions can get confusing. There are cases where an approach like this is warranted but I would say that there needs to be a significant level of complexity before this makes sense. Having a protocol for your data layer and an in memory…