Posts

Showing posts from February, 2018

Core Data

Image
Core Data is an object-graph management and persistence framework Core Data stack A Core Data stack is composed of the following objects: one or more managed object contexts connected to a single persistent store coordinator which is in turn connected to one or more persistent stores. A stack contains all the Core Data components you need to fetch, create, and manipulate managed objects. Minimally it contains: An external persistent store that contains saved records.  A persistent object store that maps between records in the store and objects in your application.  A persistent store coordinator that aggregates all the stores.  A managed object model that describes the entities in the stores.  A managed object context that provides a scratch pad for managed objects.  Managed object A managed object is a model object (in the model-view-controller sense) that represents a record from a persistent store. A managed object is an instance...

UI-based Application Architecture

Image
For reducing coupling between model, view and business logic to increase unit testing compatibility different architectures are used. I am studying in the perspective of ios platform. MVC: Model-View-Controller Model:  Model classes are just data structure and manager of data structures like core data model classes and user-defined all model classes. The handler of core data models and json parser. View:  Storyboards, xibs, UIView classes, Controller: UIViewController classes. which contain all business logic and presentation logic so this becomes a clumsy class and incompatible for unit testing. MVP: Model-View-Presenter Presenter - For solving the problems with Controller of MVC presenter is used in MVP. The controller class is partitioned in different view classes with its own business logic so controller class is reduced in smaller size in presenter pattern.  But this also breaks SRP and unit testing problem does not solve yet using pre...