GitHawkApp / GitHawk

The (second) best iOS app for GitHub.
http://githawk.com
MIT License
2.88k stars 382 forks source link

Refactor models to be structs, use Sourcery, and put all in FlatCache #1539

Open rnystrom opened 6 years ago

rnystrom commented 6 years ago

Since we have a lot of models in the app now, I wanted to propose that once Instagram/IGListKit#1081 is merged, we convert all models to structs and use Sourcery to automatically generate:

Secondly, I'd like to make all models usable in the FlatCache and remove all tree relationships to instead be "edges" using model IDs (the same IDs used to store in the cache). This let's the entire app listen for changes to models and respond to updates. Useful for:

Proposing a pretty huge change that has a lot of moving parts, but wanted to float this idea and get opinions!

BasThomas commented 6 years ago

Oh wow I was just talking about this with @jamuc 😱👍

Sent with GitHawk

jamuc commented 6 years ago

Yeah. I think it makes sense.

JUSTINMKAUFMAN commented 6 years ago

I think this is smart. I also think that once Instagram/IGListKit#1081 is merged, you will see an uptick in IGListKit adoption among those writing apps in Swift.