Skip to content

Miscellaneous cleanup #3

Description

@nickynick

Hi!

First of all, I wanna say thanks for creating and sharing this cool stuff, I'm looking forward to using it in my projects. And I feel like there are a couple things that could be done to make it even better :)

Here are the points I wanna ask you about:

  • Wouldn't it be better to use parent-child context hierarchy for background operations? I believe that this newer way is generally more preferable and convenient than doing merge with didSave notifications, because it doesn't require any additional setup. rcd_merged signal can be replaced with a signal for NSManagedObjectContextObjectsDidChangeNotification to serve the similar purpose.
  • This point kind of follows up the previous one. It feels like the methods + (NSManagedObjectContext *)context and + (NSManagedObjectContext *)currentContext in the NSManagedObjectContext (ReactiveCoreData) category are a bit confusing... Perhaps we could just eliminate the former one?
  • The methods - (RACSignal *)findAll: and - (RACSignal *)findOne: in RACSignal (ReactiveCoreData) category ignore the receiver completely and just return new signals... I guess they should be class methods instead?
  • Would it make sense to move methods + (instancetype)insert and + (instancetype)insert: from NSManagedObject (ReactiveCoreData) to some other place or maybe remove them completely? They seem like they have nothing to do with ReactiveCocoa stuff :)

Let me know what do you think about this. If you are okay with these points, I'm willing to contribute :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions