At Nutshell, we’ve got a great team of developers and designers, building a CRM web application. I’m super excited about the product, and what I hope to do over the course of a few posts is to document some of the tools and strategies we’re using to build Nutshell. This post is an overview of the scaffolding we use to build Nutshell, not the technologies in the actual product.
There are multiple developers actively working on the application code base, while others are building on top of the APIs (even as they’re being coded) or designing UIs. The tools we use reflect Nutshell’s size, culture, and future plans.
Dropbox
In addition to paperwork like contracts and HR hooey, we use Dropbox as a big part of the UI design process. Our lead UI genius, Tyler Tate, uses it to track design iterations from whiteboard to notebook to final Photoshop mockup. We have a hierarchy of folders that would thrill a librarian to organize assets per project, per screen. We also use Dropbox to manage exported UI assets, like icons or slices for the iPhone, before they are integrated into our Git repo.
Git
The hippest DVCS on the block is working great for us. Though we were more familiar with Subversion and Mercurial, we decided that Git was the most forward-looking choice for managing our source code assets. Most of us just use the command line, with the occasional venture into GitX for chunked commits. With a small team and fast-paced development, Git has made it really easy to shift gears from feature to feature, without getting stuck down deeply-entrenched branches.
Redmine
For issue tracking, project management and code review, we use Redmine. Its multiple-project support beats Trac (we have four discrete projects that communicate via API), and its Git integration is well done. We are also currently experimenting with Redmine to track the entire workflow of a UI from mockup to fully-coded-and-tested screen.
PHPUnit
I don’t consider myself a test-driven-development evangelist, but unit and integration testing is absolutely critical to our development cycle. We run integration tests against Microsoft’s Exchange Web Services API, several Google Data APIs, and LDAP. Many of our data models have complex relationships and event triggers, and our test suite contains unit tests for all of them. As we move into more development in the browser, we are beginning to add Selenium tests, which are integrated directly into PHPUnit.
PHPDocumentor
PHPDocumentor is the de facto PHP standard for generating documentation from inline Java-style docblocks. We use Zym’s nice ExtJS-based template to make our autogenerated docs at least somewhat attractive. With our APIs, we’re effectively buildingly the boat as we sail it, making live documentation extremely valuable to our developers that are consuming the API.
Phing
We use the Ant clone, Phing, as a build system for the Nutshell web application. It populates databases, cleans caches, retrieves third-party libraries, checks dependencies, builds documentation, and spins up the daemons used by the test suite. I’ll be covering this in more detail in a future post.
Hudson
The Hudson continuous integration server polls our Git repo for changes. After every commit, it runs the full test suite (which takes about 5 minutes). If tests pass, it calculates code coverage, builds documentation, deploys the build to a development server, and flashes the database with demo data (all of which takes about 10 minutes). These tasks are all managed by Phing. If tests fail, we’re notified.
Home screen for our main Hudson build.
Hudson also tracks our test speed and code coverage over time, and has solved the problem of out-of-date documentation. The build of Nutshell running on our central development server is always the latest working revision, and its corresponding documentation is hosted on Hudson.
So that’s a birds-eye view of the Nutshell build system. In future posts, I’ll give a closer look at how we use specific tools like Phing, and discuss some of the tools that are an integral part of Nutshell, including the Zend Framework, Gearman and Solr.
