Isomorphic Swift: A Myth or Reality · • Why Swift? • Swift on Server-side - Kitura • Tools...
Transcript of Isomorphic Swift: A Myth or Reality · • Why Swift? • Swift on Server-side - Kitura • Tools...
Isomorphic Swift: A Myth or RealityVidyasagar Machupalli, Offering Manager for Dev Productivity, IBM
• VidyasagarMSC.com • @VidyasagarMSC
Why Am I here?
• Isomorphism !!
• Why Swift?
• Swift on Server-side - Kitura
• Tools
• Code!!
ISOMORPHISM
Isomorphism is a very general concept that appears in several areas of mathematics. The word derives from the Greek iso, meaning "equal," and morphosis, meaning "to form" or "to shape.”
Source: Wolfram MathWorld
Technically….Isomorphic
“can execute both on the client and the server”
Why Swift?
SWIFT ON SERVER KITURA
Swift@IBM
Kitura: An intro
Kitura.io
“A high performance and simple to use web framework for building modern Swift applications.”
Routing with Kitura import Kitura
// Create a new routerlet router = Router()
// Handle HTTP GET requests to /router.get("/") { request, response, next in response.send("Hello, World!") next()}
// Add an HTTP server and connect it to the routerKitura.addHTTPServer(onPort: 8080, with: router)
// Start the Kitura runloop (this call never returns)Kitura.run()
API Reference - Kitura.io
•Core •Credentials •Persistence •Sessions •Communications •Templating •Other Middlewares
Use Familiar Libraries
Leverage Docker For Your Development
docker pull ibmcom/swift-ubuntu:latest
docker run -i -t -v <absolute path to the swift package>:/root/<swift package name> ibmcom/swift-ubuntu:latest /bin/bash
Isomorphic Application
CreateSwiftProject
Deploy Deploy
DEMO
NearBYhttps://github.com/VidyasagarMSC/NearBY.git
Thank you