Adaptive Code Via C#: Agile coding with design patterns and SOLID principles by Gary McLean Hall
This is very much a book of three parts – a section named “An Agile Foundation” that covers basic scrum and some of the basic principles of modern software engineering, a section going into detail about each of the SOLID principles, and a section called “Adaptive sample” that tries to demonstrate how the techniques in the book might be used across a number of sprints, by describing two sprints worth of development on a chat client.
The first section is an introduction to agile practices. There is an introduction to Scrum which covers the roles and phases of a scrum project, emphasising how interaction with the customer drives the development process. This is followed by a chapter on dependencies and layering which goes into detail about how you should manage your project dependencies and even gives some brief coverage of topics such as aspect-oriented programming. Chapter three goes through interfaces and design pattern, showing how useful interfaces can be in the .NET world. Chapter four covers unit testing and refactoring – these two items are closely related as the tests give you confidence that refactoring have not broken anything, allowing you to tidy working code without risk. All interesting material which includes some good observations.
The second section of the book, and by far the majority of the book, covers writing SOLID code. The author takes each of the solid principles in turn with a chapter on each. The author discusses the meaning of the principle and then demonstrates its use. On the way there’s often lots of additional material. The chapter on the single responsibility principle, for example, has a lot of extra material on the decorator pattern, showing how they can be used for logging and the introduction of asynchrony, and the chapter on the Liskov substitution principle has some material on pre- and post-conditions. This section of the book is really very good.
I was less convinced by the adaptive sample. We follow conversations between team members as they write a simple chat application. This covers the initial planning for a sample application, and then the team carries out two sprints. The code is available on github so that you can follow along, but it felt like a lot of effort to understand the requirements and the way that the team was working.
The first two sections of the book are really good though, and I certainly learned something from each chapter.