Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

IMO SPA is the natural consequence of API 1st design, of you can do everything via the API why reimplement it all again for the UI, as much as it sucks in some ways, it can yield really good results.


Because you can never implement everything only via the API, anymore than you can implement everything via SQL queries. The reason why people created custom business logic atop the data model is .... because they need custom business logic atop the data model. Oh, you want to require a captcha before allowing someone to view a record? Well, that's not gonna be in your api. It's business logic sitting ontop of it. The reason people "do" API 1st design is just that they haven't thought these use cases through very well and it all makes sense until you start looking at the details of what your business logic is actually doing. Then it's up to everyone else to either convince the decision makers that no, this really is API first design so they get the buzzword crowd off their back, or they just drop the ability to securely do custom business logic and hope no one notices.


I think you have an overly specific interpretation of "API".


I agree this is natural outcome when developer time is precious, though sometimes increases complexity for the user and their browser.

And if one doesn't need an API first design then SSR with a robust framework might be cheaper to stand up and maintain.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: