logoalt Hacker News

hombre_fataltoday at 12:30 PM1 replyview on HN

> it's a question I ask and almost never hear a coherent answer to.

There are a lot of coherent answers though.

One is that responding with HTML encumbers the server with brittle UI over the wire when it could instead be a simpler API server that any client can talk to.

Returning data instead of UI from the server is a clean separation of concerns.

There's nothing incoherent about that.


Replies

lunar_mycrofttoday at 4:09 PM

That's the theory. In practice, if your UI is changing a lot, the data your UI needs is also changing a lot, meaning that your data API will either have a lot of churn or you'll allow a lot of flexibility in how untrusted clients can use it, which introduces it's own pile of issues.