Considerations for designing system updates

Source: Internet
Author: User

We usually develop a system that must be upgraded frequently. Upgrading means modifying the code or data structure. Of course, you should try to modify the data structure as little as possible in the next system.

So how should we provide updates for users to upgrade when others are not currently using the latest version?


Version Number

First, there is no doubt that each download of a version should have a corresponding version number for differentiation. In this way, if the current user version is different from the latest version, it indicates that the user should be updated.


Patch updates

Second, how to provide updates. Method 1: only modified files are provided, and the modified files should be packaged according to the system directory. For example, I modified the index in the admin folder in the system directory. the PHP file cannot be directly stored in the patch. PHP, but to create a new admin folder, the modified index. after saving the PHP file, package the Admin directory. Method 2: Package the system as a whole no matter how many files are modified. The patch package should contain detailed update instructions and update methods.


How to update a user

Third, how to make the user update. Both methods allow the user to download the patch and overwrite the original file. Of course, the user should be prompted to back up the original file based on insurance considerations. You can separately download the update package or provide online updates.


Data Structure update

Fourth, update the data structure. This is not the same as updating the Code. It is a little special. Because data may already exist in the database, you must not delete the original database and generate a new database. So what should we do? You can only operate on a specific table by modifying statements, such as adding or deleting fields, adding or deleting a table.


Cross-version update

Fifth, how to upgrade a large version span. Some users may use an old version, which is separated from the latest version. How can they upgrade the version? The most insurance is the installation of a patch and a patch. If one-time installation is required, different installation packages must be created based on different versions, because only one file may be changed from version 1 to version 2, and only one file may be changed from version 2 to version 3, however, two files have been changed from version 1 to version 3, so it is necessary to create different installation packages based on different versions.


In short, the most important thing to update a patch is to be able to accurately identify the difference between the current version and the latest version, and then download the corresponding patch. Exercise caution when modifying the data structure. In general, you can add a new table or field, but avoid deleting it as much as possible.


Link: http://mingkr.com/system-update


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.