clojuredesign-podcast

Discussions around the Functional Design in Clojure podcast - https://clojuredesign.club/
nate 2019-07-19T03:51:17.033400Z

Checking out the code now.

nate 2019-07-19T03:56:05.034200Z

What we usually do is have the fake switch out happen on the server side.

nate 2019-07-19T04:03:36.035400Z

We use component to stitch together our applications, using code something like this:

(defn new-system
  [config]
  (let [{:keys [fake-mode]} config]
    (component/system-map
      :twitter (if fake-mode (fake-twitter/component config) (twitter/component config))
      :poster (component/using (poster/component config) [:twitter])
      :web (component/using (web/component config) [:poster]))))

nate 2019-07-19T04:03:51.035700Z

Then the frontend always connects to the server

nate 2019-07-19T04:04:27.036300Z

Switching things out for fake data on the frontend is a neat idea, though

nate 2019-07-19T04:04:44.036800Z

It would let you rev on the frontend without having the backend present at all

nate 2019-07-19T04:08:25.037300Z

Thanks for sharing the code, let me know if you have any other questions

nate 2019-07-19T04:08:50.037800Z

And thank you for your kind words, I'm super happy to be part of something that's useful

genekim 2019-07-19T18:06:54.038800Z

🤯🤯 So awesome!!! Thank you!!! I'll study this later today and let you know how it works out! @nate

👍 1