N
N
nkemenov2020-11-16 09:03:30
Backend
nkemenov, 2020-11-16 09:03:30

Technologies for web application with rest-API?

Hey! The bottom line is that I previously worked with rest-API from the side of iOS / Android applications, developed clients that knock on the server, receive data and process it, for example, display it, roughly speaking, on the screen.
However, now there is an idea for a website and related apps for iOS/Android.
I would like the site not to work directly with the database, but to knock on the apish, receive data in the form of json (for example, posts / comments) and display them on the pages, similar to client applications for iOS / Android.
For example, both the site and applications request posts from the same place: base_url/api/posts/12345/.
Is this approach correct when not only iOS / Android, but also a web application uses the same API? It is embarrassing that, for example, on the web, the authorization method is different - as far as I understand, it is not customary to use authorization tokens in request headers, but cookies are used, etc.
If this approach is still accepted, then what technologies are better for this (in terms of simplicity) to use in a web part? Do I understand correctly that you can use JS-based frameworks like bootstrap to convert the data returned back to html code. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
mletov, 2020-11-16
@nkemenov

Is this approach correct when not only iOS / Android, but also the web application uses the same API?

Why not. What for to fence a heap of different apishek for different clients.
it is not customary to use authorization tokens in request headers

Quite accepted. Google JWT. True, the authorization token is indeed stored on the client in cookies or LocalStorage, but this is probably how it is stored somewhere in the mobile application.
If this approach is still adopted, then what technologies are better for this (in terms of simplicity) to use in a web part? Do I understand correctly that you can use JS-based frameworks like bootstrap

bootstrap is not a js framework, but an html+css framework. And so in general, yes, you can use bootstrap for the interface, but not necessarily. But if you need tricky logic on the client, then you already need a js framework: React, Angular, Vue...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question