GitHawkApp / GitHawk

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

Separate components into small pods/libs #512

Closed rnystrom closed 6 years ago

rnystrom commented 7 years ago

I created the @GitHawkApp org (empty atm) to start storing stuff. Inspired by @BasThomas from #483 (comment) to move small libs into their own pods.

Pros:

Cons:

Existing lib candidates

I think once we have things that are in stable shape, we could put them in their own libs. Some starters that I can think of:

BasThomas commented 7 years ago

FWIW, I think the Split view VC thing might still need some work. Would be nice if it could help us with not forgetting navigation bars and stuff (like in the current TF)

Sent with GitHawk

rnystrom commented 7 years ago

Ya good point, it should be helping w/ that more for sure.

Sherlouk commented 7 years ago

So unwelcomed opinion over here: I'm personally not a fan of completely separating components that are not on their own really re-usable, testable, configurable and convenient especially where most people will want something slightly different.

I feel valid candidates are proper forks of SlackTextViewController, etc where we already have made changes.

Our own version of toaster is also great because on it's own it provides something, is re-usable and is testable on it's own.

An alternative here which I've been practicing at work and has had relatively great success is internal sub-projects. Can treat them likes groups for the most part to have certain more self-contained modules, but they're independently testable, and has the added benefit of not being re-compiled unless they're changed.

I'm personally not a fan of this pick'n'mix approach to pods where everything as small as a single class can come is an extra dependency. Adds a large wall of complexity when trying to do sweeping changes.

rnystrom commented 7 years ago

@Sherlouk yup, that's generally my approach too. A lot of these are pretty tiny, so not really worth the investment unless they are packaged w/ tests and whatnot. Just exploring some ideas!

BasThomas commented 7 years ago

Yep, feel the same @Sherlouk. Should definitely not go overboard with this.

Sent with GitHawk

BasThomas commented 6 years ago

Think this can be closed at this point ^^