A “greenfield” application is one that is just getting started. It is named "greenfield" because it is reminiscent of a new building going up on a vacant lot that contains nothing but green grass prior to the start of construction.

By contrast, a “brownfield” application is one that has been going for some time (similar to an unfinished building surrounded by brown dirt where the grass used to be. Often, the code in a brownfield application is in a fragile state, contains excessive dependencies, unnecessary complexities and no automated tests. This describes most of the projects on which I find myself working.

Getting such code to a manageable state can be a challenge. One needs to understand the code, refactor methods and classes, break dependencies, and create automated tests.

Brownfield Application Development in .NET by Kyle Baley and Donald Belcham describes techniques for doing just that.

Baley and Belcham begin by introducing general concepts of the software development process (Unit Testing, Source Control), as well as some of the technical and non-technical challenges working with a brownfield project.

Each chapter begins with a set of pain points, then continues with ways to address that pain.

They focus on how to work with the code, describing algorithms for breaking dependencies and samples for using dependency injection and mock object frameworks.

Although not quite as comprehensive as Michael Feathers's excellent "Working Effectively with Legacy Code", this book focuses on the .NET languages, which makes it more relevant to my projects. In fact it addresses the current project on which I am working.

Brownfield Application Development in .NET is a good book for anyone who finds themselves working with code developed by someone else.