Friends, in the process of learning a new way for me to develop a kernel for a site, a number of questions arose. I would be grateful if you share your experience.
I read several articles on RESTful API, for example this one . Unfortunately, I didn’t see any special examples, the general concept is described everywhere. For example, the query
api / users /
gives (in the articles it is assumed that the answer comes in json format) a list of users, how to list this list on the page? It is logical that a structure (template) should be loaded earlier, in which there is a certain place under this list, then (omitting the question of loading a template) how to find out (i.e. get the ID of the element) is this place to insert the list there?
If we are talking about isolated cases, the question is not worth it, you can manually parse, invent something on the fly. But when the interface is complex, entities are dozens, then the question of automation inevitably arises.
Or, say, the current template is not designed for loadable data at all. That is, uploading a list of users, you also need to take a template for it somewhere. And somehow stuff the list by template ...
Tell me, brothers, how to solve such problems. Thank.