Switch branches/tags
Nothing to show
Commits on Mar 23, 2010
  1. Started using JSON for remote data as its a lot easier to construct t…

    lukeredpath committed Mar 23, 2010
    …he packets for sending back to the server.
Commits on Mar 21, 2010
  1. Started to separate out the synching components from the application …

    lukeredpath committed Mar 21, 2010
    …code. CoreRemote
    sounds like a cool name but it should be considered a working title for now.
  2. Added swipe to delete to the table view and handling of deleted objects.

    lukeredpath committed Mar 21, 2010
    Its worth noting that HTTPRiot doesn't fire the didReturnResource: callback on DELETE,
    so we need to use the didReceiveResponse: callback instead.
  3. The HRRestModel callback was starting to get messy; introducing a new…

    lukeredpath committed Mar 21, 2010
    … object, PTObjectRequestInfo, which encapsulates information about a request (the method, any delegate and the object for create/update/delete requests) and using that as the object for all requests means we can handle things in a more uniform manner.
    Doing it this way highlighted the need for the transient object to be retained for the lifecycle of the
    remote request, which HTTPRiot doesn't currently do. I've created my own fork of HTTPRiot which does retain
    the object and releases it when the operation is complete.
  4. I'm setting this property on the server side automatically; the objec…

    lukeredpath committed Mar 21, 2010
    …t will get refreshed
    after the remote POST has happened.
  5. When a new object is created in the main context, we update the sync …

    lukeredpath committed Mar 21, 2010
    …managed object context
    but inserted objects will just be faulted. When we subsequently do the remote POST, and get
    back the remote ID, we need to retrieve the managed object from the *sync* context using the
    managedObjectID and update that with the remote ID (and let other contexts such as the main one
    get notified of the change).
    The sync context should never be working with managed objects that aren't from its own context.
  6. We should always be able to get the managed object ID for a remote ob…

    lukeredpath committed Mar 21, 2010
    …ject; we often don't want
    to work with the managedObject directly as it may have been created in a different managed object
Commits on Mar 20, 2010
  1. Added an "Edit" interface and updated the sync managed to ensure upda…

    lukeredpath committed Mar 20, 2010
    …ted objects are PUT back to the server.
  2. Lots of refactoring towards a protocol-driven API. We also need to ob…

    lukeredpath committed Mar 20, 2010
    …serve changes to the main managed object context in the sync managed and POST newly inserted objects to the server.
Commits on Mar 19, 2010
  1. The previous change made it clear that only objects that once existed…

    lukeredpath committed Mar 19, 2010
    … on the
    server but no longer do should be deleted (i.e. objects with a remoteId).
    Objects without a remoteId only exist locally and should not be removed (duh).
  2. Allow users to create new projects; they will only be saved locally f…

    lukeredpath committed Mar 19, 2010
    …or now.
    Of course, this means they will be removed when there is a refresh, which means
    synching local objects back to the server.
  3. Refactored TrackerViewController to use an NSFetchedResultsController.

    lukeredpath committed Mar 19, 2010
    This means we can remove all of the query stuff from PTProject and leave it
    in the controller layer where it belongs (much of which is abstracted away
    by NSFetchedResultsController).
    The only issue is that NSFetchedResultsController deals in NSManagedObjects
    but we want to use our model object, so we need to wrap each NSManagedObject
    that we pull out of the fetched results in our own object.
  4. Refactored out some more common code into another NSManagedObjectCont…

    lukeredpath committed Mar 19, 2010
    …ext category.
    I'm trying to keep the synching code as clear and cruft-free as possible here.
  5. Refactored out the creation of new NSManagedObjects; PTProject doesn'…

    lukeredpath committed Mar 19, 2010
    …t need to know anything about NSManagedObject creation now (see, I knew that decoupling managed object creation from assignment was a good idea!).
    Added a category to NSManagedObjectContext to add some helper methods that make things a bit easier to work with.