Server Side Swift

39
Server Side Swift Hüseyin APTİOĞLU | Software Infrastructure

Transcript of Server Side Swift

Page 1: Server Side Swift

Server Side Swift

Huumlseyin APTİOĞLU | Software Infrastructure

Agenda

bull Crash-Course Swiftbull Swift Package Managerbull Server Side bull Benchmarking

Swift

bull 1940s -gt 9 programming languagesbull 1950s -gt 58 programming languages

bull Fortran (concept)bull Fortran II bull Lispbull hellip

bull 1960s -gt 113 programming languagesbull Fortran IVbull Basicbull Cobolbull hellip

bull 1970s -gt 170 programming languagesbull Pascalbull Smaltalkbull Cbull hellip

bull 1980s -gt 231 programming languagesbull Turbo Pascalbull Erlangbull C ++bull Objective Cbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 1990s -gt 292 programming languagesbull Pythonbull Javabull Rubybull Visual Basic bull Delphi bull hellip

bull 2000s -gt 339 programming languagesbull Cbull Scalabull Gobull hellip

bull 2010s -gt 354 programming languagesbull Rustbull Kotlinbull Elmbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 355 Swift

bull v10 in September 2014bull Opened in Dec 2015bull v22 first ver in the Openbull v301

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 2: Server Side Swift

Agenda

bull Crash-Course Swiftbull Swift Package Managerbull Server Side bull Benchmarking

Swift

bull 1940s -gt 9 programming languagesbull 1950s -gt 58 programming languages

bull Fortran (concept)bull Fortran II bull Lispbull hellip

bull 1960s -gt 113 programming languagesbull Fortran IVbull Basicbull Cobolbull hellip

bull 1970s -gt 170 programming languagesbull Pascalbull Smaltalkbull Cbull hellip

bull 1980s -gt 231 programming languagesbull Turbo Pascalbull Erlangbull C ++bull Objective Cbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 1990s -gt 292 programming languagesbull Pythonbull Javabull Rubybull Visual Basic bull Delphi bull hellip

bull 2000s -gt 339 programming languagesbull Cbull Scalabull Gobull hellip

bull 2010s -gt 354 programming languagesbull Rustbull Kotlinbull Elmbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 355 Swift

bull v10 in September 2014bull Opened in Dec 2015bull v22 first ver in the Openbull v301

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 3: Server Side Swift

Swift

bull 1940s -gt 9 programming languagesbull 1950s -gt 58 programming languages

bull Fortran (concept)bull Fortran II bull Lispbull hellip

bull 1960s -gt 113 programming languagesbull Fortran IVbull Basicbull Cobolbull hellip

bull 1970s -gt 170 programming languagesbull Pascalbull Smaltalkbull Cbull hellip

bull 1980s -gt 231 programming languagesbull Turbo Pascalbull Erlangbull C ++bull Objective Cbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 1990s -gt 292 programming languagesbull Pythonbull Javabull Rubybull Visual Basic bull Delphi bull hellip

bull 2000s -gt 339 programming languagesbull Cbull Scalabull Gobull hellip

bull 2010s -gt 354 programming languagesbull Rustbull Kotlinbull Elmbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 355 Swift

bull v10 in September 2014bull Opened in Dec 2015bull v22 first ver in the Openbull v301

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 4: Server Side Swift

Swift

bull 1990s -gt 292 programming languagesbull Pythonbull Javabull Rubybull Visual Basic bull Delphi bull hellip

bull 2000s -gt 339 programming languagesbull Cbull Scalabull Gobull hellip

bull 2010s -gt 354 programming languagesbull Rustbull Kotlinbull Elmbull hellip

httpwwwslidesharenetGiordanoScalzothe-joy-of-serverside-swift-developmentqid=c2bc7c73-5bac-47e1-b834-45ac4b35eddeampv=ampb=ampfrom_search=7

Swift

bull 355 Swift

bull v10 in September 2014bull Opened in Dec 2015bull v22 first ver in the Openbull v301

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 5: Server Side Swift

Swift

bull 355 Swift

bull v10 in September 2014bull Opened in Dec 2015bull v22 first ver in the Openbull v301

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 6: Server Side Swift

Swift Tour

Mutable

Variables

Immutable

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 7: Server Side Swift

Swift Tour

Mutable

Type Inference

Immutable

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 8: Server Side Swift

Swift Tour

Optionals

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 9: Server Side Swift

Swift Tour

Function parameter names

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 10: Server Side Swift

Swift Tour

Guard Statement

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 11: Server Side Swift

Swift Tour

Closures

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 12: Server Side Swift

Swift Tour

Tuples

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 13: Server Side Swift

Swift Tour

Extensions

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 14: Server Side Swift

Swift Tour

and more hellip

bull Enumerationsbull Inheritancebull Initializationbull Error Handlingbull Type Castingbull Genericsbull Access Controlbull hellipbull hellip

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 15: Server Side Swift

