Loading html and Controller from server and creating dynamic states UI - router

前端 未结 4 1913
后悔当初
后悔当初 2021-02-05 11:34

I am looking for a Solution to load my App Content dynamically from the Server.

My Scenario:

Lets say we have 2 Users (A and B), my App consists of different Mod

4条回答
  •  猫巷女王i
    2021-02-05 12:12

    Ok, so let's start from the beginning.

    All the application logic should be contained on the server and served via API-calls through REST, SOAP or similar. By doing so, you reduce the amount of logic built into the UI, which reduces the stress on the client. This basically makes your client app a rendering agent, containing only models and views for the data and logic served by the backend API.

    As foreyez stated in his/her comment, this isn't an issue for any modern (or half-modern) device.

    If you insist on not loading all of the layouts at once, you could of course separate them into partials, which you load after the login based on the user privileges. By doing so, you reduce the amount of in-memory data, even though the improvement would be doubtable, at best.

提交回复
热议问题