Slide 1

Slide 1 text

Server Side Swift with Vapor Natan Rolnik

Slide 2

Slide 2 text

Server Side Swift with Vapor Natan Rolnik You’re also a backend developer. (You just don’t know it yet.)

Slide 3

Slide 3 text

Hi, I’m Natan iOS @ monday.com "

Slide 4

Slide 4 text

Hi, I’m Natan iOS @ monday.com " @natanrolnik

Slide 5

Slide 5 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # iOS @ monday.com " @natanrolnik

Slide 6

Slide 6 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # • iPhone OS 3, Objective C was my 1st language ❤ iOS @ monday.com " @natanrolnik

Slide 7

Slide 7 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # • iPhone OS 3, Objective C was my 1st language ❤ • Passion for beautiful UI and animations iOS @ monday.com " @natanrolnik

Slide 8

Slide 8 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # • iPhone OS 3, Objective C was my 1st language ❤ • Passion for beautiful UI and animations • Basic web development/deployment knowledge iOS @ monday.com " @natanrolnik

Slide 9

Slide 9 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # • iPhone OS 3, Objective C was my 1st language ❤ • Passion for beautiful UI and animations • Basic web development/deployment knowledge • I love coding in Swift iOS @ monday.com " @natanrolnik

Slide 10

Slide 10 text

Hi, I’m Natan • Born & raised in Brazil, moved to Israel in 2011 # • iPhone OS 3, Objective C was my 1st language ❤ • Passion for beautiful UI and animations • Basic web development/deployment knowledge • I love coding in Swift • Author @ RayWenderlich.com (Server Side Swift) iOS @ monday.com " @natanrolnik

Slide 11

Slide 11 text

Quick Poll

Slide 12

Slide 12 text

Goals

Slide 13

Slide 13 text

Goals Familiarize with Vapor and its core concepts

Slide 14

Slide 14 text

Goals Familiarize with Vapor and its core concepts Inspire

Slide 15

Slide 15 text

Goals Familiarize with Vapor and its core concepts Inspire Have fun!

Slide 16

Slide 16 text

A Bit of History

Slide 17

Slide 17 text

A Bit of History

Slide 18

Slide 18 text

A Bit of History

Slide 19

Slide 19 text

A Bit of History

Slide 20

Slide 20 text

A Bit of History Ease of Use Less Flexibility New Language/Environment Great Flexibility

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

The Great Change

Slide 23

Slide 23 text

The Great Change Objective-C

Slide 24

Slide 24 text

The Great Change Objective-C

Slide 25

Slide 25 text

The Great Change Objective-C Swift

Slide 26

Slide 26 text

The Great Change Objective-C Swift

Slide 27

Slide 27 text

The Great Change Objective-C Swift

Slide 28

Slide 28 text

Why Swift on the Server?

Slide 29

Slide 29 text

Why Swift on the Server? Low Memory Footprint

Slide 30

Slide 30 text

Why Swift on the Server? Low Memory Footprint %

Slide 31

Slide 31 text

Why Swift on the Server? & Low Memory Footprint Blazing Fast %

Slide 32

Slide 32 text

async await More Advantages Memory Safety Type Safe Foundation Property Wrappers Compilation = Fail Early It’s Swift ❤

Slide 33

Slide 33 text

async await More Advantages Memory Safety Type Safe Foundation Property Wrappers Compilation = Fail Early It’s Swift ❤ Share Code with Packages

Slide 34

Slide 34 text

async await More Advantages Memory Safety Type Safe Foundation Property Wrappers Compilation = Fail Early It’s Swift ❤ Share Code with Packages Use Latest Language Features

Slide 35

Slide 35 text

async await More Advantages Memory Safety Type Safe Foundation Property Wrappers Compilation = Fail Early It’s Swift ❤ Share Code with Packages Use Latest Language Features 5.6

Slide 36

Slide 36 text

Current Status

Slide 37

Slide 37 text

Current Status “Is it ready for Production?”

Slide 38

Slide 38 text

Current Status • Vapor and AWS Smoke: the most popular frameworks “Is it ready for Production?”

Slide 39

Slide 39 text

Current Status • Vapor and AWS Smoke: the most popular frameworks • async/await “Is it ready for Production?”

Slide 40

Slide 40 text

Current Status • Vapor and AWS Smoke: the most popular frameworks • async/await • Swift Server Work Group “Is it ready for Production?”

Slide 41

Slide 41 text

Current Status • Vapor and AWS Smoke: the most popular frameworks • async/await • Swift Server Work Group • Docker images - M1 (arm64) support “Is it ready for Production?”

Slide 42

Slide 42 text

Current Status • Vapor and AWS Smoke: the most popular frameworks • async/await • Swift Server Work Group • Docker images - M1 (arm64) support • Of icial AWS Lambda package “Is it ready for Production?”

