2009/03/16

A little better practice on web development

Every time working on a new project, I do it on the development box, after getting code done and tested, I load new code to the production. It sounds simple, isn’t it? But sometime it is not that simple, for the environment between production and development is different, so I cannot just simple overwrite the production one when load the new code in, also, sometime I directly changed the code on the production for a small change without updating the code on the development. (not a good practice though, but for the small company’s website, which may a quick way.)

So I think I need some good practices to follow when I start a new project. Here they are,

1. Before change any single file, compare it with the production one. If see any new in the production (usually a very small change), update it back to the development one. Make sure it works on development.

2. Make a copy of the file you are going to work with. Add it into the project’s file list.

3. Work on the files on the development box and test.

4. When code ready, compare each file on the project’s file list, and double check the different between new file and backup file, and make sure any additions also available on the production. 

5. Before loading the new code into production. Make a copy of the code on the production as filename.OLD. Make necessary change on the development code to meet the production’s environment and save as filename.NEW.

6. OK final step, check the order of files need to change, for a big project, the code updated may be done after 9:00pm. Basically it is copy filename.NEW to filename.

In any failures above, just copy the filename.OLD back to filename.

No comments:

Post a Comment