• ☆ Yσɠƚԋσʂ ☆@lemmygrad.mlOP
    link
    fedilink
    arrow-up
    4
    ·
    2 days ago

    I ended up incorporating this pattern into a project at one of my jobs a while back, and fell in love with it ever since. I was working at a startup, and their requirements kept changing every few months. It became really painful to add and remove features after a while, and I was like I need to come up with a way to stay sane doing it. So, I started thinking about ways to compartmentalize things, and settled on this idea. It mades things a lot more manageable because I could come back to some code I’ve written months ago, and just look at the data flow and then figure out how it needs to be rearranged without having to relearn the details of the codebase.

    It is a bit of effort to move existing logic over to this pattern though because you really have to make sure each component is context free. If you have an app with a bunch of shared state already, pulling that apart is a big effort that’s hard to justify.

    • Che's Motorcycle@lemmygrad.ml
      link
      fedilink
      arrow-up
      3
      ·
      2 days ago

      Nice! Glad to hear this has been battle tested, haha. I’m part of a big team on my current project, and it’s just been released (well, disabled by a feature flag for now). May not be the ideal candidate for trying this out, but here’s hoping I can when the next thing comes up.