Summary
Object mapping is an unavoidable reality in many cases. However, as we saw in this chapter, there are several ways of implementing object mapping, taking that responsibility away from the other components of our applications.
At the same time, we took the opportunity to explore the Aggregate Services pattern, which gives us a way to centralize multiple dependencies into one, lowering the number of dependencies needed in other classes. That pattern can help with the too-many-dependencies code smell, which, as a rule of thumb, states that we should investigate objects with more than three dependencies for design flaws. Like with any dependency, moving many dependencies into an aggregate may just be that: moving dependencies around. When doing so, make sure there is another reason or a certain cohesion within that aggregate or you risk adding unwanted complexity to your program.
We also explored how to leverage the Façade pattern to implement a mapping façade...