Showing posts from March 13, 2022

Interface Oriented Code Organization(IOCO)

When I started experimenting with TDD  and specifically writing the test first, I had a sudden realization as I began to contemplate where should I place this new test I was about to create.  I realized that the simplest place for the test would be in a folder structure that matched the UI for a web app or the API for a web API, and then quickly realized it would be helpful to have the production code folder structure match as well. I had been working on several large complex code bases, some web apps, and some web APIs, and trying to find the code that needed to change or where to add new code wasn't obvious from the code organization. The code was organized in the layered architecture style with UI layer, Service Layer, Repository Layer, etc. kind of like the structure Microsoft uses in  "Traditional N-Layer architecture applications" . With folders for Controllers, Views, ViewModels, etc. This architecture-oriented code organization(AOCO) is really good at telling you