Jeremiah Flaga My thoughts and experiences on programming, life, atbp.

Clean Architecture Practice Project

Category:

(Originally written on March 21, 2017)

(The contents of this post might be outdated. The README in this project’s GitHub repository might have updates.)

Last year, after learning that Robert C. Martin of the “Clean Code” book has a blog (through a link shared in our Skype group by a coleague, Iñaki Narciso, who later became a friend), I started reading anything in that blog whose title catches my attention. (I was not very aware that busy people, like Robert C. Martin, have blogs.)

I was able to read his article “The Clean Architecture”. While reading that article I thought that he is just explaining how most software developers do architecture in the real world. And that all I have to do to be able to experience this clean architecture thing is to wait until I can find a job where the project I will be involved in uses this kind of architecture.

But two days ago, I learned that he is writing a new book titled “Clean Architecture” to be released this August 2017 (according to Amazon). (I’m going to buy that book.)

I realized that this “Clean Architecture” idea is new. I have to learn it. (Maybe it’s not really new; but maybe the majority of developers does not know about it yet?!)

While looking for examples of Clean Architecture I stumbled upon Matthew Renze’s website. (I remember that I saw this sample project about a year ago but I did not give it that much attention. Maybe because I did not yet understand some parts of the app?! Maybe. :disappointed:)

I tried to study Matthew Renze’s sample project through his slides. (He has a Pluralsight course on this. I will save some money to be able to access them later if things are not yet clear after reading Uncle Bob’s book.)

I also found the article “a Clean Architecture in .Net” by Stephan Hoekstra.

Great!!!

I’m going to practice doing clean architecture! In this practice project…

  1. I’m going to try to redo Stephan Hoekstra’s “Contact Real Estate Agent” project.

  2. Because I want to know what TDD is, I will try to write my tests first.

  3. Matthew Renze has a module named Specification in his project. I think he is trying to separate the tests for the specification from the unit tests. That is what I’m going to do in my practice project.

    Ahh! In his Git commits, he has this: “Added Specification project for acceptance tests”. So the Specification module contains the acceptance tests.

  4. In Stephan Hoekstra’s project, he has this Interest entity. But his House entity has this:

    public IList<Interest> Leads { get;  }
    


    What is this Leads?

    Ahh! So the Interest class is a “sales lead”. I’m going to use SalesLead instead of Interest. I’m not sure if this is correct, but I will use SalesLead because it seems more clear to me than Interest. I will just change it later if I find out that I’m wrong.

Happy coding!!! :smile:



← Previous | Archive | Next →

Comments