Skip to content
This repository was archived by the owner on Sep 4, 2026. It is now read-only.
This repository was archived by the owner on Sep 4, 2026. It is now read-only.

Refactor APCDataSubstrate and APCUser to make them modular #43

Description

@p2

As mentioned in #41, the data substrate and especially APCUser are tightly coupled to various parts of AppCore and the Bridge SDK. It would be nice to have these as protocols but keep the existing code as implementations of those protocols. Additionally, APCDataSubstrate (as-is) should take care of the stack initialization, not the app delegate.

Activity

  1. p2 commented on May 14, 2015

    @p2
    MemberAuthor

    APCDataSubstrate

    It seems it would make sense to create two protocols for the data substrate:

    • APCDataSubstrate <NSObject>
      • currentUser
      • parameters (mostly used for the bypass-server setting)
    • APCCoreDataSubstrate <APCDataSubstrate>
      • persistentContext
      • mainContext
      • persistentStoreCoordinator
      • -resetCoreData

    APCUser

    The user's interface could be converted into a protocol as-is. The current implementation could then be put into an actual class, maybe APCAppUser?
    Its UserData category consists entirely of class methods, this could be put into a different class.

    @jwe-apple As per your comment on #41, as a first step I'd leave the current APCUser implementation as-is to get this going. Then we can see if we want your object composition idea reflected in the protocol or just have the APC implementation follow that pattern. Hope this is okay.

    I will start with this on a branch because I need it as protocols for our app.

  2. added a commit that references this issue on May 14, 2015
  3. jwe-apple commented on May 14, 2015

    @jwe-apple
    Member

    Makes sense to me.

  4. added a commit that references this issue on Nov 20, 2015
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions