From the course: iOS App Development: Design Patterns for Mobile Architecture

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Expand layers

Expand layers

- [Instructor] We've moved out of the logic into the presenters, and now the next step is to move that logic into the real layers that it belongs to. The networking code in the networking layer, the database code in the database layer, and any translation stuff within a translation layer. So, the first thing we're going to do is create classes to put those in, and groups to put those classes in. So within our model layer, we have a network in a database layer. Let's create a group, and we'll name this Translation. And in here, we're going to create a translation layer. So New File, it's a Swift File, and we'll just say TranslationLayer. And in here we'll say class TranslationLayer. We'll also do this for the Database. Say New File, Swift File, and DatabaseLayer, class DatabaseLayer, and also the Network Layer, NetworkLayer, class NetworkLayer, and then we'll make a model layer, which all of those other pieces will belong to. Now that model layer could be your interactor, it could be a…

Contents