Why does PhotoViewsController instantiate its own PhotoDataSource instance?


#1

In Chapter 10, page 185, the book introduces the dependency inversion principle and a pattern of dependency injection through setting a property externally on ItemsViewController to give it an ItemStore instance.

So I’m surprised here on Chapter 21, page 383, when the book chooses to have PhotosViewController instantiate it’s own property to an instance of PhotoDataSource internally. The dependency injection pattern isn’t used. Is there a good reason why?