In the past few days, I soared straight through Robert Martin‘s book, Clean Architecture. After seeing a receipe for such an elegant system architecture, I spent a couple days converting an existing project to the architecture.

It was difficult to implement Clean Architecture for the first time, and to do so while converting an existing project to it!

In the end, I was successful, and I was extremely happy I did the conversion on that project. It;s the right size of project, and it was a good time to conver it, since I only had a lot of code written (but not a ton!) and the project was not in production yet.

I can confirm that project will have a lot less of a hard time when I make changes to it.

To prevent future pain, I also wrote a boilerplate C# Clean Architecture solution from scratch and put it up on a Github repo. Check it out at https://github.com/gmagana/clean-architecture-example-csharp .

I think the sample solution will be useful for a person new to Clean Architecture. I certainly wish I’d had that sample code at hand when learning about the architecture!

In the future, I’ll be using that sample solution to start new projects. Hopefully it will be useful to other folks as well!