Re:How did REST come to mean the opposite of REST?
by irrational on Tuesday July 19, 2022 @02:43AM
(#32148270)
Don’t parse the HTML, just display it. That’s what the browser does best.
[ Parent
| on HN ]
Re:How did REST come to mean the opposite of REST?
by woodweb on Tuesday July 19, 2022 @10:24AM
(#32151958)
What if a mobile application wants to use the API?
Re:How did REST come to mean the opposite of REST?
by chasinglogic on Wednesday July 20, 2022 @01:29AM
(#32161798)
This to me is the real question. I don't see how you could easily create multiple clients if you're practicing what is preached in the article.
You're really tying your server to the browser at that point so things like CLI clients and mobile clients become painful to write (not impossible but ain't nobody got time for parsing HTML when browsers do a perfectly good job of it, not to mention CSS.).
Re:How did REST come to mean the opposite of REST?
by NoGravitas on Tuesday July 19, 2022 @02:17PM
(#32155808)
REST systems are designed for use with "generic" clients. The generic client for REST systems on the WWW is a browser. There is probably one available for your mobile platform.
Re:How did REST come to mean the opposite of REST?
by firstbabylonian on Monday August 01, 2022 @06:06AM
(#32303911)
What if a native application (mobile or desktop) wants to consume the API?
Re:How did REST come to mean the opposite of REST?
by woojoo666 on Tuesday July 19, 2022 @07:28AM
(#32150075)
Not the parent commenter, but I believe the idea is that if the webpage uses a framework like React or Angular, then the server doesn't need to send html, it can just send the bare minimum data necessary (in JSON) and the client turns it into html and displays it.
In other words, HTML is just the standard format that the browser uses. But if you use frameworks or define your own application specific formats, you can send less information over the wire and have it properly decoded and displayed by your client-side javascript.