Developer enviroment

This page describes how you can set up your development and hosting environment to support multiple developers working on the same project and deliver continues updates to a live website.

Web Application Project

Web application projects must be manually compiled in Visual Studio before you can run or publish them. They use a project .proj file to define what files should be included in this compilation, unlike web applications, where any file located within the website folder is compiled. In Web Application projects, the live server will not contain the source files for code, and any change you want to make must be done in your development version of the site. Once changes have been done here you recompile the project and publish the new assemblies to your webserver. Making changes to html, css, js and images does not require recompilation. 

Pros:

  • Better control of the source code due to the .proj file. (Easy to exclude files etc)
  • Easier to split complicated source code in separate assemblies.
  • The entire website is part of the same compilation. It is therefore it is possible to reference classes defined in code behind files in other templates. (not rec. though...)
  • Faster startup time of the website. (Once started, the performance is identical)
  • Live webserver does not contain source code. 
  • Support for MVC type projects
  • Test driven development is easier
  • Clearer separation of development server and live server, making it less likely developers will make risky changes diretcly on live server.

 

Cons:

  • Smaller changes are more timeconsuming (and expensive for client.)
  • Urgent or "Emergency" fixes are more complicated
  • Relatude online updates cannot be performed on live server
  • Relatude ontology Rebuilds and cannot be performed directly on server

Types of data

For staging and source control you need a strategy for dealing with each of the following types of data:

1. Ontology

The Ontology (or datamodel) is stored internally in a xml files at (WAF/Files/Definitions/). The database must always reflect the latest changes in the datamodel. When you are editing the datamodel, Webndoes store the changes in a temporary file called: "ContentDefinitionsTemp.xml", when you rebuild it updates the code files and database to reflect the changes and overwrites the current ontology to the file called "ContentDefinitionsTemp.xml". Internally, and within these files classes and properties are given integer ID number. If two developers are making changes to the same website but in separate installation, you must not do a text merge of these files as you will likely get conflicts in the ID numbers. To merge and move Ontologies to a new installation, you must therefor use the built in Ontology Merge Tool. (see below for more info) 

2. Code Files

With code files we refer to all the files you have added to the website manually or with Visual Studio, so basically all files, except: the once uploaded via the edit interface . Typically this means all cshtml, html, cs, js, css, and all jpg, png, gif for the templates files. For source control on these files we recommend you use Git, but it works with any source control system.

 3. Edited content

Edited content is all content created and edited via the "/relatude" interface. This data is stored in two places, the database and the file system. (The files are located at WAF.Data/Content/Files). Make sure this folder is excluded from your source control. The files here are references to by the database, and you quickly break these references unless you also include the database in the source control software (which is very uncommon and not recommended).