-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decoupling MMRecord and MMRecordResponse #95
Comments
Hola Andrea, Great thoughts on this topic. I completely agree that the underlying system behind MMRecord should be modular and usable without the standard access through the MMRecord class. The MMRecordResponse should be usable to handle any JSON response. And you should be able to start a request however you want to. These principles are part of what is guiding MMRecord 2.0.0, which I started a test branch of a few weeks ago. I'm really liking the direction that is taking! I would also love your feedback on that. Particularly, the re-designed MMRecordResponse, and the new MMRecordRequest might be worthy of some attention. https://github.com/mutualmobile/MMRecord/tree/2.0.0 Thanks,
|
Woha! This is the fastest issue resolution ever :) As I understand it you are completely refactoring Following the direction you took, I would definitely suggest to further refactor Making all your model inherit from MMRecord has been quite a bulky requirement, I must confess that removing it has been in my "I would like but I don't dare to ask" list about |
Great! Well, I haven't worked on this in a few weeks but I do want to get it out before the end of the year. If you have more comments/suggestions feel free to use this thread to add them. Thanks,
On Sep 8, 2014, at 12:12 PM, Andrea Cremaschi [email protected] wrote:
|
Hi Conrad
I am trying to use
MMRecordResponse
directly to parse and handle the JSON response of a web service bypassingMMRecord
and I'd need to use a custom subclass ofMMRecordRepresentation
, but I noticed thatMMRecordResponse
depends on a tight coupling betweenMMRecord
and the correspondingNSManagedObject
:This is ok when MMRecord is used as designed (subclassing MMRecord) but as a user it would be great to use MMRecordResponse alone. As far as I can understand the rest of the framework, this is the only point that i can see where the marshaler part depends on this design choice: is it correct? What do you think? Would you consider a PR that handle this, defaulting to your implementation but allowing to decouple
MMRecordResponse
andMMRecord
?More broadly, I think that MMRecord is great when used as designed (model classes as subclasses of MMRecord), but I like the modular nature of the framework and in some occasions as a user I'd rather to handle pure NSManagedObject subclasses, i.e. to decouple local data storage handling and communication with the web services.
The text was updated successfully, but these errors were encountered: