swift on the server

16
Swift on the Server Robert F. Dickerson Devoxx US, March 2017

Upload: devevents

Post on 05-Apr-2017

10 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Swift on the Server

Swift on the ServerRobert F. DickersonDevoxx US, March 2017

Page 2: Swift on the Server

@rfdickerson

Swift Programming Language

Strong types

Static types

Automatic Reference Counting

Optionals

Algebraic Data types

Closures

Page 3: Swift on the Server

@rfdickerson

Swift language growth

RedMonk rating: 11

Page 4: Swift on the Server

@rfdickerson

Why Swift on the Server?

Page 5: Swift on the Server

@rfdickerson

Performant ApplicationsD

urat

ion

(s) l

ower

is b

ette

r

0

33.5

67

100.5

134

Swift Java NodeJS Ruby

134.2

15.84.34

Page 6: Swift on the Server

@rfdickerson

Low MemoryD

urat

ion

(s) l

ower

is b

ette

r

0.00

15.00

30.00

45.00

60.00

Swift Java NodeJS Ruby

54.6

25.332.2

15

Page 7: Swift on the Server

@rfdickerson

Swift is ideal for Cloud

Page 8: Swift on the Server

@rfdickerson

Isomorphic Development

mobilebackend

Page 9: Swift on the Server

@rfdickerson

Use familiar libraries

Page 10: Swift on the Server

@rfdickerson

Server-side Swift Frameworks

KituraVaporPerfect Zewokitura.io

http://www.zewo.io/www.vapor.io

Page 11: Swift on the Server

@rfdickerson

Routing with Kitura

router.get("/hello") { request, response, callNextHandler in

response.status(.OK).send("Hello, World!") callNextHandler() }

Page 12: Swift on the Server

@rfdickerson

FROM ibmcom/swift-ubuntu-runtime:latest LABEL Description=""

EXPOSE 8080

WORKDIR $HOME COPY . $HOME

RUN swift build —configuration release CMD .build/release/Server

Page 13: Swift on the Server

@rfdickerson

Swift Working Group

Create standards for:

• Basic Networking

• Security and Encryption

• HTTP and Websockets

Page 14: Swift on the Server

@rfdickerson

Swift Sandbox

https://swift.sandbox.bluemix.net

Page 15: Swift on the Server

@rfdickerson

Package Catalog

https://packagecatalog.com

Page 16: Swift on the Server

@rfdickerson

BookLearn about:

• Eliminate bugs in your programs• Managing asynchrony• Swift Package Manager• Writing a REST webservice• Authentication• Database