When it comes to iOS architecture patterns, the Model-View-Controller (MVC) design pattern is great for the longevity and maintainability of an application’s codebase. It allows classes to be easily reused or replaced to support various requirements by decoupling them from each other. This helps to maximize the advantages of Object Oriented Programming (OOP).
While this iOS application architecture works well on the micro level (individual screens/sections of an app), you may find yourself adding similar functions to multiple models as your app grows. In cases such as networking, moving common logic out of your model classes and into singleton helper classes can be a better approach. In this AFNetworking iOS tutorial, I’ll teach you how to set up a centralized singleton networking object that, decoupled from micro-level MVC components, can be reused throughout your decoupled architecture application.