Summary
In this chapter, we refactored our architecture to make it more scalable by introducing a service layer. We saw how not having a persistence ignorant design causes us to have to refactor presentation code in order to change our data access approach, and we discussed the trade-offs of using generated models. We learned how to make our presentation code persistent ignorant and what benefits that would provide us. We then looked at the testability of our approach and finished off the chapter by refactoring our code to be more testable, which allowed us to add some unit tests.