官术网_书友最值得收藏!

Development environment and best practices

We discussed some considerations regarding your server environment and required resource levels. Closely related to that topic is the matter of determining the development environment and code management practices.

In almost every situation, you will want to create a development environment where you can safely implement and test your CiviCRM implementation without impacting your production site. Even if you are not planning to customize CiviCRM in any way, it is still worth creating that development environment where features can be tested, data imports can be reviewed, and you can safely explore different configuration options without risking disruptions to your production site.

Larger organizations, especially those that have planned a phased rollout of their CiviCRM implementation, will likely want three environments:

  • Development: This is where all active code development takes place and where new features are first implemented and tested
  • Testing/staging: As the development space is the sandbox for developers and may sometimes get dirty, it is useful to have a testing or staging server where non-technical staff can be involved in feature testing and quality assurance review
  • Production: Once features have been developed and tested, they can be implemented on the production site and become actively used

In addition to determining how your site environments will be structured, you will want to give some thought regarding how your code is maintained. Unless you are a small organization with no significant code customizations, you will almost certainly want to manage your code in a version control system (VCS).

Currently, the most popular VCS in the open source world is Git. Git is a distributed system, which means each code repository is independent of the others. In other words, there is no rigid central repository that code must be checked in and out of. For this reason, it is attractive for development projects where there are multiple contributors who may or may not be located in the same location. The distributive nature provides more flexibility than a more centralized system.

The benefit of a VCS such as Git is the ability to track the history of every change in the files maintained in the repository. If you implement a new custom feature today, you would add the changes to the repository and commit them. Two months from now you might expand those features and commit the updated files. A month later you realize there was a conflict with another area of the site created by those changes. Because your code was maintained in a VCS, you can review the history of changes and more easily identify where the problem may have crept in.

Even if your customizations are minor and changes are infrequent, it is worth considering placing your code in a VCS. Work with your developer to devise an effective plan for managing the code as you move forward with the project.

主站蜘蛛池模板: 花莲市| 克拉玛依市| 井冈山市| 阿鲁科尔沁旗| 灵川县| 大理市| 嵩明县| 德安县| 大竹县| 隆尧县| 衡东县| 汝阳县| 海伦市| 潞城市| 安泽县| 阳原县| 西充县| 台北县| 哈密市| 苍南县| 兴义市| 本溪市| 延吉市| 日土县| 措勤县| 深泽县| 杭州市| 武隆县| 吉木萨尔县| 德清县| 霍山县| 贵港市| 凤翔县| 偃师市| 绥江县| 陵川县| 庄河市| 田林县| 大竹县| 平远县| 岑巩县|