SlideShare a Scribd company logo
1 of 84
Download to read offline
jensravens.com / SwiftConf 2016
Server Side Swift
Why it’s awesome and
why you should care.
Jens Ravens
jensravens.com / SwiftConf 2016
😱
jensravens.com / SwiftConf 2016
😱
jensravens.com / SwiftConf 2016
😱
jensravens.com / SwiftConf 2016
Who is this guy?
jensravens.com / SwiftConf 2016
Who is this guy?
(aka the shameless self promotion part)
jensravens.com / SwiftConf 2016
Jens Ravens
Developer at nerdgeschoss, a mobile first dev agency for sophisticated software. We
help startups and medium businesses to build awesome stuff.
jensravens.com / SwiftConf 2016
Jens Ravens
50% iOS / macOS using Swift
50% Web / API using Ruby on Rails
jensravens.com / SwiftConf 2016
Jens Ravens
50% iOS / macOS using Swift
50% Web / API using Ruby on Rails
jensravens.com / SwiftConf 2016
Jens Ravens
50% iOS / macOS using Swift
50% Web / API using Ruby on Rails
jensravens.com / SwiftConf 2016
Jens Ravens
50% iOS / macOS using Swift
50% Web / API using Ruby on Rails
jensravens.com / SwiftConf 2016
Jens Ravens
Also I blog about Swift stuff on jensravens.com and organize
the monthly swift.berlin meetup.
jensravens.com / SwiftConf 2016
What I am going to talk about…
jensravens.com / SwiftConf 2016
What I am going to talk about…
why Swift on the server might actually be a good idea
jensravens.com / SwiftConf 2016
What I am going to talk about…
a short introduction to http, the internet and everything else
why Swift on the server might actually be a good idea
jensravens.com / SwiftConf 2016
What I am going to talk about…
a short introduction to http, the internet and everything else
abstracting the server implementation from request handling
why Swift on the server might actually be a good idea
jensravens.com / SwiftConf 2016
What I am going to talk about…
a short introduction to http, the internet and everything else
abstracting the server implementation from request handling
Model, View, Controller, Router, Storage
why Swift on the server might actually be a good idea
jensravens.com / SwiftConf 2016
What I am going to talk about…
a short introduction to http, the internet and everything else
abstracting the server implementation from request handling
Model, View, Controller, Router, Storage
why Swift on the server might actually be a good idea
the current state of server side Swift
jensravens.com / SwiftConf 2016
Why Swift on the server might actually
be a good idea.
jensravens.com / SwiftConf 2016
Why Swift on the server might actually
be a good idea.
🚀
speed
jensravens.com / SwiftConf 2016
Why Swift on the server might actually
be a good idea.
🚀 🤓
speed developer happiness
jensravens.com / SwiftConf 2016
Why Swift on the server might actually
be a good idea.
🚀 🤓
speed developer happiness
jensravens.com / SwiftConf 2016
Raw Performance. 🚀
Ryan Collins, August 2016
jensravens.com / SwiftConf 2016
So server side Swift is screaming fast.
jensravens.com / SwiftConf 2016
So server side Swift is screaming fast.
It gives you more bang for the buck.
jensravens.com / SwiftConf 2016
So server side Swift is screaming fast.
It gives you more bang for the buck.
But here is a well kept secret…
jensravens.com / SwiftConf 2016
So server side Swift is screaming fast.
It gives you more bang for the buck.
But here is a well kept secret…
I just don't care.
jensravens.com / SwiftConf 2016
A look at last month’s spendings.
Server Costs
2 %
Office
11 %
Salaries
87 %
jensravens.com / SwiftConf 2016
A look at last month’s spendings.
faster development = more revenue
jensravens.com / SwiftConf 2016
Swift is fast enough. We should focus on
developer productivity instead.
jensravens.com / SwiftConf 2016
A short introduction to http, the internet and
everything else.
Browser
http://jensravens.com
Browser
http://jensravens.com
DNS Server
Browser
http://jensravens.com
DNS Server
;; ANSWER SECTION:
jensravens.com. 3600 INA 37.120.178.83
Browser
http://jensravens.com
DNS Server
;; ANSWER SECTION:
jensravens.com. 3600 INA 37.120.178.83
37.120.178.83
Browser
http://jensravens.com
DNS Server
37.120.178.83
Browser
http://jensravens.com
DNS Server
37.120.178.83
GET / HTTP/1.1
Host: jensravens.com
User-Agent: curl/7.43.0
Accept: */*
Browser
http://jensravens.com
DNS Server
37.120.178.83
Server
GET / HTTP/1.1
Host: jensravens.com
User-Agent: curl/7.43.0
Accept: */*
Browser
http://jensravens.com
DNS Server
37.120.178.83
Server
Load Balancer
GET / HTTP/1.1
Host: jensravens.com
User-Agent: curl/7.43.0
Accept: */*
Browser
http://jensravens.com
DNS Server
37.120.178.83
Server
Load Balancer
App App
GET / HTTP/1.1
Host: jensravens.com
User-Agent: curl/7.43.0
Accept: */*
Browser
DNS Server Server
Load Balancer
App App
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 7897
Connection: Keep-Alive
<!DOCTYPE html>
<html lang="en">
Browser
DNS Server Server
Load Balancer
App App
jensravens.com / SwiftConf 2016
Hey, that’s just some plain text over tcp!
jensravens.com / SwiftConf 2016
Hey, that’s just some plain text over tcp!
Yep, you’re right.
jensravens.com / SwiftConf 2016
Get a Request, give a Response.
public protocol Request {
var context: [String:AnyObject] { get set }
var method: HTTPMethod { get }
var path: String { get }
var params: [String:String] { get }
var headers: [String:String] { get }
var format: Format { get }
var body: Streamable? { get }
}
jensravens.com / SwiftConf 2016
Get a Request, give a Response.
public protocol Response {
var headers: [String: HeaderType] { get }
var code: StatusCode { get }
var content: Streamable { get }
}
public protocol Request {
var context: [String:AnyObject] { get set }
var method: HTTPMethod { get }
var path: String { get }
var params: [String:String] { get }
var headers: [String:String] { get }
var format: Format { get }
var body: Streamable? { get }
}
jensravens.com / SwiftConf 2016
Get a Request, give a Response.
public protocol Response {
var headers: [String: HeaderType] { get }
var code: StatusCode { get }
var content: Streamable { get }
}
public protocol Request {
var context: [String:AnyObject] { get set }
var method: HTTPMethod { get }
var path: String { get }
var params: [String:String] { get }
var headers: [String:String] { get }
var format: Format { get }
var body: Streamable? { get }
}
public protocol Streamable {
var stream: Void -> NSData? { get }
}
jensravens.com / SwiftConf 2016
But isn’t this the same for every app on every server?
jensravens.com / SwiftConf 2016
But isn’t this the same for every app on every server?
Yep, you’re right.
jensravens.com / SwiftConf 2016
Abstracting the server implementation
from request handling
Ruby: Rack.
Every app is just a function transforming request to response.
jensravens.com / SwiftConf 2016
Abstracting the server implementation
from request handling
Meet the Open Swift Standards.
https://github.com/open-swift
jensravens.com / SwiftConf 2016
Abstracting the server implementation
from request handling
Meet the Open Swift Standards.
https://github.com/open-swift
Open Swift Standard
Server Implementation
Your awesome App
The Internetz
jensravens.com / SwiftConf 2016
Structuring Web Applications in Swift with MVC-RS
jensravens.com / SwiftConf 2016
public typealias Controller = Request throws -> Response
Get a Request, give a Response: the Controller.
jensravens.com / SwiftConf 2016
public typealias Controller = Request throws -> Response
let myApp: Controller = { request in
return Response(code: 200, headers: [:], content: "Hello World")
}
Get a Request, give a Response: the Controller.
jensravens.com / SwiftConf 2016
Making things pretty: Rendering Views.
public protocol View {
func render() throws -> Streamable
func render() throws -> Response
var contentType: Format { get }
}
jensravens.com / SwiftConf 2016
public struct JSONView: View {
public var contentType: Format { return .JSON }
let contents: AnyObject
public init(_ contents: AnyObject) {
self.contents = contents
}
public func render() throws -> Streamable {
return try NSJSONSerialization.dataWithJSONObject(
contents, options: .PrettyPrinted)
}
}
jensravens.com / SwiftConf 2016
Models and Persistence: Storage.
struct Post {
let id: Int
var title: String
var content: String
}
jensravens.com / SwiftConf 2016
Models and Persistence: Storage.
protocol Repository {
associatedtype Element
func find(index: Int) -> Element
func query(conditions: Predicate) -> [Element]
}
struct Post {
let id: Int
var title: String
var content: String
}
jensravens.com / SwiftConf 2016
Models and Persistence: Storage.
protocol Repository {
associatedtype Element
func find(index: Int) -> Element
func query(conditions: Predicate) -> [Element]
}
struct Post {
let id: Int
var title: String
var content: String
}
let post = try postsRepository.find(request.params[“id"])
let attributes = ["id": post.id, "title": post.title]
return JSONView(attributes)
jensravens.com / SwiftConf 2016
Where to go next: the Router.
public final class Router {
public func get(path: String, app: Void -> Controller)
public func post(path: String, app: Void -> Controller)
…
public func controller(request: Request) throws -> Response
}
jensravens.com / SwiftConf 2016
let myApp: Controller = { request in
json = JSONView(["message":"Hello World #{request.params["id"]}"])
return Response(code: 200, headers: [:], content: try json.render())
}
Where to go next: the Router.
public final class Router {
public func get(path: String, app: Void -> Controller)
public func post(path: String, app: Void -> Controller)
…
public func controller(request: Request) throws -> Response
}
jensravens.com / SwiftConf 2016
let myApp: Controller = { request in
json = JSONView(["message":"Hello World #{request.params["id"]}"])
return Response(code: 200, headers: [:], content: try json.render())
}
Where to go next: the Router.
public final class Router {
public func get(path: String, app: Void -> Controller)
public func post(path: String, app: Void -> Controller)
…
public func controller(request: Request) throws -> Response
}
let router = Router()
router.get("messages/:id") { myApp }
serve(router.controller)
jensravens.com / SwiftConf 2016
MVC-RS in Review
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
Controller
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
Controller
Model
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
Controller
Model View
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
Controller Controller
Model View Model View
jensravens.com / SwiftConf 2016
MVC-RS in Review
Database External Webservice
Repository RepositoryRepository
Controller Controller
Model View Model View
Router
jensravens.com / SwiftConf 2016
Some Observations.
jensravens.com / SwiftConf 2016
Some Observations.
Routers are also controllers and therefore can be nested.
jensravens.com / SwiftConf 2016
Some Observations.
Models don’t inherit or conform to anything.
Routers are also controllers and therefore can be nested.
jensravens.com / SwiftConf 2016
Some Observations.
Models don’t inherit or conform to anything.
Controllers can call other controllers (Middleware).
Routers are also controllers and therefore can be nested.
jensravens.com / SwiftConf 2016
Some Observations.
Models don’t inherit or conform to anything.
Controllers can call other controllers (Middleware).
Client and server architecture are pretty similar which allows code sharing.
Routers are also controllers and therefore can be nested.
jensravens.com / SwiftConf 2016
The current state of server side Swift.
jensravens.com / SwiftConf 2016
My personal wishlist.
jensravens.com / SwiftConf 2016
My personal wishlist.
a framework that comes totally configurable, but batteries included
jensravens.com / SwiftConf 2016
My personal wishlist.
be explicit - but don’t be verbose
a framework that comes totally configurable, but batteries included
jensravens.com / SwiftConf 2016
My personal wishlist.
be explicit - but don’t be verbose
more projects conforming to Open Swift Standards
a framework that comes totally configurable, but batteries included
jensravens.com / SwiftConf 2016
My personal wishlist.
be explicit - but don’t be verbose
more projects conforming to Open Swift Standards
don’t just imitate other frameworks - use Swift’s
modern and type safe features
a framework that comes totally configurable, but batteries included
jensravens.com / SwiftConf 2016
Thank you.
Jens Ravens / @jensravens

More Related Content

What's hot

Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the ServerDoug Jones
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidenceJohn Congdon
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationRouven Weßling
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)Robert Swisher
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principlesPerl Careers
 
Deploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationDeploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationBen Limmer
 
IRC HTTP Stream in YAPC::Asia 2009
IRC HTTP Stream in YAPC::Asia 2009IRC HTTP Stream in YAPC::Asia 2009
IRC HTTP Stream in YAPC::Asia 2009Yusuke Wada
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
 
A reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webA reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webWallace Reis
 
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Etiene Dalcol
 
Laravel.IO A Use-Case Architecture
Laravel.IO A Use-Case ArchitectureLaravel.IO A Use-Case Architecture
Laravel.IO A Use-Case ArchitectureShawn McCool
 
Serverless Ballerina
Serverless BallerinaServerless Ballerina
Serverless BallerinaBallerina
 
A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To SwiftJohn Anderson
 

What's hot (20)

Async and Await on the Server
Async and Await on the ServerAsync and Await on the Server
Async and Await on the Server
 
Designing net-aws-glacier
Designing net-aws-glacierDesigning net-aws-glacier
Designing net-aws-glacier
 
Release with confidence
Release with confidenceRelease with confidence
Release with confidence
 
vienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentationvienna.js - Automatic testing of (RESTful) API documentation
vienna.js - Automatic testing of (RESTful) API documentation
 
SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)SDPHP - Percona Toolkit (It's Basically Magic)
SDPHP - Percona Toolkit (It's Basically Magic)
 
PSGI and Plack from first principles
PSGI and Plack from first principlesPSGI and Plack from first principles
PSGI and Plack from first principles
 
Deploying a Location-Aware Ember Application
Deploying a Location-Aware Ember ApplicationDeploying a Location-Aware Ember Application
Deploying a Location-Aware Ember Application
 
Ruby HTTP clients
Ruby HTTP clientsRuby HTTP clients
Ruby HTTP clients
 
appache_1
appache_1appache_1
appache_1
 
IRC HTTP Stream in YAPC::Asia 2009
IRC HTTP Stream in YAPC::Asia 2009IRC HTTP Stream in YAPC::Asia 2009
IRC HTTP Stream in YAPC::Asia 2009
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
 
A reviravolta do desenvolvimento web
A reviravolta do desenvolvimento webA reviravolta do desenvolvimento web
A reviravolta do desenvolvimento web
 
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
 
Laravel.IO A Use-Case Architecture
Laravel.IO A Use-Case ArchitectureLaravel.IO A Use-Case Architecture
Laravel.IO A Use-Case Architecture
 
RSpec 2 Best practices
RSpec 2 Best practicesRSpec 2 Best practices
RSpec 2 Best practices
 
Serverless Ballerina
Serverless BallerinaServerless Ballerina
Serverless Ballerina
 
A Modest Introduction To Swift
A Modest Introduction To SwiftA Modest Introduction To Swift
A Modest Introduction To Swift
 
Async await...oh wait!
Async await...oh wait!Async await...oh wait!
Async await...oh wait!
 

Similar to Server Side Swift

WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformWSO2
 
The state of server-side Swift
The state of server-side SwiftThe state of server-side Swift
The state of server-side SwiftCiprian Redinciuc
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scalajfarcand
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NETPeter Gfader
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRaymond Camden
 
Development In ASP.NET by Tanzim Saqib
Development In ASP.NET by Tanzim SaqibDevelopment In ASP.NET by Tanzim Saqib
Development In ASP.NET by Tanzim Saqibguestf8f959
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy WSO2
 
REST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentREST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentHyunghun Cho
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesPavol Pitoňák
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsJim Jeffers
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.jsAyush Mishra
 
Socket applications
Socket applicationsSocket applications
Socket applicationsJoão Moura
 
내꺼내꺼
내꺼내꺼내꺼내꺼
내꺼내꺼misty915
 

Similar to Server Side Swift (20)

WSO2 AppDev platform
WSO2 AppDev platformWSO2 AppDev platform
WSO2 AppDev platform
 
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected BusinessWSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
WSO2Con Asia 2014 - WSO2 AppDev Platform for the Connected Business
 
Jax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 PlatformJax WS JAX RS and Java Web Apps with WSO2 Platform
Jax WS JAX RS and Java Web Apps with WSO2 Platform
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
The state of server-side Swift
The state of server-side SwiftThe state of server-side Swift
The state of server-side Swift
 
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and ScalaWriting highly scalable WebSocket using the Atmosphere Framework and Scala
Writing highly scalable WebSocket using the Atmosphere Framework and Scala
 
Introduction to ASP.NET
Introduction to ASP.NETIntroduction to ASP.NET
Introduction to ASP.NET
 
Owin and Katana
Owin and KatanaOwin and Katana
Owin and Katana
 
Rapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoopRapid API Development with LoopBack/StrongLoop
Rapid API Development with LoopBack/StrongLoop
 
Web Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptxWeb Dev 21-01-2024.pptx
Web Dev 21-01-2024.pptx
 
JAX-RS.next
JAX-RS.nextJAX-RS.next
JAX-RS.next
 
Development In ASP.NET by Tanzim Saqib
Development In ASP.NET by Tanzim SaqibDevelopment In ASP.NET by Tanzim Saqib
Development In ASP.NET by Tanzim Saqib
 
Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy Kick Start your Application Development and Management Strategy
Kick Start your Application Development and Management Strategy
 
REST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side DevelopmentREST to JavaScript for Better Client-side Development
REST to JavaScript for Better Client-side Development
 
RichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile DevicesRichFaces - Testing on Mobile Devices
RichFaces - Testing on Mobile Devices
 
Building Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in RailsBuilding Mobile Friendly APIs in Rails
Building Mobile Friendly APIs in Rails
 
Walther Ajax4
Walther Ajax4Walther Ajax4
Walther Ajax4
 
An Overview of Node.js
An Overview of Node.jsAn Overview of Node.js
An Overview of Node.js
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
내꺼내꺼
내꺼내꺼내꺼내꺼
내꺼내꺼
 

More from Jens Ravens

Turning it up to 11 - Scaling Ruby on Rails to 100k rps
Turning it up to 11 - Scaling Ruby on Rails to 100k rpsTurning it up to 11 - Scaling Ruby on Rails to 100k rps
Turning it up to 11 - Scaling Ruby on Rails to 100k rpsJens Ravens
 
Working with Xcode and Swift Package Manager
Working with Xcode and Swift Package ManagerWorking with Xcode and Swift Package Manager
Working with Xcode and Swift Package ManagerJens Ravens
 
Server Side Swift with Swag
Server Side Swift with SwagServer Side Swift with Swag
Server Side Swift with SwagJens Ravens
 
Taming Asynchronous Transforms with Interstellar
Taming Asynchronous Transforms with InterstellarTaming Asynchronous Transforms with Interstellar
Taming Asynchronous Transforms with InterstellarJens Ravens
 
Hipster Oriented Programming
Hipster Oriented ProgrammingHipster Oriented Programming
Hipster Oriented ProgrammingJens Ravens
 
Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Jens Ravens
 
Swift: Immutability and You
Swift: Immutability and YouSwift: Immutability and You
Swift: Immutability and YouJens Ravens
 

More from Jens Ravens (8)

Turning it up to 11 - Scaling Ruby on Rails to 100k rps
Turning it up to 11 - Scaling Ruby on Rails to 100k rpsTurning it up to 11 - Scaling Ruby on Rails to 100k rps
Turning it up to 11 - Scaling Ruby on Rails to 100k rps
 
Working with Xcode and Swift Package Manager
Working with Xcode and Swift Package ManagerWorking with Xcode and Swift Package Manager
Working with Xcode and Swift Package Manager
 
Server Side Swift with Swag
Server Side Swift with SwagServer Side Swift with Swag
Server Side Swift with Swag
 
Taming Asynchronous Transforms with Interstellar
Taming Asynchronous Transforms with InterstellarTaming Asynchronous Transforms with Interstellar
Taming Asynchronous Transforms with Interstellar
 
Hipster Oriented Programming
Hipster Oriented ProgrammingHipster Oriented Programming
Hipster Oriented Programming
 
Swift 2
Swift 2Swift 2
Swift 2
 
Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)Functional Reactive Programming without Black Magic (UIKonf 2015)
Functional Reactive Programming without Black Magic (UIKonf 2015)
 
Swift: Immutability and You
Swift: Immutability and YouSwift: Immutability and You
Swift: Immutability and You
 

Recently uploaded

User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeKaylee Miller
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements SolutionsIQBG inc
 
BATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxBarakaMuyengi
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJpolinaucc
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.Ritesh Kanjee
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial FrontiersRaphaël Semeteys
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tipsmichealwillson701
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptxAGATSoftware
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityRandy Shoup
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurPriyadarshini T
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easymichealwillson701
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...Maxim Salnikov
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleShane Coughlan
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...jackiepotts6
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsconfluent
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfMind IT Systems
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevpmgdscunsri
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energyjeyasrig
 

Recently uploaded (20)

20140812 - OBD2 Solution
20140812 - OBD2 Solution20140812 - OBD2 Solution
20140812 - OBD2 Solution
 
User Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller ResumeUser Experience Designer | Kaylee Miller Resume
User Experience Designer | Kaylee Miller Resume
 
Enterprise Content Managements Solutions
Enterprise Content Managements SolutionsEnterprise Content Managements Solutions
Enterprise Content Managements Solutions
 
BATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data MeshBATbern52 Swisscom's Journey into Data Mesh
BATbern52 Swisscom's Journey into Data Mesh
 
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptxCYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
CYBER SECURITY AND CYBER CRIME COMPLETE GUIDE.pLptx
 
Technical improvements. Reasons. Methods. Estimations. CJ
Technical improvements.  Reasons. Methods. Estimations. CJTechnical improvements.  Reasons. Methods. Estimations. CJ
Technical improvements. Reasons. Methods. Estimations. CJ
 
8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.8 Steps to Build a LangChain RAG Chatbot.
8 Steps to Build a LangChain RAG Chatbot.
 
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
Unlocking AI:Navigating Open Source vs. Commercial FrontiersUnlocking AI:Navigating Open Source vs. Commercial Frontiers
Unlocking AI: Navigating Open Source vs. Commercial Frontiers
 
Mobile App Development process | Expert Tips
Mobile App Development process | Expert TipsMobile App Development process | Expert Tips
Mobile App Development process | Expert Tips
 
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
BusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptxBusinessGPT  - SECURITY AND GOVERNANCE  FOR GENERATIVE AI.pptx
BusinessGPT - SECURITY AND GOVERNANCE FOR GENERATIVE AI.pptx
 
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of SimplicityLarge Scale Architecture -- The Unreasonable Effectiveness of Simplicity
Large Scale Architecture -- The Unreasonable Effectiveness of Simplicity
 
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young EntrepreneurMinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
MinionLabs_Mr. Gokul Srinivas_Young Entrepreneur
 
Boost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made EasyBoost Efficiency: Sabre API Integration Made Easy
Boost Efficiency: Sabre API Integration Made Easy
 
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
If your code could speak, what would it tell you? Let GitHub Copilot Chat hel...
 
openEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scaleopenEuler Community Overview - a presentation showing the current scale
openEuler Community Overview - a presentation showing the current scale
 
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
03.2024_North America VMUG Optimizing RevOps using the power of ChatGPT in Ma...
 
Unlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insightsUnlocking the Power of IoT: A comprehensive approach to real-time insights
Unlocking the Power of IoT: A comprehensive approach to real-time insights
 
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdfFlutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
Flutter the Future of Mobile App Development - 5 Crucial Reasons.pdf
 
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDevLeveling Up your Branding and Mastering MERN: Fullstack WebDev
Leveling Up your Branding and Mastering MERN: Fullstack WebDev
 
renewable energy renewable energy renewable energy renewable energy
renewable energy renewable energy renewable energy  renewable energyrenewable energy renewable energy renewable energy  renewable energy
renewable energy renewable energy renewable energy renewable energy
 

Server Side Swift

  • 1. jensravens.com / SwiftConf 2016 Server Side Swift Why it’s awesome and why you should care. Jens Ravens
  • 5. jensravens.com / SwiftConf 2016 Who is this guy?
  • 6. jensravens.com / SwiftConf 2016 Who is this guy? (aka the shameless self promotion part)
  • 7. jensravens.com / SwiftConf 2016 Jens Ravens Developer at nerdgeschoss, a mobile first dev agency for sophisticated software. We help startups and medium businesses to build awesome stuff.
  • 8. jensravens.com / SwiftConf 2016 Jens Ravens 50% iOS / macOS using Swift 50% Web / API using Ruby on Rails
  • 9. jensravens.com / SwiftConf 2016 Jens Ravens 50% iOS / macOS using Swift 50% Web / API using Ruby on Rails
  • 10. jensravens.com / SwiftConf 2016 Jens Ravens 50% iOS / macOS using Swift 50% Web / API using Ruby on Rails
  • 11. jensravens.com / SwiftConf 2016 Jens Ravens 50% iOS / macOS using Swift 50% Web / API using Ruby on Rails
  • 12. jensravens.com / SwiftConf 2016 Jens Ravens Also I blog about Swift stuff on jensravens.com and organize the monthly swift.berlin meetup.
  • 13. jensravens.com / SwiftConf 2016 What I am going to talk about…
  • 14. jensravens.com / SwiftConf 2016 What I am going to talk about… why Swift on the server might actually be a good idea
  • 15. jensravens.com / SwiftConf 2016 What I am going to talk about… a short introduction to http, the internet and everything else why Swift on the server might actually be a good idea
  • 16. jensravens.com / SwiftConf 2016 What I am going to talk about… a short introduction to http, the internet and everything else abstracting the server implementation from request handling why Swift on the server might actually be a good idea
  • 17. jensravens.com / SwiftConf 2016 What I am going to talk about… a short introduction to http, the internet and everything else abstracting the server implementation from request handling Model, View, Controller, Router, Storage why Swift on the server might actually be a good idea
  • 18. jensravens.com / SwiftConf 2016 What I am going to talk about… a short introduction to http, the internet and everything else abstracting the server implementation from request handling Model, View, Controller, Router, Storage why Swift on the server might actually be a good idea the current state of server side Swift
  • 19. jensravens.com / SwiftConf 2016 Why Swift on the server might actually be a good idea.
  • 20. jensravens.com / SwiftConf 2016 Why Swift on the server might actually be a good idea. 🚀 speed
  • 21. jensravens.com / SwiftConf 2016 Why Swift on the server might actually be a good idea. 🚀 🤓 speed developer happiness
  • 22. jensravens.com / SwiftConf 2016 Why Swift on the server might actually be a good idea. 🚀 🤓 speed developer happiness
  • 23. jensravens.com / SwiftConf 2016 Raw Performance. 🚀 Ryan Collins, August 2016
  • 24. jensravens.com / SwiftConf 2016 So server side Swift is screaming fast.
  • 25. jensravens.com / SwiftConf 2016 So server side Swift is screaming fast. It gives you more bang for the buck.
  • 26. jensravens.com / SwiftConf 2016 So server side Swift is screaming fast. It gives you more bang for the buck. But here is a well kept secret…
  • 27. jensravens.com / SwiftConf 2016 So server side Swift is screaming fast. It gives you more bang for the buck. But here is a well kept secret… I just don't care.
  • 28. jensravens.com / SwiftConf 2016 A look at last month’s spendings. Server Costs 2 % Office 11 % Salaries 87 %
  • 29. jensravens.com / SwiftConf 2016 A look at last month’s spendings. faster development = more revenue
  • 30. jensravens.com / SwiftConf 2016 Swift is fast enough. We should focus on developer productivity instead.
  • 31. jensravens.com / SwiftConf 2016 A short introduction to http, the internet and everything else.
  • 34. Browser http://jensravens.com DNS Server ;; ANSWER SECTION: jensravens.com. 3600 INA 37.120.178.83
  • 35. Browser http://jensravens.com DNS Server ;; ANSWER SECTION: jensravens.com. 3600 INA 37.120.178.83 37.120.178.83
  • 37. Browser http://jensravens.com DNS Server 37.120.178.83 GET / HTTP/1.1 Host: jensravens.com User-Agent: curl/7.43.0 Accept: */*
  • 38. Browser http://jensravens.com DNS Server 37.120.178.83 Server GET / HTTP/1.1 Host: jensravens.com User-Agent: curl/7.43.0 Accept: */*
  • 39. Browser http://jensravens.com DNS Server 37.120.178.83 Server Load Balancer GET / HTTP/1.1 Host: jensravens.com User-Agent: curl/7.43.0 Accept: */*
  • 40. Browser http://jensravens.com DNS Server 37.120.178.83 Server Load Balancer App App GET / HTTP/1.1 Host: jensravens.com User-Agent: curl/7.43.0 Accept: */*
  • 41. Browser DNS Server Server Load Balancer App App
  • 42. HTTP/1.1 200 OK Content-Type: text/html Content-Length: 7897 Connection: Keep-Alive <!DOCTYPE html> <html lang="en"> Browser DNS Server Server Load Balancer App App
  • 43. jensravens.com / SwiftConf 2016 Hey, that’s just some plain text over tcp!
  • 44. jensravens.com / SwiftConf 2016 Hey, that’s just some plain text over tcp! Yep, you’re right.
  • 45. jensravens.com / SwiftConf 2016 Get a Request, give a Response. public protocol Request { var context: [String:AnyObject] { get set } var method: HTTPMethod { get } var path: String { get } var params: [String:String] { get } var headers: [String:String] { get } var format: Format { get } var body: Streamable? { get } }
  • 46. jensravens.com / SwiftConf 2016 Get a Request, give a Response. public protocol Response { var headers: [String: HeaderType] { get } var code: StatusCode { get } var content: Streamable { get } } public protocol Request { var context: [String:AnyObject] { get set } var method: HTTPMethod { get } var path: String { get } var params: [String:String] { get } var headers: [String:String] { get } var format: Format { get } var body: Streamable? { get } }
  • 47. jensravens.com / SwiftConf 2016 Get a Request, give a Response. public protocol Response { var headers: [String: HeaderType] { get } var code: StatusCode { get } var content: Streamable { get } } public protocol Request { var context: [String:AnyObject] { get set } var method: HTTPMethod { get } var path: String { get } var params: [String:String] { get } var headers: [String:String] { get } var format: Format { get } var body: Streamable? { get } } public protocol Streamable { var stream: Void -> NSData? { get } }
  • 48. jensravens.com / SwiftConf 2016 But isn’t this the same for every app on every server?
  • 49. jensravens.com / SwiftConf 2016 But isn’t this the same for every app on every server? Yep, you’re right.
  • 50. jensravens.com / SwiftConf 2016 Abstracting the server implementation from request handling Ruby: Rack. Every app is just a function transforming request to response.
  • 51. jensravens.com / SwiftConf 2016 Abstracting the server implementation from request handling Meet the Open Swift Standards. https://github.com/open-swift
  • 52. jensravens.com / SwiftConf 2016 Abstracting the server implementation from request handling Meet the Open Swift Standards. https://github.com/open-swift Open Swift Standard Server Implementation Your awesome App The Internetz
  • 53. jensravens.com / SwiftConf 2016 Structuring Web Applications in Swift with MVC-RS
  • 54. jensravens.com / SwiftConf 2016 public typealias Controller = Request throws -> Response Get a Request, give a Response: the Controller.
  • 55. jensravens.com / SwiftConf 2016 public typealias Controller = Request throws -> Response let myApp: Controller = { request in return Response(code: 200, headers: [:], content: "Hello World") } Get a Request, give a Response: the Controller.
  • 56. jensravens.com / SwiftConf 2016 Making things pretty: Rendering Views. public protocol View { func render() throws -> Streamable func render() throws -> Response var contentType: Format { get } }
  • 57. jensravens.com / SwiftConf 2016 public struct JSONView: View { public var contentType: Format { return .JSON } let contents: AnyObject public init(_ contents: AnyObject) { self.contents = contents } public func render() throws -> Streamable { return try NSJSONSerialization.dataWithJSONObject( contents, options: .PrettyPrinted) } }
  • 58. jensravens.com / SwiftConf 2016 Models and Persistence: Storage. struct Post { let id: Int var title: String var content: String }
  • 59. jensravens.com / SwiftConf 2016 Models and Persistence: Storage. protocol Repository { associatedtype Element func find(index: Int) -> Element func query(conditions: Predicate) -> [Element] } struct Post { let id: Int var title: String var content: String }
  • 60. jensravens.com / SwiftConf 2016 Models and Persistence: Storage. protocol Repository { associatedtype Element func find(index: Int) -> Element func query(conditions: Predicate) -> [Element] } struct Post { let id: Int var title: String var content: String } let post = try postsRepository.find(request.params[“id"]) let attributes = ["id": post.id, "title": post.title] return JSONView(attributes)
  • 61. jensravens.com / SwiftConf 2016 Where to go next: the Router. public final class Router { public func get(path: String, app: Void -> Controller) public func post(path: String, app: Void -> Controller) … public func controller(request: Request) throws -> Response }
  • 62. jensravens.com / SwiftConf 2016 let myApp: Controller = { request in json = JSONView(["message":"Hello World #{request.params["id"]}"]) return Response(code: 200, headers: [:], content: try json.render()) } Where to go next: the Router. public final class Router { public func get(path: String, app: Void -> Controller) public func post(path: String, app: Void -> Controller) … public func controller(request: Request) throws -> Response }
  • 63. jensravens.com / SwiftConf 2016 let myApp: Controller = { request in json = JSONView(["message":"Hello World #{request.params["id"]}"]) return Response(code: 200, headers: [:], content: try json.render()) } Where to go next: the Router. public final class Router { public func get(path: String, app: Void -> Controller) public func post(path: String, app: Void -> Controller) … public func controller(request: Request) throws -> Response } let router = Router() router.get("messages/:id") { myApp } serve(router.controller)
  • 64. jensravens.com / SwiftConf 2016 MVC-RS in Review
  • 65. jensravens.com / SwiftConf 2016 MVC-RS in Review Database
  • 66. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice
  • 67. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository
  • 68. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository Controller
  • 69. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository Controller Model
  • 70. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository Controller Model View
  • 71. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository Controller Controller Model View Model View
  • 72. jensravens.com / SwiftConf 2016 MVC-RS in Review Database External Webservice Repository RepositoryRepository Controller Controller Model View Model View Router
  • 73. jensravens.com / SwiftConf 2016 Some Observations.
  • 74. jensravens.com / SwiftConf 2016 Some Observations. Routers are also controllers and therefore can be nested.
  • 75. jensravens.com / SwiftConf 2016 Some Observations. Models don’t inherit or conform to anything. Routers are also controllers and therefore can be nested.
  • 76. jensravens.com / SwiftConf 2016 Some Observations. Models don’t inherit or conform to anything. Controllers can call other controllers (Middleware). Routers are also controllers and therefore can be nested.
  • 77. jensravens.com / SwiftConf 2016 Some Observations. Models don’t inherit or conform to anything. Controllers can call other controllers (Middleware). Client and server architecture are pretty similar which allows code sharing. Routers are also controllers and therefore can be nested.
  • 78. jensravens.com / SwiftConf 2016 The current state of server side Swift.
  • 79. jensravens.com / SwiftConf 2016 My personal wishlist.
  • 80. jensravens.com / SwiftConf 2016 My personal wishlist. a framework that comes totally configurable, but batteries included
  • 81. jensravens.com / SwiftConf 2016 My personal wishlist. be explicit - but don’t be verbose a framework that comes totally configurable, but batteries included
  • 82. jensravens.com / SwiftConf 2016 My personal wishlist. be explicit - but don’t be verbose more projects conforming to Open Swift Standards a framework that comes totally configurable, but batteries included
  • 83. jensravens.com / SwiftConf 2016 My personal wishlist. be explicit - but don’t be verbose more projects conforming to Open Swift Standards don’t just imitate other frameworks - use Swift’s modern and type safe features a framework that comes totally configurable, but batteries included
  • 84. jensravens.com / SwiftConf 2016 Thank you. Jens Ravens / @jensravens