new design post about membrane, https://blog.phronemophobic.com/reusable-ui-components.html . I would love feedback before I try to share it more widely: • what doesn't make sense? • what seems superfluous? • does anything need more explanation?
Quick thought as I scan through. I'm preloaded with re-frame assumptions so might be making incorrect assumptions. 1. calling get-count an effect seems confusing. I think of effects as changing the world. (I'll go back and read the other two posts, perhaps that's covered)
(at some point down the line it'd be interesting to compare/contrast with the react model approach)
that's a good point
I'm not sure there's a better name than "effect", but get-count
isn't pure or referentially transparent. it may (and probably will) return different values on separate calls
I wonder if a post that just does compare and contrast between different frameworks would be interesting
Not sure I have a clear thought but I'll keep it in mind.
(was going to compare with FSM but not sure it's a perfect analog. re-frame has related concepts)
Personally I like that idea and wish more maintainers did it. Sort of risky if you're less familiar with the other project - possibly someone close to re-frame might like to pair blog something.
You do tend to see comparisons in project READMEs which contrast related work.
e.g. https://github.com/tonsky/datascript#differences-from-datomic
Really interested in what you're doing.
get-count observes, it's sort of an output.
I guess I was thinking of the effect handler as a public API for an application
Yep, makes sense as an API.
I'm curious to look more closely about how the UI knows it needs to update. I'm familiar with r/atom and views which subscribe - a system which faciliates "recording" watchers of atoms and triggering view refreshing. Not immediately seeing something similar.
(I have to dash soon, but keep up the good work!)
the idea is the refresh strategy would be an independent decision. the strategy that's currently implemented is based on memoization. since everything receives and returns values, it generally works well and components aren't recalculated unless the arguments to the component have changed.