Slide 1

Slide 1 text

Aleksandar Vacić @radiantav O N I O N - L I K E A P P A R C H I T E C T U R E App Builders 2019

Slide 2

Slide 2 text

Aleksandar Vacić Belgrade, Serbia radianttap.com aplus.rs @radiantav

Slide 3

Slide 3 text

Why architecture? architecture?

Slide 4

Slide 4 text

HomeController ProductDetailsController ProductsController

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Architecture of complex apps is ever evolving, quite often in unforseen ways.

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

Fashion SPORTS BETTING Sales

Slide 9

Slide 9 text

· 100+ screens (few dozen are multi-screen flows) · multiple external services · 10+ languages (with runtime updates) · 20+ markets in Europe, Africa and S. America · iOS, tvOS, watchOS, widgets · Notifications, deep links, home screen actions SPORTS BETTING · Unpredictable future expansion

Slide 10

Slide 10 text

Connect to web services Import into local storage Cache temporary data Directly target any screen, at any depth Transform any 3rd party data model into my own Multi-screen user flow Multi-service data flow Multi-OS reusability Reading data is always super performant c h a l l e n g e s

Slide 11

Slide 11 text

Build complex system that works by first building a simple system that works. Break complex, multi-faceted flows into self-sufficient steps. Then compose them back. p r i n c i p l e s

Slide 12

Slide 12 text

DATA MODEL

Slide 13

Slide 13 text

Data Source Data Delivery Data Storage DATA MODEL

Slide 14

Slide 14 text

Data Source Data Delivery Data Storage web service, bundled file, cached download URLSession, FileManager, Authentication, Encryption Core Data, mobile db, in-memory, file / custom store

Slide 15

Slide 15 text

Data UI

Slide 16

Slide 16 text

Data UI

Slide 17

Slide 17 text

Data UI

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

Data UI

Slide 20

Slide 20 text

Data UI

Slide 21

Slide 21 text

Data UI

Slide 22

Slide 22 text

UI Data

Slide 23

Slide 23 text

UI Data

Slide 24

Slide 24 text

Data UI UI Coordinators

Slide 25

Slide 25 text

UI UI Coordinators Data

Slide 26

Slide 26 text

UI UI Coordinators Middleware Data

Slide 27

Slide 27 text

Data Source Data Delivery Data Storage UI UI Coordinators Middleware L A Y E R S DATA MODEL

Slide 28

Slide 28 text

O N I O N It resembles , isn’t it?

Slide 29

Slide 29 text

O N I O N G A R L I C It resembles , isn’t it?

Slide 30

Slide 30 text

Data Source Data Delivery Data Storage UI UI Coordinators Middleware L A Y E R E D DATA MODEL KEEP IT & SIMPLE

Slide 31

Slide 31 text

Coordinator
 Advanced implementation of said pattern in Swift, including care-free messaging through UIResponder chain. Avenue
 URLSession wrapper, handles boilerplate, enables seamless usage with Operation(Queue). Ambar
 Custom Core Data stack with automatic merge of background imports into main MOC. / radianttap

Slide 32

Slide 32 text

DEMO radianttap / Spotifier /

Slide 33

Slide 33 text

What were my problems, or… KILS Architecture Benefits Builds on system frameworks ɠ Rapid iterations ɡ Painless refactoring ɢ Low maintenance cost ɣ

Slide 34

Slide 34 text

/ radianttap SpeakerDeck.com / radianttap aplus.rs Aleksandar Vacić, radianttap.com @radiantav SLIDES DEV BLOG CONTACT