Ian
Muir
Senior Developer
One of the challenges that developers at interactive agencies frequently have is writing similar sections of code multiple times. Sometimes it’s because a web application has multiple similar sections, other times it’s a matter of having similar functionality on different sites. Either way, repetitive code writing reduces productivity and stalls innovation. When a developer is re-writing code that they’ve writted several times before, they have less time to put into to new functionality.
The Don’t Repeat Yourself (aka DRY) philosphy was developed specifically to combat this problem for software teams.
Unfortunately, the DRY philosophy can sometimes be a hindrance for developers working on several small short term projects, such as web sites. Most development teams at interactive agencies just accept this and continue writing most sites from scratch or just copy and paste code from existing sites.
At Amplify, we started looking at how we could make DRY development work with the fast-paced environment here. Instead of trying to apply the DRY philosphy to individual sites, we started looking at ways that we could apply it across multiple sites without limiting ourselves to a single CMS or framework. After some research, we started to find ways to share code between multiple sites and some techniques for sharing our unique skillsets amongst the team.
The first step was sharing data and code. There are a variety of different items that can reuse data across sites, so we built a data service that can distribute data from a central location or be installed on a specific site. Everytime we need a list of states for an address form or a way to find the location of a specific zip code, we can draw this information from a central source rather than re-writing it for each application. This also provides an easy way to update information as time goes on. If a new zip code is added, we only need to add it in one place to update all of the sites using the shared data.
The next step was finding ways to share skillsets. Like most development teams, our team members have varied skillsets. John is our javascript guru, Tony knows open source tools like Ruby on Rails, Erik knows the inner workings of .NET and I’m experienced with CSS and interface design. Having this variety is a great asset, but it’s not always easy for us to be working on the same project at the same time. To rectify this, we’ve started building libraries of code that we can all use. Each library provides a way to use code that we understand to add functionality that we would normally need assistance with, allowing one developer to leverage the collective knowledge of the entire team.
For example, we have an interface system for ASP.NET that reduces the amount of code that we have to write and ensure that everything is designed well. When Erik or John creates a form for a web application, they don’t need to ask me about design or CSS, the library handles it for them. On a similar note, John has developed a javascript library containing commonly used javascript and ajax functionality. These libraries allows us to create a pool of collective knowledge; a kind of development hivemind.
These techniques provide a solid way to reduce development time and make our projects more stable. As we move forward, I’m sure that the team will find more ways to stay DRY and improve effeciency. We will also be sharing some of our libraries on the site to help other teams spend less time repeating and more time innovating.