Single Page Apps by Default

Being the Thoughtworks/Martin Fowler fan (read: apologist) that I am, I like to check out their Technology Radar. One item caught my eye a while back, a hold on “SPA by default”, in particular this section:

Indeed, we've started to notice that many newer developers aren't even aware of an alternative approach, as they've spent their entire career in a framework like React

One thing I can definitely say from an attempt at a SAAS product is that I spent way too much time tinkering with React in my Rails application. Part of that time was spent building frameworks around Opal that I did not need early on. That’s not React’s fault or the SPA community’s fault. That said, some of that “framework activity” involved common SPA challenges like duplicate business logic on the client and server side and my attempts to smooth some of that over with serialization and isomorphic code.

Having gone through that experience, I would probably avoid any SPA framework for a general application initially and rely on something like Hotwire or Phoenix LiveView to get productive initially as fast as possible. At that stage, moving quickly with something that works and has minimal pieces to maintain is important. Later on, if that product became viable and had a much bigger team with richer UI requirements, introducing an SPA, with a front-end team, might be in order.

Brady Wied