+ All Categories
Home > Software > FrenchKit: End to End Application Development with Swift

FrenchKit: End to End Application Development with Swift

Date post: 08-Jan-2017
Category:
Upload: chris-bailey
View: 265 times
Download: 1 times
Share this document with a friend
40
Swift @ IBM Engineering Team Chris Bailey(@Chris__Bailey) September 23rd, 2016 End to End Application Development Swift @ IBM
Transcript
Page 1: FrenchKit: End to End Application Development with Swift

Swift @ IBM Engineering TeamChris Bailey(@Chris__Bailey)

September 23rd, 2016

End to End Application Development

Swift @ IBM

Page 2: FrenchKit: End to End Application Development with Swift

User-facing Client Apps

Modern Application Design

App Services

3rd Party Services

On Prem Services

End Users

Swift @ IBM

Page 3: FrenchKit: End to End Application Development with Swift

Modern Application Design

End Users User-facing Client Apps

App Services

On Prem Services

3rd Party Services

Swift @ IBM

Page 4: FrenchKit: End to End Application Development with Swift

Modern Application Design

End Users User-facing Client Apps

App Services

On Prem Services

3rd Party Services

Developer ExperienceIntegrated

Swift @ IBM

Page 5: FrenchKit: End to End Application Development with Swift

Why Swift on the Server?

Swift @ IBM

Page 6: FrenchKit: End to End Application Development with Swift

4.0

0.0

20.0

40.0

60.0

80.0

100.0

120.0

Performant Applications

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Swift @ IBM

Page 7: FrenchKit: End to End Application Development with Swift

4.0 4.3

0.0

20.0

40.0

60.0

80.0

100.0

120.0

Performant Applications

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Swift @ IBM

Page 8: FrenchKit: End to End Application Development with Swift

4.0 4.315.8

0.0

20.0

40.0

60.0

80.0

100.0

120.0

Performant Applications

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Swift @ IBM

Page 9: FrenchKit: End to End Application Development with Swift

Performant Applications

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

4.0 4.315.8

134.2

0.0

20.0

40.0

60.0

80.0

100.0

120.0

Dur

atio

n (s

) (lo

wer

is b

ette

r)

Swift @ IBM

Page 10: FrenchKit: End to End Application Development with Swift

15.0

0.0

10.0

20.0

30.0

40.0

50.0

60.0

Low Memory

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Swift @ IBM

Page 11: FrenchKit: End to End Application Development with Swift

15.0

32.2

0.0

10.0

20.0

30.0

40.0

50.0

60.0

Low Memory

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Swift @ IBM

Page 12: FrenchKit: End to End Application Development with Swift

15.0

32.2

25.3

0.0

10.0

20.0

30.0

40.0

50.0

60.0

Low Memory

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Swift @ IBM

Page 13: FrenchKit: End to End Application Development with Swift

15.0

32.2

25.3

54.6

0.0

10.0

20.0

30.0

40.0

50.0

60.0

Low Memory

http://benchmarksgame.alioth.debian.org/u64q/performance.php?test=spectralnorm

Mem

ory

Usa

ge (M

B)

(low

er is

bet

ter)

Swift @ IBM

Page 14: FrenchKit: End to End Application Development with Swift

Swift is ideal for Cloud

Swift @ IBM

Page 15: FrenchKit: End to End Application Development with Swift

Isomorphic Development

Swift @ IBM

Create Swift Project

Page 16: FrenchKit: End to End Application Development with Swift

Isomorphic Development

Swift @ IBM

Create Swift Project

Deploy Deploy

Page 17: FrenchKit: End to End Application Development with Swift

Isomorphic Development

Swift @ IBM

Create Swift Project

Deploy DeployGenerate

Swagger APISpecification

•  Program in Swift on client and server

•  Share code on both sides

•  Automatically created Swagger APIs

Page 18: FrenchKit: End to End Application Development with Swift

Sharing tools and technologies

Swift @ IBM

Page 19: FrenchKit: End to End Application Development with Swift

How does this happen?

Swift @ IBM

Page 20: FrenchKit: End to End Application Development with Swift

Extend Swift to the server

Swift on the Server can attract Swift-based Developers

Swift @ IBM

Page 21: FrenchKit: End to End Application Development with Swift

December 3rd, 2015

Apache 2.0 Software Licence

Open Source Swift

Page 22: FrenchKit: End to End Application Development with Swift

Linux Platforms Darwin Platforms

Swift on Linux

Swift @ IBM

Swift

StandardLibrary Foundation Dispatch

