Slide 1

Slide 1 text

Modular iOS Architecture @ Just Eat Alberto De Bortoli

Slide 2

Slide 2 text

A modular architecture is a software design technique that emphasises separating the functionality of a program into independent, interchangeable modules, such that each one contains everything necessary to execute only one aspect of the desired functionality. MODULAR ARCHITECTURE

Slide 3

Slide 3 text

AGENDA ▸ A bit of Just Eat history ▸ Challenges ▸ Learnings & advice

Slide 4

Slide 4 text

TIMELINE The Big Fork Single global platform work starts Modularization is completed Early 2014 June 2016 October 2019

Slide 5

Slide 5 text

“Integrate people first, technology later” Adam Gilmore Head of Engineering @ Just Eat

Slide 6

Slide 6 text

The iOS Team (a.k.a. the best team evah)

Slide 7

Slide 7 text

Your friends: the (product|delivery) managers

Slide 8

Slide 8 text

2014 2016 2018 2019

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

CocoaPods-based

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

AVOID DEPENDENCY HELL ▸ The dependency issue arises around shared libraries on which other libraries have dependencies but where they depend on different and incompatible versions ▸ Sometimes duplication is better ▸ Low-level code shouldn’t change frequently, and our code changes frequently by definition

Slide 13

Slide 13 text

▸ A flat dependency graph allows Xcode to parallelize the build process. source: https://patrickbalestra.com/ FLATTENED OUT DEPENDENCY GRAPH

Slide 14

Slide 14 text

▸ Not an easy task! FLATTENED OUT DEPENDENCY GRAPH

Slide 15

Slide 15 text

THINK OPEN-SOURCE ▸ README ▸ Easy to integrate ▸ Tests ▸ Reasonably shaped code

Slide 16

Slide 16 text

THINK OPEN-SOURCE ▸ README ▸ Easy to integrate ▸ Tests ▸ Reasonably shaped code “I don't wanna use this library because it's not in MVVM.” - said nobody ever

Slide 17

Slide 17 text

DON'T BE FUSSY ABOUT (A SPECIFIC) ARCHITECTURE ▸ It's simply inevitable that different developers prefer different kinds of architecture ▸ Best to evangelise SOLID, Dependency Injection, Inversion of Control and all that jazz MVVM VIPER MVC MVP MVVM-C ELM

Slide 18

Slide 18 text

▸ Only run the code you are working on ▸ Fast compilation times ▸ Jump straight to the desired features ▸ Get it for free with $ pod lib create DEMO APPS

Slide 19

Slide 19 text

REFERENCES ▸ Personal Twitter: @albertodebo ▸ Personal blog: albertodebortoli.com ▸ Just Eat blog: tech.just-eat.com ▸ Modular iOS Architecture @ Just Eat albertodebortoli.com/2019/12/19/modular-ios-architecture-at-just-eat ▸ iOS @ Scale(ish) by Bradley Smith @ Wayfair appdevcon.nl/session/ios-at-scaleish ▸ Improving Your Build Time in Xcode 10 patrickbalestra.com/blog/2018/08/27/improving-your-build-time-in-xcode-10.html