Getting development underway : Collaborative development and source control overview
 

Try Sitefinity Now

Collaborative development and source control overview

When thinking about cooperative development, consider both the project source files and the information Sitefinity CMS stores in a database. As a native ASP.NET web application, the entire project folder structure, excluding the bin folder, can be archived in a in source control system. Modification of the project causes changes to configuration files and can include the addition of source code for modules, widgets, templates, and themes. Sitefinity CMS saves some of these changes in the database.
Note: As a tip, it never hurts to have a copy of the bin folder available on a shared file system. If a developer unintentionally deletes the DLLs by rebuilding or cleaning their local solution they can easily retrieve the correct set for the project.
In a collaborative environment, each developer can work with their own copy of the project. They can run the project locally using their choice of web server, and connect to their own database instance. When they are ready to integrate their work with others — if the customizations they made involve data structures changes that are saved in the database — they can use the Administrative export feature. An export transfers the source code to a folder within the project. When they merge the changes back to source control, the customizations will be available to other developers. (See the documentation for information on the data structures you can transfer using export.) The Sitefinity CMS Thunder Visual Studio plug-in also provides import and export of modules, which allows developers to develop outside of a project.
The following provide some background information and tips for using a source control system with a Sitefinity project:
*Choosing a source control system
*Archiving configuration files

Choosing a source control system

If development responsibilities are to be divided up, such as when an outside party is developing in parallel, or some developers are using the Module Builder and others are creating modules directly from Visual Studio, coordination can become complicated. The TFS source control system does not handle changes made outside of Visual Studio, such as changes to the configuration files. This does not entirely exclude TFS as an option, but SVN, GitHub, or Mercurial support archival and versioning of the application configuration files as well.
This blog post outlines a process that one consultant uses: Sitefinity CMS partners share best practices on website recovery.

Archiving configuration files

The /App_Data/Sitefinity/Configuration project folder contains XML-based configuration files that the Sitefinity CMS uses internally. The application writes to these files and builds the UI dynamically, based on these configurations. For example, when you use the Module Builder, add custom fields or language translations, the application writes to the configuration files. These actions not only write to the config files, but often make schema changes to the database, as well. To avoid issues, make sure that Sitefinity has the appropriate access to the Configuration folder. Changes made to these files need to be checked in and version controlled, but it is important not to restrict Sitefinity CMS access to these files while the project is running.
By default, Sitefinity CMS stores project configuration files in the file system. You can later configure Sitefinity CMS to store project configuration changes in a database. If you choose to do this, do not delete the configuration files from the project because Sitefinity CMS needs to read them.