(Book Review) Agile Principles, Patterns and Practices in C#


One of the best books I've read about agile methodologies and agile design, or better said, about the software design in general. In the first section, Robert C. Martin provides a brief overview of the best practices which should be applied in agile teams including planning, iterations, releases etc. However, as a software developer, I was much more interested in the second section of the book - agile design. What I found was an exceptional explanation of object-oriented design principles.

Agile Development

The agile development section has around 100 pages, which is not so much according to the size of the book, which is over 900 pages. It briefly covers all the important aspects of agile development as agile manifest, teams organization, overview of extreme programming, planning, test-driven development and refactoring, underscoring the importance of all of them. As I work in an agile team right now, I already know most of these things and I skipped some of the chapters. However, I highlighted some statements including the following ones, which are often ignored.

Test-Driven Development

"All production code is written in order to make a failing unit test pass. First, we write a unit test that fails because the functionality it is testing for doesn't exist. Then we write the code that makes that test pass." Agile Principles, Patterns, and Practices in C# (ch. 2)

Continuous Integration

"The programmers check their code in and integrate several times per day. The rule is simple. The first one to check in wins; everybody else merges." Agile Principles, Patterns, and Practices in C# (ch. 2)

Agile Design

Agile design section provides overview of design smells, SOLID principles, UML diagrams and various design patterns with the appropriate code samples. The principles are then applied to payroll system development use case, which provides a very useful overview of design evolution from the first requirements to the final version of the product. As making improvements to the design, there is lot of design patterns applied which show how to keep the application's architecture simple, easy to change, reusable and properly modularized.
I really liked the chapter about packaging the application, as there is not so much literature related to this topic. You can learn how to apply the Release-Reuse, Common Closure, Stable Abstraction and other principles to modularize your application properly.

This book has 'C#' int its title, but to be honest, the code samples look more like a pseudo-code to me. There is a lot of cases, where an experienced C# developer would use more elegant features of C# language like generics, extensions, event handlers etc. instead of the code provided in the book. Also, there is sometimes too much boring code to read, which I suppose most of the advanced programmers will just skip. However, it does not change the fact that in the most cases, the author explains the object-oriented programming principles in an outstanding manner.

There are is a passage which I liked most regarding the way how agile software should be designed.

"Fool me once, shame on you. Fool me twice, shame on me."
To keep from loading our software with needless complexity, we may permit ourselves to be fooled once. This means that we initially write our code expecting it not to change. When a change occurs, we implement the abstractions that protect us from future changes of that kind. In short, we take the first bullet and then make sure that we are protected from any more bullets coming from that particular gun. Agile Principles, Patterns, and Practices in C# (ch. 9)

The software design section of this book provides a lot of handy information about object-oriented principles, patterns and their applications in software development. I believe that all the developers, from intermediate to advanced, who care about good software architecture and deal with important design decisions, will benefit from reading this book and will use it as reference in the future.

Viktor Borza

Freelance .NET developer with passion for software architecture and cutting-edge trends in programming.


Comments


Latest Posts

Browse

Archive All posts