Extensible Effects: Rimmel's take on a new hot design pattern #28
dariomannu
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We've been working to bring Extensible Effects to Rimmel using a new, creative take: HTML.
If you're not familiar with them, Extensible Effects are a really hot design pattern coming from Haskell in which applications don't perform and don't import effectful functionality: they only declare effects.
This is effectively an alternative to Dependency Injection, arguably more ergonomical and easier to implement.
The framework should provide some "actuator code" that will interpret these effect decalarations and execute them.
One of the hottest ideas we had for Rimmel is to use the same HTML/RML templates we already use to declare all effects, including "ambient effects" (those that are not related to a given component, but are global, like window.onload, etc).
For this purpose, we can define and use custom elements and use the standard Observable/Observer bindings we already use for sources and sinks.
Cons: this can feel like an abuse of custom elements, as we'd be using them for what could be seen as a slightly different purpose... or maybe not?
We're looking for feedback!
Beta Was this translation helpful? Give feedback.
All reactions