<> What is server-side rendering ?

Simple understanding can be : Front and rear end not separated ,
advantage : Good page performance , advantageous to seo,
shortcoming : Front and rear end not separated , Difficult data maintenance

<> What is front-end rendering ?

Front end rendering is to take advantage of ajax Get back-end data , Front end page structure detached from server , No server return required HTML,css,js etc .
advantage : Clear structure , attend to each one 's own duties
shortcoming ,: Page load speed depends on JS Loading speed of ( Comparison with server-side rendering )

<>node Isomorphic direct out rendering scheme :

Famous Node, It's also JS. Current backend uses js write , Data can be realized , assembly , There are also some methods that are common at the front and back , World peace , sing and dance to extol the good times .
How to share front and back content ?
data sharing : For the same virtual front and back dom, Server use renderToNodeStream
, Return the result as a stream , So you don't have to wait html Render all to show the results to the client ,. meanwhile , On the browser side , use hydrate Make virtual dom Render as real DOM
element . If the browser side compares with the number of components rendered by the server side , In case of inconsistency , Don't throw away everything , It's a partial rendering . So in the rendering process using the server , To ensure the consistency of front-end and rear component data . Here, the data requested by the server will be , Insert into
js In the global variable of , along with html Render to browser side together ( dehydration ); This is on the browser side , You can get the dehydration data to initialize the components , Add interaction, etc ( water flooding ).

©2019-2020 Toolsou All rights reserved,
MySql sentence Recursively find all subordinate departments of an input department Programmer and architect Hua Shan Go language Array initialization and basic operations experiment 11-1-6 Output string at specified position (20 branch )【Python】 read txt file , Gets the specified location data in the specified row PowerShell Use in WebClient Download the file and get the download progress STM32 Infrared tracking car ( Essence 2020 year 6 month 3 Daily update ) TypeScript Detailed explanation of Chinese interface Fiddler Simulate request sending and modifying response data vue use THREE.js Create a cube that you can control