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

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.

主站蜘蛛池模板: 隆尧县| 黄浦区| 镇原县| 卢龙县| 大新县| 东辽县| 长武县| 三门县| 英山县| 前郭尔| 襄城县| 江山市| 阳江市| 正定县| 新乐市| 黔西县| 贵港市| 石渠县| 六枝特区| 临清市| 尼勒克县| 勃利县| 东方市| 特克斯县| 德清县| 商河县| 密云县| 繁峙县| 洛宁县| 钟祥市| 醴陵市| 万全县| 修水县| 九江县| 五大连池市| 永城市| 沅陵县| 凭祥市| 余干县| 高州市| 惠东县|