Web developers - Is it better to do development on your local machine or on a remote host?

后端 未结 17 1400
予麋鹿
予麋鹿 2021-01-31 03:07

What are the pro/cons of doing web development on your local machine rather than on a centralized development server? For those that do dev on your local machine, how do you kee

17条回答
  •  春和景丽
    2021-01-31 03:14

    As far as keeping your DB "in sync" when others are editing it. One way around this is to get your DB schema under version control. This is not as simple as putting your source code under version control, and there are different ways of handling it.

    Read this post on Coding Horror:

    https://blog.codinghorror.com/get-your-database-under-version-control/

    Not so much the post itself but the six articles he links to by K. Scott Allen.

    Basically what's described in those articles is a method of baselining the database schema, checking in an .sql file of that baseline, and from there on in you write incremental .sql "change scripts" every time you change the schema. Now everytime a developer checks out or updates a working copy, any outstanding change scripts will be run. You will need to set up some scripts/tools to do that yourself unless you use a framework that does this for you.

提交回复
热议问题