To implement the function of the DIY page template, how the database should be designed!

Source: Internet
Author: User
Now it is necessary to do a user can customize the page template function, the user can drag the module for layout.
How the database should be designed is easier to implement in editing and previewing.

Reply content:

Now it is necessary to do a user can customize the page template function, the user can drag the module for layout.
How the database should be designed is easier to implement in editing and previewing.

The main meaning is the user after the next login, or according to his last modified layout? This requires a backend persistence, as you can refer to as a flag-to-JSON:

  1. This JSON is only equivalent to the configuration, not including the HTML code, the content is the ID of each module or name and the corresponding location

  2. Each user has a copy, which can be placed on the user table or independently of a table, and then the user ID is associated

  3. Backend provides the API to return the user's page configuration, when the user logs in to load the configuration, front-end JS According to the Configuration rendering page

Look at your ability to component, I think this thing is the front-end thing, the backend as long as the HTML document is saved, the front-end task is more heavy,

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.