Swift

StandardLibrary Foundation Dispatch

Consistent Runtime across Platforms

Page 23: FrenchKit: End to End Application Development with Swift

Add a Web Framework

Page 24: FrenchKit: End to End Application Development with Swift

Kitura: A Swift Web Framework and HTTP Server

http://kitura.ioSwift @ IBM

Page 25: FrenchKit: End to End Application Development with Swift

Server / Cloud Deployment Server / Cloud Deployment Apple Client Deployment

Client Facing App Client-Specific

Libraries

Kitura Web Framework

Swift @ IBM

Swift

StandardLibrary Foundation Dispatch

Swift

StandardLibrary Foundation Dispatch

Net

wor

king

Sec

urity

HTT

P P

arsi

ng

Application Libraries

Application Specific Cloud Services

Server-Specific Libraries

Consistent Runtime across Clients/Servers

Kitura-based Server !Built with Dispatch & Foundation

Application Libraries

Page 26: FrenchKit: End to End Application Development with Swift

Server / Cloud Deployment Server / Cloud Deployment Apple Client Deployment

Client Facing App Client-Specific

Libraries

Kitura Web Framework

Swift @ IBM

Swift

StandardLibrary Foundation Dispatch

Swift

StandardLibrary Foundation Dispatch

Net

wor

king

Sec

urity

HTT

P P

arsi

ng

Application Libraries

Application Specific Cloud Services

Server-Specific Libraries

Consistent Runtime across Clients/Servers

Kitura-based Server !Built with Dispatch & Foundation

Swift

“Server” APIs

Application Libraries

Page 27: FrenchKit: End to End Application Development with Swift

Swift on the Server is Real

Swift 3.0 + Kitura 1.0

Swift @ IBM

Page 28: FrenchKit: End to End Application Development with Swift

Let’s take a tour…

Swift @ IBM

Page 29: FrenchKit: End to End Application Development with Swift

Architecture

Web Framework Source

Swift Binary

Dispatch Foundation Package Manager

Swift Libraries

SwiftyJSON SwiftMongoDB

C Helpers & Interfaces

C Libraries

HttpParser HiRedis CURL PCRE2

Pluggable Components

Page 30: FrenchKit: End to End Application Development with Swift

Architecture

Web Framework Source

Swift Binary

Dispatch Foundation Package Manager

Swift Libraries

SwiftyJSON SwiftMongoDB

C Helpers & Interfaces

C Libraries

HttpParser HiRedis CURL PCRE2

Pluggable Components

Swift Libraries

Server APIs

Page 31: FrenchKit: End to End Application Development with Swift

Create an ApplicationFirst, create a new project directory

Next, create a new Swift project using the Swift Package Manager.

In Package.swift, add Kitura as a dependency for your project.

Page 32: FrenchKit: End to End Application Development with Swift

Create an ApplicationIn Sources/main.swift, add the following code.

Page 33: FrenchKit: End to End Application Development with Swift

Deploy an Application

Open your browser at http://localhost:8090

Compile and run your application:

Page 34: FrenchKit: End to End Application Development with Swift

Use Services

Page 35: FrenchKit: End to End Application Development with Swift

Deploy to Cloud

$ docker pull ibmcom/kitura-ubuntu:latest $ git clone https://github.com/IBM-Swift/Kitura-Starter-Bluemix

Page 36: FrenchKit: End to End Application Development with Swift

Using Cloud Tools

http://cloudtools.bluemix.net

• Deployment made easy

• Clone, code, push

• Demo projects to try

Page 37: FrenchKit: End to End Application Development with Swift

http://www.kitura.io/en/resources/tutorials.html

Tutorials• Creating a Todo-List Backend• Adding Authentication with Kitura-Credentials• Adding Sessions with Kitura-Session• Using Templating Engines with Kitura• Enabling SSL/TLS on Kitura• Using FastCGI with Kitura• Special Types of Response Handlers• Parsing Requests

Page 38: FrenchKit: End to End Application Development with Swift

Examples

Blitter Social Networkhttps://github.com/ibm-swift/blitter

BluePic Applicationhttps://github.com/ibm-swift/bluepic

Page 39: FrenchKit: End to End Application Development with Swift

Discover Try

Build

IBM Cloud Tools

Package Catalog Swift Sandbox

Kitura + Packages

DeploySwift @ IBM

Swift @ IBM

https://developer.ibm.com/swift/

Page 40: FrenchKit: End to End Application Development with Swift

Thank you!

Swift @ IBM


Recommended