Fork me on GitHub
#membrane
<
2021-01-30
>
phronmophobic19:01:53

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?

Oliver George21:01:33

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)

Oliver George21:01:09

(at some point down the line it'd be interesting to compare/contrast with the react model approach)

phronmophobic21:01:56

I wonder if a post that just does compare and contrast between different frameworks would be interesting

Oliver George21:01:59

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.

👍 3
Oliver George21:01:17

You do tend to see comparisons in project READMEs which contrast related work.

phronmophobic21:01:37

that's a good point

phronmophobic21:01:28

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

Oliver George21:01:33

Not sure I have a clear thought but I'll keep it in mind.

Oliver George21:01:04

(was going to compare with FSM but not sure it's a perfect analog. re-frame has related concepts)

Oliver George21:01:58

Really interested in what you're doing.

Oliver George21:01:51

get-count observes, it's sort of an output.

phronmophobic21:01:04

I guess I was thinking of the effect handler as a public API for an application

Oliver George21:01:51

Yep, makes sense as an API.

Oliver George21:01:13

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.

Oliver George21:01:32

(I have to dash soon, but keep up the good work!)

phronmophobic21:01:12

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.

👍 3