How to Share Sandbox Environments
On the Demandware eCommerce platform, development is always done on the sandbox instances. A development sandbox is a copy of a production environment. Sandboxes give developers a safe, isolated environment to write and test code without affecting the live application.
A typical project has between five and 10 sandboxes available to developers hosted in the Demandware cloud. Because of code synchronization and the way debugging stops other running threads on a single instance, it’s best practice to have one developer per Demandware sandbox. Sometimes that isn’t possible though, and creative techniques for sharing sandboxes need to be used.
Paired programming is a possibility for maximizing sandbox usage, but it has some clear limitations. For paired programming to be effective, developers generally need to be in the same location, and even so, it’s not reasonable to expect the output of two programmers since they’re working on one task at a time. The viability of paired programming largely depends on your development philosophy and process.
Another factor is time management, which is key when sharing Demandware sandboxes. It helps to formalize the times when developers can have sole access to the sandbox.
One successful technique we’ve used is to create a shared resource in Google Calendar for each sandbox. We reserve sandbox development time like we would a meeting room to see what sandboxes are reserved or available.
Demandware instances also support code versions, which hold different copies of code that can be activated through the Business Manager tool. Initially this might seem like a good additional step to separate developers’ code when sharing sandboxes; however, in practice this measure rarely provides any benefit and often creates confusion over what code version is active. Although this feature is extremely useful in the production instance group for release management, it just causes confusion when used on the sandboxes. It’s better for a developer to refresh his or her code on their sandbox with the “clean” feature in Eclipse.
What we’ve learned about sharing Demandware sandboxes is that coordination is paramount. Paired programming is an option depending on your organization, but it’s much easier for developers to take turns using a resource sharing tool like Google Calendar. Unless there’s a compelling reason, developers shouldn’t switch back and forth between code versions when sharing a sandbox.
If you want to read more about coding in Demandware, check out our posts on 7 Elements of a Demandware Front-End Development Code Review and 5 Focus Areas for Back-End Code Review in Demandware.
Dave Haas is a technical lead on LYONSCG’s eCommerce Implementation team. As a Demandware certified architect, he leads development teams that implement custom Demandware solutions for clients. He continuously works to refine and perfect internal development processes using his more than 10 years’ experience in Demandware.