Slide 43

Slide 43 text

Current Status • Vapor and AWS Smoke: the most popular frameworks • async/await • Swift Server Work Group • Docker images - M1 (arm64) support • Of icial AWS Lambda package • Growing Ecosystem “Is it ready for Production?”

Slide 44

Slide 44 text

Vapor Web Framework Swift Package Command Line (CLI) Tool

Slide 45

Slide 45 text

Demo Meet Vapor and its Toolbox

Slide 46

Slide 46 text

⚽ Striker App ⚽

Slide 47

Slide 47 text

⚽ Striker App ⚽

Slide 48

Slide 48 text

⚽ Striker App ⚽

Slide 49

Slide 49 text

⚽ Striker App ⚽

Slide 50

Slide 50 text

⚽ Striker App ⚽

Slide 51

Slide 51 text

⚽ Striker App ⚽ Server

Slide 52

Slide 52 text

⚽ Striker App ⚽ Server

Slide 53

Slide 53 text

⚽ Striker App ⚽ Server

Slide 54

Slide 54 text

⚽ Striker App ⚽ Server iOS App

Slide 55

Slide 55 text

⚽ Striker App ⚽ Server ⚽ Shared Package iOS App Codable

Slide 56

Slide 56 text

⚽ Striker App ⚽ Server ⚽ Shared Package iOS App Web Codable

Slide 57

Slide 57 text

⚽ Striker App ⚽ Server iOS App Web

Slide 58

Slide 58 text

⚽ Striker App ⚽ Server iOS App Web

Slide 59

Slide 59 text

⚽ Striker App ⚽ Server iOS App Web 1. Create user

Slide 60

Slide 60 text

⚽ Striker App ⚽ Server iOS App Web 1. Create user 2. List users

Slide 61

Slide 61 text

⚽ Striker App ⚽ Server iOS App Web 1. Create user 2. List users 3. Register a goal

Slide 62

Slide 62 text

⚽ Striker App ⚽ Server iOS App Web 1. Create user 2. List users 3. Register a goal 4. Update iOS app

Slide 63

Slide 63 text

Live Coding Wish me luck!

Slide 64

Slide 64 text

Should I Replace My Entire Stack Today?

Slide 65

Slide 65 text

Should I Replace My Entire Stack Today? NO

Slide 66

Slide 66 text

So When Should I Use Swift on The Server?

Slide 67

Slide 67 text

So When Should I Use Swift on The Server? • Microservices

Slide 68

Slide 68 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend

Slide 69

Slide 69 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend • AWS Lambda - “Serverless”

Slide 70

Slide 70 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend • AWS Lambda - “Serverless” • New Apps

Slide 71

Slide 71 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend • AWS Lambda - “Serverless” • New Apps • Side Projects

Slide 72

Slide 72 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend • AWS Lambda - “Serverless” • New Apps • Side Projects • Internal tools

Slide 73

Slide 73 text

So When Should I Use Swift on The Server? • Microservices • BFF - Backend For Frontend • AWS Lambda - “Serverless” • New Apps • Side Projects • Internal tools • Embed Vapor in your iOS app (

Slide 74

Slide 74 text

Links https://github.com/natanrolnik/monday-night-16-05-22 https://vapor.codes https://docs.vapor.codes https://www.swift.org/blog/sswg-update/

Slide 75

Slide 75 text

Community https://vapor.team https://github.com/vapor-community https://github.com/vapor-community/awesome-vapor

Slide 76

Slide 76 text

Where To Go From Here?

Slide 77

Slide 77 text

Where To Go From Here? • Install the Vapor toolbox and play with it

Slide 78

Slide 78 text

Where To Go From Here? • Install the Vapor toolbox and play with it • Learn Vapor & Fluent basics

Slide 79

Slide 79 text

Where To Go From Here? • Install the Vapor toolbox and play with it • Learn Vapor & Fluent basics • Advanced:

Slide 80

Slide 80 text

Where To Go From Here? • Install the Vapor toolbox and play with it • Learn Vapor & Fluent basics • Advanced: • Play with packages such as Queues, Soto for AWS

Slide 81

Slide 81 text

Where To Go From Here? • Install the Vapor toolbox and play with it • Learn Vapor & Fluent basics • Advanced: • Play with packages such as Queues, Soto for AWS • Try to deploy a Vapor app or Lambda

Slide 82

Slide 82 text

Where To Go From Here? • Install the Vapor toolbox and play with it • Learn Vapor & Fluent basics • Advanced: • Play with packages such as Queues, Soto for AWS • Try to deploy a Vapor app or Lambda • Get started with Docker & Docker Compose

Slide 83

Slide 83 text

Thank You )