Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Server-Side Swift
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Simone Civetta
November 09, 2016
Programming
0
82
Server-Side Swift
Talk given in French during XebiCon 2016.
Simone Civetta
November 09, 2016
Tweet
Share
More Decks by Simone Civetta
See All by Simone Civetta
2021: CI for Mobile: State of The Art
viteinfinite
0
380
MVI : une architecture robuste et moderne pour vos applications mobiles
viteinfinite
2
530
Cross-Platform Modules with Kotlin/Native (v. 2018.10)
viteinfinite
0
110
Face Recognition with Vision & Core ML
viteinfinite
1
1.1k
Shared Cross-Platform Modules with Kotlin/Native
viteinfinite
1
320
Server-Side Swift @ Devoxx FR
viteinfinite
0
120
Swift on the Raspberry PI
viteinfinite
0
120
Be the Quality You Want to See in Your App [Swift Edition]
viteinfinite
1
420
Swift : Nouvelles du front
viteinfinite
0
99
Other Decks in Programming
See All in Programming
AWS Infrastructure as Code の新機能 2025 総まとめ~ SA 4人による怒涛のデモ祭り ~
konokenj
8
1.8k
AI巻き込み型コードレビューのススメ
nealle
2
2.3k
Gemini for developers
meteatamel
0
120
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
160
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
7
1.2k
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
260
CSC307 Lecture 08
javiergs
PRO
0
690
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
380
オブザーバビリティ駆動開発って実際どうなの?
yohfee
1
510
AIフル活用時代だからこそ学んでおきたい働き方の心得
shinoyu
0
150
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
290
Package Management Learnings from Homebrew
mikemcquaid
0
280
Featured
See All Featured
Test your architecture with Archunit
thirion
1
2.2k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.4k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
350
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.1k
Chasing Engaging Ingredients in Design
codingconduct
0
120
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
170
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
9.9k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
63
53k
Believing is Seeing
oripsolob
1
67
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
130
Technical Leadership for Architectural Decision Making
baasie
2
270
Become a Pro
speakerdeck
PRO
31
5.8k
Transcript
1
Salut 2
Simone Civetta 3
Je suis un développeur iOS 4
6 ans 5
6
3,5 ans 7
8
9
10
11
12
13
Enfin... 14
Plan ➀ Les Origines ➁ État de l'art ➂ Pourquoi
l'utiliser ? ➃ Swift Server dans la vraie vie ➄ Évolutions 15
1. Les origines 16
17
18
Pourquoi Open Source ? 19
20
21
22
23
24
2. État de l'art 25
Swift 3 26
1.0 27
1.1 28
1.2 29
2.0 30
2.1 31
2.2 32
2.3 33
Swift 3 34
1 version tous les 3,42 mois 35
Un langage complet 36
37
38
39
40
41
Bibliothèques tierces 42
Bibliothèques tierces stables 43
44
45
46
Bibliothèques C 47
Frameworks Web 48
49
50
51
52
53
Swift Package Manager 54
SPM swift package init swift package fetch swift package update
swift package generate-xcodeproj 55
Swift Package Catalog 56
57
58
59
Quelques images Docker ☞ swiftdocker/swift/ ☞ ibmcom/kitura-ubuntu/ ☞ zewo/todobackend/ 60
Qualité du code 61
62
63
64
65
Metriques de qualité Pour en savoir plus... speakerdeck.com/viteinfinite/be-the-quality-you-want-to-see-in- your-app-swift-edition 66
67
68
Enfin... 69
3. Pourquoi l'utiliser ? 70
Développement actif 71
72
73
74
75
76
77
Performance 78
Performance 79
Performance 80
Memory Source: http://benchmarksgame.alioth.debian.org 81
Applications isomorphes 82
4. Dans la vraie vie 83
84
85
86
Package.swift import PackageDescription let package = Package( name: "xebicon", dependencies:
[ .Package(url: "https://github.com/IBM-Swift/Kitura.git", majorVersion: 1, minor: 0), .Package(url: "https://github.com/feinstruktur/CRabbitMQ", majorVersion: 1) ]) 87
Serveur HTTP import Kitura let router = Router() router.post("/vote/station", handler:
{ request, response, next in do { try processVoteRequest(request) } catch { debugPrint(error) response.send(status: .badRequest) } next() }) Kitura.addHTTPServer(onPort: 8080, with: router) Kitura.run() 88
Build $ swift build Linking CHTTPParser Compile Swift Module 'Socket'
(3 sources) Compile Swift Module 'HeliumLogger' (1 sources) Compile Swift Module 'SwiftyJSON' (2 sources) Compile Swift Module 'SSLService' (1 sources) Compile Swift Module 'KituraNet' (29 sources) Compile Swift Module 'Kitura' (40 sources) Compile Swift Module 'xebicon' (12 sources) Linking ./.build/debug/xebicon 89
Bilbliothèques C func publish(message: String, exchange: String, key: String) throws
{ guard let connection = self.connection else { throw AMQPConnectorError.notConnected } amqp_basic_publish(connection, Constants.defaultChannel, amqp_cstring_bytes(exchange), amqp_cstring_bytes(key), 0, 0, nil, amqp_cstring_bytes(message)) } 90
Tests func testPostVote() { let router = HTTPController().router performServerTest(router) {
expectation in self.performRequest("post", path: "vote/station", requestModifier: { request in request.write(from: "{" + "\"trainId\": 1," + "\"media\": \"MOBILE\"," + "\"userId\": \"23de45f\"" + "}") }) { response in XCTAssertEqual(response!.statusCode, HTTPStatusCode.OK) expectation.fulfill() } } } 91
92
Tout s'est bien passé™ 93
Enfin... 94
95
96
97
98
Cross platform #if os(Linux) import Glibc #else import Darwin #endif
99
Swift Build 100
Swift Package Manager Mess swift package generate-xcodeproj 101
Tester c'est linker Undefined symbols for architecture x86_64: "test2.test2.init ()
-> test2.test2", referenced from: test2Tests.test2Tests.(testExample () -> ()). (implicit closure #1) in test2Tests.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 102
5. Évolutions 103
Encore plus de Frameworks 104
Encore plus de APIs Swift 105
106
107
Peut-on le déployer en prod ? 108
Oui ! 109
Enfin... 110
Merci ! 111
Simone Civetta 112
Je suis un développeur iOS 113
Je suis un développeur Back 114
Enfin... 115
116