Nsobject vs nsmanagedobject pro and cons

I use basic data in my project and using NSManagedObject directly in viewControllers using fetchResultController.
But according to the new clean code architecture or VIPER application, he says that use PONSO or NSOject instead of NSManagedObject in presentation or presenter classes.

Can someone give me pro and cons for NSManagedObject vs NSObject in the above scenario?

+4
source share
1 answer

I made a list of pros for two approaches:

Support the NSManagedObject approach:

  • It is easier
  • (NSManagedObjects )
  • NSFetchedResultsController: , NSFetchedResultsController, , .

VIPER: ( NSManagedObject PONSO)

  1. , . .plist(, ).
  2. : I.e. Core Data, . PONSO, .
  3. . , PONSO NSManagedObjectContext, NSFetchRequest NSManagedObjects.
+2

Source: https://habr.com/ru/post/1568707/


All Articles