Fork me on GitHub
#architecture
<
2020-10-28
>
Shantanu Kumar20:10:50

Hi, does anybody know of a non-trivial Clojure codebase implemented using the “Functional Core, Imperative Shell” https://www.destroyallsoftware.com/screencasts/catalog/functional-core-imperative-shell approach?

Jivago Alves01:10:21

@U066J7E2U I talked about it (between other things) in this presentation https://youtu.be/4M7u2qyyAQ8 . The example I used is very simple but I was hoping to make it simpler to grasp the idea. Code is at https://github.com/jivagoalves/codebreaker Hope it's helpful.

simongray08:10:57

I would say that any Re-frame code base would approximate this paradigm quite well.

simongray08:10:33

That basically is the paradigm of Re-frame.

Ivan08:10:06

I don't remember if it's spelled, but it's the same thing https://www.youtube.com/watch?v=0EX3UIl-Sd8

Shantanu Kumar08:10:50

@U4P4NREBY @U8ZE1VBSS You mean, FRP is much like FC-IS?

Ivan08:10:22

my post is not about re-frame or FRP, it's about a presentation on how the functinal-core/imperative-shell (or "clean architecture") can be implemented, starting with clojure-spec in the center to define the domain, out to the supporting services that cause side-effects. ..still, not an actual non-trivial Clojure codebase - thought, tbh, I would be interested in that in any language

simongray08:10:36

I didn’t mention FRP, I mentioned Re-frame…? I guess it has elements of FRP too, but I don’t see how that is relevant here. The thing Re-frame does well is nudging developers to mostly use pure functions for almost all application logic (events) and prefer dumb presentation components (form-1 reagent components). All side-effecting code is isolated into effects and all input that is not under your control is isolated into coeffects. The rest of a Re-frame codebase is pure.

Shantanu Kumar08:10:30

@U8ZE1VBSS @U4P4NREBY Thank for clarifying - I don’t have much exposure to Reframe. Will go through the linked resources.

Shantanu Kumar21:11:04

I found it interesting where the speaker talks about moving between effects and normal (pure) worlds: https://www.youtube.com/watch?v=Nrp_LZ-XGsY&amp;t=1624s

👍 2