Instagram has open sourced one of its core frameworks to let developers offer faster push updates in their apps. Called IGListKit, the project was originally developed to improve the stability of the photo sharing platform and enhance efficiency in its back-end operations.
To develop active lists from data stored in the server, Instagram utilised Apple’s UICollectionView architecture that was introduced with iOS 6.0 in 2012. This brought lists without an error-prone setup.
“Before IGListKit, Instagram was plagued with an architecture common to larger-scale apps: the massive view controller. On top of that, we suffered from too much inheritance,” Instagram engineer Ryan Nystrom wrote in a statement.
The Instagram team spent several months to break apart its components into smaller objects that later helped in replacing the tradition architecture with IGListKit. Further, the Facebook-owned company used IGListSectionController to power sections in the new framework and implemented IGListSectionType protocol.
For converting data into section controllers, Instagram has added an object called IGListAdapter to its framework. This returns cells that emerge in the collection view.
“IGListKit reduces the chance of having ‘massive view controllers’ by dividing responsibilities into multiple layers: the view controller, list adapter, section controller, and the cell,” Nystrom explained.
IGListKit was not exclusive to Instagram. GitHub deployed its same version to improve the user experience. Moreover, developers can deploy the same framework on their app projects by accessing its code through a GitHub repository.