Esqarrouth / EZSwiftExtensions

:smirk: How Swift standard types and classes were supposed to work.
MIT License
3k stars 381 forks source link

Better project organisation #468

Closed DominikBucher12 closed 6 years ago

DominikBucher12 commented 6 years ago

For now, it's just some files in one folder - how the heck can someone find the desired extension? I suggest Adding the Class+Extensions/Feature.swift convention to files or for example multiple files like UIView+ToImage, UIView+FadeAnimations etc. Now it's super complicated to find what you desire. I suggest to add Folder structure like this:

Khalian commented 6 years ago

Interesting thought. I do not particularly like the + convention, since that would bloat up the number of files based on the number of methods that are present. Instead a straightforward UIKit and Foundation split seems more appropriate.

Technically there are two facets to this problem. One is discovery by the user (application programmer who uses this). They wont have any marginal benefit, since they would most probably use their IDE's autocomplete anyways (Xcode, AppCode etc). The other is discoverability for the developer of the framework. In there I see the utility, but I would let the other maintainers chime in on the level of granularity we should have for our folder structure. @lfarah @goktugyil Any comments?

DominikBucher12 commented 6 years ago

+1 truth the user won't have any benefit, but the developer could be clear. Also I guess it would be better to remove the Extension word from the files since it is obvious that these are Extensions from the name of project ^^

Khalian commented 6 years ago

Good point. I will wait for one more maintainer to pitch in before making the changes.

Esqarrouth commented 6 years ago

I agree on @Khalian 's comments.

Where are you trying to find your desired extension from? Github or Xcode?

The extension keyword helps you differentiate from the original file, while using quick open etc.. But it could be shorter like: ext maybe?

DominikBucher12 commented 6 years ago

Well, if you don't wanna have better organization and rely on jump to definition function in Xcode, I guess it is to keep the chaos as is. So I'll close this issue now. Merry Christmas!