Swift

Why is Swift a good choice for server-side

bull Fast

bull Modern

bull Safe

bull Interactive

bull Open Source

bull Apple

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 16: Server Side Swift

Server-side App Trade Off

Why is Swift a good choice for server-side Ap

p Pe

rfor

man

ce

Developer Productivity

CC++

ObjCJava

Perl

JavaScript

PythonRuby

Lua

Groovy

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 17: Server Side Swift

ARC

Automatic Reference Counting (ARC)

Swift manages the memory for you but unlike many other high level languages it doesnrsquot use a garbage collector to do this

- No periodically running- No pause- The CPU cycles for your own program

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 18: Server Side Swift

Automatic Reference Counting (ARC)

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 19: Server Side Swift

LLVMLLVM is actually an umbrella project that includes a variety of compilers and low level tools

In short LLVM compiles your code to a platform-neutral Intermediary Representation (IR) which can then be optimised and converted to the desired architecture This allows all platform optimisation efforts to be concentrated in one placeFor Swift Apple added a new layer to this architecture the Swift Intermediate Language (SIL)

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 20: Server Side Swift

SPM

Swift Package Manager

bull Part of Swift 3bull Init projectbull Generate Xcode Projbull Resolve dependencies

The Swift Package Manager is a tool for managing the distribution of Swift code Itrsquos integrated with the Swift build system to automate the process of downloading compiling and linking dependencies

Packageswift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 21: Server Side Swift

Swift

bull Swift is easier to readbull Swift is easier to maintainbull Swift is safebull Swift is unified with memory managementbull Swift requires less code

Swift vs Objective-C

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 22: Server Side Swift

Swift

Swift vs JavaSwift version 30-dev (LLVM 491f98861f Clang 2ff6ce54d0 Swift fd4bd4c965)swift-DEVELOPMENT-SNAPSHOT-2016-11-29-a-ubuntu1604Target x86_64-unknown-linux-gnu

java version 180_92Java(TM) SE Runtime Environment (build 180_92-b14)Java HotSpot(TM) 64-Bit Server VM (build 2592-b14 mixed mode)

httpsbenchmarksgamealiothdebianorgu64qswifthtml

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 23: Server Side Swift

II Most Loved

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 24: Server Side Swift

GitHub - appleswift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 25: Server Side Swift

Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 26: Server Side Swift

open-source

Officially only Linux is supported

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 27: Server Side Swift

open-source

Unofficially

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 28: Server Side Swift

Swift on Android

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 29: Server Side Swift

Install swift to linux

bull Install required dependencies$ sudo apt-get install clang libicu-dev

bull Download the latest swift binary release from httpsswiftorgdownloadreleases

bull Extract the archive $ tar xzf swift-ltVERSIONgt-ltPLATFORMgttargz

bull Add the Swift toolchain to your path$ export PATH=pathtousrbin$PATH

bull Test with REPL (Read Eval Print Loop)

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 30: Server Side Swift

Swift Scripts

usrbinenv swiftlet fruits = [Banana Mango Apple Orange]let sortedFruits = fruitssorted$0 lt $1print(sortedFruits)

chmod +x sortswiftsortswift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 31: Server Side Swift

Creating an Executable

Contents of file helloswift

println(Hello world)

$ swiftc helloswift $ hello Hello world

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 32: Server Side Swift

Web Frameworks

bull Perfect (9871)bull Vapor (7786)bull IBM Kitura (5002)bull Swifton (2042)bull Swifter (1852)bull Zewo (1502)bull hellipbull bull

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 33: Server Side Swift

Perfect 20

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 34: Server Side Swift

Vapor

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 35: Server Side Swift

Kitura

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 36: Server Side Swift

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)blog

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 37: Server Side Swift

Benchmarking

wrk -d 10m -t 4 -c 20 http100111(PORT)json

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 38: Server Side Swift

Ready for Production

Not Yet

- Web frameworks lt 1 year- Server = Maturity

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39
Page 39: Server Side Swift

IBTECH

  • Slide 1
  • Slide 2
  • Slide 3
  • Slide 4
  • Slide 5
  • Slide 6
  • Slide 7
  • Slide 8
  • Slide 9
  • Slide 10
  • Slide 11
  • Slide 12
  • Slide 13
  • Slide 14
  • Slide 15
  • Slide 16
  • Slide 17
  • Slide 18
  • Slide 19
  • Slide 20
  • Slide 21
  • Slide 22
  • Slide 23
  • Slide 24
  • Slide 25
  • Slide 26
  • Slide 27
  • Slide 28
  • Slide 29
  • Slide 30
  • Slide 31
  • Slide 32
  • Slide 33
  • Slide 34
  • Slide 35
  • Slide 36
  • Slide 37
  • Slide 38
  • Slide 39