Developer forum

Forum » Development » Local/Dev Environment for multiple developers

Local/Dev Environment for multiple developers

Kasper Laursen
Reply

Hi,

I've been working with DynamicWeb for a short while on a preexisting solution. As it appears we're about to start a completely new solution we want to setup things properly as opposed to what we're working on now.

What is the recommended way to set up dev environments for multiple developers? Completely separate environments or shared database, but local files? Something else entirely?

As this relates quite a bit to the process of deployment, thoughts on the deployment process is welcome as well.

 

My personal thoughts would be to have each developer run a cloned repository with the solution pointing to a shared database. This way, repository can be deployed and the Deployment Tools/manual deployment of data can be done from any instance.

 

Best Regards,

Kasper


Replies

 
Nicolai Pedersen
Reply

Hi Kasper

As Dynamicweb is more or less like any other .NET web application (with a bit more complexity), you should be able to create a setup that suit your needs.

Your suggestion with local repos and a shared database is how many of us work with the solution and using regular Visual Studio deployment schemes, and would be my recommendation.

Be aware of these things:

  • Item type definitions.
    • If one developer changes and item type definition, which is in xml files locally, it will spark a schema change on the database. Which can cause issues when 2 developers are using the same database and only one of them has the XML file decleration of the item type.
  • Database schema changes (like custom product fields etc.) - deployment of those to production requires a little extra work. Changes can cause exception on other developers machines, if i.e. a field is taken out. 
  • Take a look at the deployment tool: https://doc.dynamicweb.com/documentation-9/platform/platform-tools/deployment-tool. Dynamicweb 9.9, which releases today, will ad the option to deploy to file (locally) and check in the deployment file to source control and let that package flow with normal proces. Taking care of schema changes etc.

BR Nicolai

 
Kasper Laursen
Reply

Hi Nicolai,

Thanks for the reply. I already signed up for your release webinar and am looking forward to it.

 

On Item Types:

Naturally, changes in the database needs to be matched with changes in the code. However, I've heard talk of issues with reverting changes due to mismatching XML files. Is this a thing?

 

I'm happy to hear you recommend what I consider the most obvious setup and am very excited to hear about the new deployment tool feature. Will custom field database changes still need to be handled manually?

 

Best Regards,

Kasper

 

 

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply

Hi Kasper,

>On Item Types:

>Naturally, changes in the database needs to be matched with changes in the code. However, I've heard talk of issues with reverting changes due to mismatching XML files. Is this a thing?

Sorry if I misunderstood you. Did you mean code-first items? There should be all fine with them. Code-first items has priority when item definition is synchronised.

So XML will always match code changes.

 

Best regards,

Vladimir

 
Kasper Laursen
Reply

Let me try to elaborate:

Developer A and B are working in individual branches on the same solution, running dev environments pointed to the same database.

Developer A alters an existing item type, causing changes to XML (and to the database as well - i assume).

Developer B just finished some code changes in his own branch and wants to run it to see if it works. What happens?

- Does the solution crash with errors because the XML in Developer Bs solution does not match the database?

- Is the database updated to match the XML of Developer B?

 

In general: When is changes to the database done?

 

Many thanks for your reply!

 

Best Regards,

Kasper

 
Vladimir Shushunov Dynamicweb Employee
Vladimir Shushunov
Reply
This post has been marked as an answer

There are 3 things that could cause changes in database:

1. Start of solution (e.g. when you make IIS pool reset)

2. "Refresh" button on Item type list page

3. When you edit an item type definition and click save -> this cause synchronisation of this specific item

 

When multyple developers have own Files folder they may overwrite changes each other (see https://doc.dynamicweb.com/documentation-9/platform/advanced-settings/control-panel).

To work in such mode it better to change item synchronisation to "Database": Settings -> Control panel: Item settings

Note:

1. all developers should have same synchronisation setting

2. (important!)after you changed synchronisation setting - click "Refresh" button on "Item type" list: Settings -> Item types

- this will store item definitions in database. 

 

Best regards,

Vladimir

 

 

 

 

Votes for this answer: 1
 
Kasper Laursen
Reply

Many thanks for this reply!

Certainly clarified a few things for me!

 

Best Regards,

Kasper

 

You must be logged in to post in the forum