Skip to content

Refactor Common Models into a more consistent paradigm with more clearly defined semantics.#752

Closed
bharat wants to merge 1 commit into
LoopKit:devfrom
bharat:dev-consistency
Closed

Refactor Common Models into a more consistent paradigm with more clearly defined semantics.#752
bharat wants to merge 1 commit into
LoopKit:devfrom
bharat:dev-consistency

Conversation

@bharat
Copy link
Copy Markdown

@bharat bharat commented Jun 25, 2018

Refactor Common Models into a more consistent paradigm with more clearly defined semantics.

  1. Contexts - one way data from Loop to the Status & Watch extensions
  2. Settings - internal only models used to store Loop settings
  3. Types - largely internal enums
  4. UserInfos - dictionaries passed back from the watch to Loop

This is an attempt to normalize our models, which have suffered from some ad hoc creep. I broke it up into 4 categories and tried to get most things to fit into them. I haven't done this across the board for all Models, wanted to start here and get a sense for whether or not this is worth pursuing.

Here's what the final result looks like, to give you some idea of the structure:
screen shot 2018-06-25 at 3 56 32 pm

…rly defined semantics.

1. Contexts   - one way data from Loop to the Status & Watch extensions
2. Settings   - internal only models used to store Loop settings
3. Types      - largely internal enums
4. UserInfos  - dictionaries passed back from the watch to Loop
@bharat bharat closed this Oct 12, 2018
@bharat bharat deleted the dev-consistency branch October 12, 2018 23:06
loopkitdev pushed a commit to loopkitdev/Loop that referenced this pull request Mar 12, 2026
* Preset editing

* Preset editing updates

* Add duration editing

* Add duration for legacy workout override
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant