Modularisation of Code

Eeb061c8b2816b771920da1b3e7904a3?s=47 Swift India
September 28, 2019

Modularisation of Code

Advantages of using modular programming include: Less code has to be written. A single procedure can be developed for reuse, eliminating the need to retype the code many times. Programs can be designed more easily because a small team deals with only a small part of the entire code.

Speaker: Raman Soni, Lead iOS Engineer at OLX India

Presented at Swift Delhi Chapter 21 hosted by OLX India (


Swift India

September 28, 2019


  1. 4.


  2. 6.


  3. 8.

    Static library • Static libraries (*.a) are collections of object

    files • Object file is just a name for a file that comes out of a compiler and contains machine code
  4. 9.

    Advantages: 1. Code accessibility and security 2. Reduce compile time

    3. Improve reusability 4. Different teams can have different repo solving conflict problems 5. With this divide team responsibility 6. Different unit test for each library 7. Different build configuration and mechanism for each library Disadvantages: 1. Increase launch time -- load at launch time as its static resource 2. Increase build size -- pack with your executable 3. Can’t have resource
  5. 10.

    Framework • A framework is a hierarchical directory that encapsulates

    shared resources, such as a dynamic shared library, nib files, image files, localized strings, header files, and reference documentation in a single package • Multiple applications can use all of these resources simultaneously
  6. 11.

    Advantages over static library: 1. Can have resources like fonts,

    images etc 2. Can even use XCAsset for images 3. Can be use both as static or dynamic library 4. A embedded framework can be load at run time whenever needed 5. Better architecture 6. Improve launch time with dynamic library 7. Improve build size as part of bundle not part of executable
  7. 15.
  8. 16.
  9. 19.