The addition of support for Swift as a server-side programming language makes it possible to use not just the same language on client and server, but also to reuse APIs and code. This opens up a world of possibilities for creating and deploying new types of applications. This session will introduce you to new models of client and server interaction for application development, and show you how to rapidly build an app with both client and server components written in Swift.
Presented at FrenchKit: September 2016
3. Modern Application Design
End Users User-facing
Client Apps
App Services
On Prem Services
3rd Party Services
Swift @ IBM
4. Modern Application Design
End Users User-facing
Client Apps
App Services
On Prem Services
3rd Party Services
Developer Experience
Integrated
Swift @ IBM
17. Isomorphic Development
Swift @ IBM
Create Swift Project
Deploy DeployGenerate
Swagger API
Specification
• Program in Swift on client and server
• Share code on both sides
• Automatically created Swagger APIs
22. Linux PlatformsDarwin Platforms
Swift on Linux
Swift @ IBM
Swift
Standard
Library
Foundation Dispatch
Swift
Standard
Library
Foundation Dispatch
Consistent
Runtime across
Platforms
24. Kitura: A Swift Web Framework and HTTP Server
http://kitura.io
Swift @ IBM
25. Server / Cloud DeploymentServer / Cloud DeploymentApple Client Deployment
Client Facing App
Client-Specific
Libraries
Kitura Web Framework
Swift @ IBM
Swift
Standard
Library
Foundation Dispatch
Swift
Standard
Library
Foundation Dispatch
Networking
Security
HTTPParsing
Application
Libraries
Application Specific Cloud Services
Server-Specific Libraries
Consistent
Runtime across
Clients/Servers
Kitura-based Server!
Built with Dispatch &
Foundation
Application
Libraries
26. Server / Cloud DeploymentServer / Cloud DeploymentApple Client Deployment
Client Facing App
Client-Specific
Libraries
Kitura Web Framework
Swift @ IBM
Swift
Standard
Library
Foundation Dispatch
Swift
Standard
Library
Foundation Dispatch
Networking
Security
HTTPParsing
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
27.
Swift on the Server is Real
Swift 3.0 + Kitura 1.0
Swift @ IBM
31. Create an Application
First, 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.
37. 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