V
V
Vladislav2019-07-02 11:37:42
JavaScript
Vladislav, 2019-07-02 11:37:42

HTML output (from server) or do it in JS: render functions?

Tell me please. How to properly structure data on the site, working with SQL (for data output, type with input and registration). Through what frameworks can this be implemented, such as hiding data from users, sending data. (Is jQuery still relevant? Or are there other ways?)
I mean how to make the site load more optimized.
That is, for example, there is some data for displaying users and for administrators: either in a modal window, or in some block. How can this be displayed (in terms of layout, so that the output template is not visible to users (not in the general HTML document). But the response from the server. Or how is this done in general?)
I just sometimes go to some sites (I can’t give an example ) and don't see hints of an interface.
Can anyone explain how this is done? From the server the data with styles (of the interface) are sent or..?
Let's say it's in PHP or NodeJS..

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-07-02
@rockon404

You can render data depending on the login and other conditions in the following ways:
1. Use a template engine on the server side.
2. Use the frontend framework on the client.

A
Alex-1917, 2019-07-18
@alex-1917

Forward the generated html from the server = drive the information to 90% redundant.
Forming the DOM on the client with the help of the browser = making the owners of 4, 5 iPhones look enviously at tenths.
A double-edged sword, the middle has not been found so far.
I only drive data on my web service, forming the DOM on the client, but I have a banal DOM - tables and forms. Users do banal operations - two checkboxes, three inputs. There are no tricky protruding forms.
And yes - I'm sick of VUE - only hardcore, only vanilla!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question