Iglistkit: Restructure the examples project

Created on 3 May 2017  路  8Comments  路  Source: Instagram/IGListKit

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?

enhancement starter-task

Most helpful comment

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.

All 8 comments

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?

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?

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.

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

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.

@Sherlouk I'd prefer the shallowest possible

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

krysztalzg picture krysztalzg  路  3Comments

HarshilShah picture HarshilShah  路  3Comments

iwasrobbed picture iwasrobbed  路  3Comments

drinkius picture drinkius  路  3Comments

FazeelAkhtar picture FazeelAkhtar  路  3Comments