4 ms·
Why wouldn't it be possible to let your API talk to the back-end of your website? Ideally, you want to have the best format for every platform you are targetin
by QuantumRoar 12y ago
Why wouldn't it be possible to let your API talk to the back-end of your website?
Ideally, you want to have the best format for every platform you are targeting. The phone can have its app but the web should have a website that works like a website, not like a clone of a smartphone app.
You could also turn your argument around. Say you have a website and now you want to make a smartphone app. You wouldn't want to write an app that renders HTML and CSS that's served by a server, right?
I get that it seems sane to make an app out of your website when you already have an app for phones. But you must recognize that the web is really something else than a native program. And if you want to do it right, you need to treat every platform individually.
- lucian1900 12y ago> Why wouldn't it be possible to let your API talk to the back-end of your website? It is. However, since the API is already designed to be used securely by a client, it'll be a lot less work to make the browser be the client of the API.
- bsaul 12y ago"you wouldn't want an app that renders html served by a server". I wouldn't because it would be (almost) impossible to render it differently in order to adapt it to the device ( since we're talking about native apps). Logically, a rest API is a layer that is one level "before" html/css, since it only deals with data, and not rendering ( html needs data, not the other way around). Since web and native use different rendering technologies, the logical conclusion is to keep the common part of the stack at the data level, and not one level above it.
- vegedor 12y agoIf the back-end serves javascript combined with the HTML, then you get a problem on iOS, because apple doesn't allow loading code, i guess.
- deleted 12y ago[deleted]