Designing Around Client Logic & Patterns of Web Applications
Explore how to design client-side logic in Rails applications by balancing server-side rendering and JavaScript interactions. Understand patterns ranging from minimal JavaScript with Hotwire to complex single-page app architectures, focusing on state management and user interface updates.
Designing around client logic
As a web application begins to act more like a desktop application, the application needs to maintain a lot of state and logic that only pertains to the user interface (UI). It doesn’t always make sense to manage the client-only information and logic on the server, so JavaScript applications in the browser became more and more complex.
JavaScript manages the interactions a user has access to, which may be harder to model as CRUD resources and actions. Single-page application JavaScript frameworks often have a different set of actions. As a result, these frameworks have structured themselves quite differently from server-side Rails ...