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

Modularisation of Code

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
(https://www.linkedin.com/in/raman-soni-b4723614/)

Presented at Swift Delhi Chapter 21 hosted by OLX India (https://www.meetup.com/Swift-Delhi/events/264744621/)

Swift India

September 28, 2019
Tweet

More Decks by Swift India

Other Decks in Technology

Transcript

  1. 4

  2. 6

  3. 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. 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. 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. 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