3 ms·
> The more modern style of heavier client-side js apps lets you use software development best practices to structure, reuse, and test your code in ways that are
by chrischattin 6y ago
> The more modern style of heavier client-side js apps lets you use software development best practices to structure, reuse, and test your code in ways that are more readable and intuitive.
This reads like vague marketing speak. In reality SPA/front end JS frameworks do the exact opposite - violates all kinds of software best practices like duplicating logic server/client, creating brittle tests, conflation of concerns, etc, etc. SPA's front end JS frameworks are an anti-pattern, imo.
- robertoandred 6y agoOn the contrary, a traditional server-side/jQuery hybrid is what results in duplicated templating and logic. A SPA at least has everything in one place.
- hombre_fatal 6y agoSPAs treat the browser just like any other client. If anything, it's more design-/architecture-consistent. - iOS speaks to your JSON server. - Android speaks to your JSON server. - CLI speaks to your JSON server. - Desktop GUI speaks to your JSON server. - Other machines speak to your JSON server. Meanwhile... - Browsers use browser-specific html endpoints to utilize a historical quirk where they render UI markup sent over the wire that the server has to generate, and now you're dealing with UI concerns on both the server and webclient instead of just dealing with biz-logic and data and the server. I find it very hard to see how this is somehow what avoids duplicating logic on server/client and conflating concerns.
- chrischattin 6y agoI think you’re confusing the view layer with adding an entire SPA/JS framework where you duplicate the data model and offload business logic to the client vs a standard req/resp and rendering html/json or even JS from the server. It’s much much cleaner to do the latter. This is speaking from hard earned experience building web apps over the last ten years.