I am trying to find a way to manage Umbraco files in source control on a small team. When trying to add templates and document types to Umbraco, they are added to both the local SDF file and the MVC project. However, if we do not deploy the SDF file with those changes, the new template will appear in the MVC project but not the Back Office. Ideally we would like templates (and things related to this) managed in source control, and have content not be deployed as that should be added per environment. We do not want to manage an SDF file, and would like to have this as clean as possible for multiple people to be working on at the same time.
Has anybody found a clean solution for this type of problem?
I think the trick is seeing templates not as content, but as part of the site's infrastructure. Once the templates are setup in the Backoffice, you don't need (and probably want) to manage them there.
The way I usually work in a multi developer setup using visual studio and sourcecontrol is the following (and probably there are alternatives):
Have a local "development" environment per developer, in folder Framework.Umbraco.Web. This folder is setup as a local website with IIS (eg. www.mywebsite.local)
Have source controlled Visual Studio project in folder MyWebsite.Umbraco.Web Within this project, at the minimum the Views, Scripts and Css folders are maintained and source controlled. On a build, using a post-build event all the files are xcopied to their respective folders in the Framework.Umbraco.Web folder.
This gives all the advantages of Visual Studio development and source control with TFS or GIT. The only drawback is that a "build" is required to copy over all modified files. However, it makes sure that all developers use the same and shared codebase, while they can develop in their own environment.
Once you are ready to deploy, just push the changes to your test, staging or production enviroment.
uSync takes the bits that are in the DB and writes them out to the disk (as XML), it also reads them off the disk and puts them into the DB, it means you can source control the files, and not necessarily have to worry about the DB.
When a dev checks code in/out the usync files go to, and when the site then starts - usync does a sync of all the doctypes, datatypes etc, keeping everything nice(ish).
It doesn't deal with actual content, but during development that might not be an issue (if it is you can look at Courier or uSync.ContentEdition).
but it does keep each development version completely separate from any DB or other site, meaning you can work remotely, and not need SQL connections etc.
Umbraco Source Control - File Management
I am trying to find a way to manage Umbraco files in source control on a small team. When trying to add templates and document types to Umbraco, they are added to both the local SDF file and the MVC project. However, if we do not deploy the SDF file with those changes, the new template will appear in the MVC project but not the Back Office. Ideally we would like templates (and things related to this) managed in source control, and have content not be deployed as that should be added per environment. We do not want to manage an SDF file, and would like to have this as clean as possible for multiple people to be working on at the same time.
Has anybody found a clean solution for this type of problem?
I think the trick is seeing templates not as content, but as part of the site's infrastructure. Once the templates are setup in the Backoffice, you don't need (and probably want) to manage them there.
The way I usually work in a multi developer setup using visual studio and sourcecontrol is the following (and probably there are alternatives):
This gives all the advantages of Visual Studio development and source control with TFS or GIT. The only drawback is that a "build" is required to copy over all modified files. However, it makes sure that all developers use the same and shared codebase, while they can develop in their own environment.
Once you are ready to deploy, just push the changes to your test, staging or production enviroment.
I developed uSync looking for a solution to this problem. (http://our.umbraco.org/projects/developer-tools/usync)
uSync takes the bits that are in the DB and writes them out to the disk (as XML), it also reads them off the disk and puts them into the DB, it means you can source control the files, and not necessarily have to worry about the DB.
When a dev checks code in/out the usync files go to, and when the site then starts - usync does a sync of all the doctypes, datatypes etc, keeping everything nice(ish).
It doesn't deal with actual content, but during development that might not be an issue (if it is you can look at Courier or uSync.ContentEdition).
but it does keep each development version completely separate from any DB or other site, meaning you can work remotely, and not need SQL connections etc.
Thanks Kevin! That is exactly what we were looking for and seems to solve our issues.
is working on a reply...