Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Server Side Swift

Server Side Swift

Introduction on Server Side Swift development with popular frameworks.
Speaker: Prasen Revankar
Prasen works as Team Lead at Fafadia Tech.

Talk Video: https://www.youtube.com/watch?v=kZgDyc4eiyY

Presented at Swift Mumbai Chapter 8 Meetup hosted by Eros Now
https://www.meetup.com/Swift-Mumbai/events/259194853/

Eeb061c8b2816b771920da1b3e7904a3?s=128

Swift India

April 13, 2019
Tweet

Transcript

  1. Server Side Swift By Prasen Revankar

  2. Team Lead at Fafadia Tech ! Web Development ◦ Django,

    Flask, ReactJS, NodeJS, SocketIO ! Mobile Development ◦ Swift, Objective C, Phonegap Introduction
  3. Agenda ! Why Server-Side Swift? ! Why Vapor? ! Demo

    App ! Downsides
  4. Life Cycle of Web Request

  5. ! Modern language ! Safe ! Small memory footprint !

    Less memory ! Non blocking architecture ! Server side development/ components ! Benefits of swift on server ! Supports both Linux & Mac ! Standard Libraries ! Foundation, Dispatch & XC Test ! Compiler Command Line tools Why Server-Side Swift?
  6. Server Side Swift Frameworks 1. Vapor (16k) 2. Perfect (13k)

    3. Kitura (7k) 4. Zewo (1.8k)
  7. Why Vapor? 1. Most Popular 2. Modern through and through

    swift 4.1 3. Codable everywhere 4. Complete Swift stack 5. Community
  8. What is Vapor? 1. Framework to write web application, api,

    server application in swift Created on Feb 16, by Tanner Nelson & Logan Wright 2. Components a. Fluent (ORM) b. HTTP c. Leaf (Templating) 3. Built on top of Swift NIO
  9. Downsides 1. Asynchronous architecture (Learning curve) 2. Tooling (For linux)

    3. Foundation 4. Ecosystem
  10. Demo 1. Get Started 2. Requirement 3. Install vapor 4.

    Verify Installation 5. Hello, World Project 6. Build & Run
  11. Folder Structure . ├── Public ├── Sources │ ├── App

    │ │ ├── Controllers │ │ ├── Models │ │ ├── boot.swift │ │ ├── configure.swift │ │ └── routes.swift │ └── Run │ └── main.swift ├── Tests │ └── AppTests └── Package.swift
  12. Conclusion If you’re a beginner to web development, but have

    worked with Swift for some time, you’ll find it’s easy to create robust, fully-featured web apps and web APIs with Vapor
  13. Thank you!