3 ms·
A well written and interesting article, but I strongly disagree with > There are many reasons why, when it comes to SaaS startups, having a SPA front end that
by heurisko 5y ago
A well written and interesting article, but I strongly disagree with
> There are many reasons why, when it comes to SaaS startups, having a SPA front end that's powered by a REST API is better than having a monolith where the front end is a mix of templates and javascript.
If your SaaS isn't something that depends on highly dynamic data, like a stock trading application, then it often isn't worth it.
I'm firmly in the DHH camp, that a "monolith, with Javascript sprinkles" is easier to begin with, especially considering testing (UI testing is more brittle, compared to asserting against templates) and validation (SPA introduces the need to validate both in the frontend and server side).
I've seen projects get completely lost in the overhead of Javascript tooling, adding no value over what can be achieved using server-side generated HTML templates.
I would, however advocate keeping controllers "thin", passing responsibility to a service layer, so you if you need a JSON API in the future, you can build this out using existing services.
- cies 5y agoI agreed. Then did a project[1] with Hasura and a generated client lib in Elm and I'm no longer looking back. If I can get away with "no backend code" I'll do it again in a heart beat. [1] https://github.com/cies/elm-hasura-dockered https://github.com/cies/elm-hasura-dockered