In order to write a feature the following steps must had to be taken:
- Write a stored procedure, or two
- For each procedure write a method in the related data service in the data access layer of the application
- For each method in the underlying data access service write one or more methods in one or more repository objects in the logic layer.
- Write one or more entities, value objects and aggregates related to the procedure written.
- For each function write a method in the appropriate object service on top of the logic layer.
- On the front end write a service facade for collecting errors and results from the logic service, once again is a one to one mapping (I used the ObjectDataSource control extensively in this project and we had a centralized message collecting system).
- Write the functionality on the screen.
When looked from a theoretical aspect each step made sense. A clear separation of concerns, each object doing its small thing etc. But during the implementation I just often found my self wondering Why am I doing this? Each object has only a small variation from the object bellow. Isn't this to much granular?.
It sure made writing tests easier, since the logic in each object wasn't very complicated so the corresponding tests were easier to write and were written much faster, especially on upper layers where I made extensive use of the Moq mocking framework.