mardi 20 octobre 2015

When to store object in sqlite database

I am working on a application which are using various services like cloud storage and SMS sending. I have implemented in a way that service manager is handling all the task related to cloud signup and other services like SMS.

UIViewController does not know about the which clouds service i am using it just pass the message to service manager and rest of the task is done by service manager.

I stuck in a problem after signup i need to send user information to UIViewController and it is right now a cloud object. So i do not want to send any cloud object to UIViewController. I have a NSMangedObject class for a Person which very much resemble with the cloud object. is My approach is ok? it provide me separation of concern. In future if i need to change cloud framework then it does not effect any controller. Should i create that NSMangedObject object in service manager or not? Right now this service manager not handling anything related to local database?

Aucun commentaire:

Enregistrer un commentaire