Val on Programming: Some re-frame patterns for composability

submited by
Style Pass
2022-01-14 16:00:11

This article proposes some strategies for making re-frame codebases more maintainable, chiefly by making components and events more reusable. The main idea is to enable customization by callers, by allowing callers to inject events, subscriptions, app-db paths and even callback functions as arguments. This approach is not conceptually difficult, but we found it unintuitive when we started using re-frame.

We have been using these patterns over the course of 1.5 years at Ytems (an accounting platforms for accountants focused on independent contractors), for implementing the back-office of accountants, a re-frame networked browser app requiring advanced ergonomics for viewing, searching and editing accounting records, related information, and account customization.

This article hopes to foster consideration and criticism of the suggested patterns. It might also serve to outline some consequences and limitations of re-frame's design.

Leave a Comment