Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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 (https://www.meetup.com/Swift-Delhi/events/264744621/)


Swift India

September 28, 2019


  1. Modularisation of code

  2. 2 WHO AM I?

  3. Challenge 3 Clutter is non-essential… in code and life #DEEP

  4. 4


  6. 6

  7. Framework Static library Approaches

  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
  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
  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
  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
  12. How to decide what should be in framework? 12

  13. MVVM-R-B Framework 13

  14. OLX Application Architecture MVVM-R-B Framework Chat Framework Network Framework Branding

    Framework UIComponent Framework
  15. Result 15

  16. None
  17. Learning & Impact 17

  18. QUESTIONS? 18

  19. None