Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Server-side Swift
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Petr Pavlik
June 20, 2016
Programming
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Server-side Swift
Petr Pavlik
June 20, 2016
More Decks by Petr Pavlik
See All by Petr Pavlik
XcodeGen
petrpavlik
0
170
Video Streaming
petrpavlik
0
21
Danger feat. SwiftLint on Linux
petrpavlik
0
570
Other Decks in Programming
See All in Programming
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Workers Cache を知る
syumai
0
360
ChromeでローカルLLM
ryu1013
0
140
sbt 2.0: takeoff
eed3si9n
0
160
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.2k
気持ちぃ〜角丸 Squircle
ryu1013
0
310
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
0
880
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
golang-bob.pdf
iwatsukayura
0
130
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
232
55k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
2
2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.4k
ラッコキーワード サービス紹介資料
rakko
1
5.3M
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Designing for Timeless Needs
cassininazir
1
530
The untapped power of vector embeddings
frankvandijk
2
1.9k
Facilitating Awesome Meetings
lara
57
7.2k
Bash Introduction
62gerente
615
220k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Transcript
Server-side Swift Petr Pavlik wormapp.co @ptrpavlik
Why Swift?
Why Swift? It helps you write safer code
Swift struct User { let id: String = guuid() var
name: String var aboutMe: String? } var user = User(name: "Petr", aboutMe: nil)
Swift var user = User(name: "Petr", aboutMe: nil) print("\(user)") User(id:
"34jk43k43k", name: "Petr", aboutMe: nil)
Swift var user = User(name: "Petr", aboutMe: nil) user.id =
"123" //error
Swift var user = User(name: "Petr", aboutMe: nil) user.aboutMe =
"something creative" //ok let immutableUser = user immutableUser.aboutMe = "!"#" //error
What Is Open Source
What Is Open Source • Swift Compiler
What Is Open Source • Swift Compiler • Foundation Framework
& GCD • Networking, calendar, filesystem, threading, ...
What Is Open Source • Swift Compiler • Foundation Framework
& GCD • Networking, calendar, filesystem, threading, ... • Swift Package Manager • Dependency manager
None
What Is Open Source • Swift Compiler • Foundation Framework
& GCD • Networking, calendar, filesystem, threading, ... • Swift Package Manager • Dependency manager • XCTest • Unit testing
Example App feat. Kitura
Example App $ swift build --init
Example App $ swift build --init !
Example App Example ├── Package.swift ├── Sources │ └── main.swift
└── .swiftenv
Package.swift import PackageDescription let package = Package( name: "example", dependencies:
[ .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 0, minor: 17) ])
main.swift import Kitura
main.swift import Kitura let router = Router()
main.swift import Kitura let router = Router() router.get("/") { request,
response, next in response.send("Hello, World!") next() }
main.swift import Kitura let router = Router() router.get("/") { request,
response, next in response.send("Hello, World!") next() } Kitura.addHTTPServer(onPort: 8090, with: router)
main.swift import Kitura let router = Router() router.get("/") { request,
response, next in response.send("Hello, World!") next() } Kitura.addHTTPServer(onPort: 8090, with: router) Kitura.run()
main.swift import Kitura let router = Router() router.get("/") { request,
response, next in response.send("Hello, World!") next() } Kitura.addHTTPServer(onPort: 8090, with: router) Kitura.run() //!
Example App $ swift build
Example App Example ├── Package.swift ├── Sources │ └── main.swift
├── Packages │ └── Kitura-0.16.1 │ └── Kitura-net-0.16.0 │ └── Kitura-Sys-0.16.0 │ └── LoggerAPI-0.8.0 └── .build └── debug └── example
Example App $ .build/debug/example
Example App $ .build/debug/example $ curl http://localhost:8090 Hello, World!
Example App $ swift build -X generates an Xcode project
None
Frameworks • Kitura - !/IBM-Swift/Kitura • Perfect - !/PerfectlySoft/Perfect •
Vapor - !/qutheory/vapor
Deployment • Docker • https://hub.docker.com/r/ibmcom/kitura-ubuntu/ • http://kubernetes.io • Heroku, IBM
Bluemix • Buildpack • Procfile • .swiftenv
Thank you! @ptrpavlik