Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

Restructure the examples project #712

Open yusuftor opened 7 years ago

yusuftor commented 7 years ago

At the moment the current organisation of the IGListKit iOS Examples workspace is separated in to large view controllers/views/section controllers etc folders. For me it seems to be quite tricky to find out which View Controllers and Section Controllers are used for a specific cell in the main UICollectionView.

I reckon that the structure of the project should reflect the UI of the app, like this:

- Tail Loading
   - View Controllers
   - Views
   - Section Controllers
   - Models
- Search Auto Complete
   - View Controllers
   // etc

There may be some issues of Section Controllers that are used in more than one part of the app, but I think this will be much more user friendly approach. I currently have my own app organised in a similar way to this and it works great.

Thoughts?

rnystrom commented 7 years ago

Love it! The examples have definitely grown a lot. The only thing we need to figure out is where to put shared objects/views.

Should we have another top-level dir for shared stuff?

yusuftor commented 7 years ago

Yeah I think we would need a top-level directory for shared stuff. I always have a "Miscellaneous" folder that is subdivided for shared things that don't fit under one folder. And a folder called "Utilities" for extensions and data structures.

I'm intrigued to know how Instagram organises their own app as it must be pretty big?

jessesquires commented 7 years ago

Honestly, I would prefer a much shallower structure:

- Tail Loading
   // all files for tail loading
- Search Auto Complete
   // all files search
- Shared
   // all shared files

Only one level of nesting within the top-level project folder.

Sherlouk commented 7 years ago

@jessesquires @rnystrom To confirm; what structure do we actually want to go with? There's two suggestions here!

yusuftor commented 7 years ago

I'd say go with Jesse's suggestion of the shallower structure. As far as I remember, there aren't multiple section controllers/views etc for each cell in the main collection view, so having folders that each house one file would be kinda annoying.

jessesquires commented 7 years ago

@Sherlouk I'd prefer the shallowest possible

Krishna commented 7 years ago

I'm going to have a go at organizing the example projects in a shallow structure. I'm trying to learn about IGListKit, so I think it will be helpful for me and other newcomers to the project.

jessesquires commented 6 years ago

Also relevant to this task: https://github.com/venmo/synx