Swift, a Swift Sample
@FinneyCanHelp aka Mike Finney
from CARFAX, Inc.
Twitter Tweet a Hi
Swift
 How Popular is Swift?
 Where is Swift used?
 What Swift Basic and Advanced Items You’ll See
 Swift Coding Examples Using Playground
 Swift Learning Resources
Popular Swift
Replacing Objective-C
Most Loved SO 2017 Survey
 Swift Ranks 4th - 63.9 %
 Java Ranks 17th - 50.5%
“% of developers who are developing with the language or
technology and have expressed interest in continuing to
develop with it”
-- Stack Overflow Developer Survey Results 2017
Most Dreaded
 Objective-C Ranks 6th – 68.1%
 Java Ranks 19th – 49.5%
“% of developers who are developing with the language or
technology but have not expressed interest in continuing
to do so”
-- Stack Overflow Developer Survey Results 2017
Blowing Away C Languages
 “Swift is intended as a replacement for C-based
languages (C, C++, and Objective-C).”
Source: swift.org/about
Where Swift?
 On macOS (Desktop apps),
 iOS (iPads and iPhones)
 watchOS (Apple Watch)
 tvOS (Apple TV)
 On Servers
 “Top Server-Side Swift frameworks at this time
are Vapor, Perfect, Kitura, and Zewo”
 “Current Features & Benefits of the Top Server-Side Swift
Frameworks” by Ryan Collins
Let’s Begin The Fun!
Swift Syntax
 Constants and Variables
 Basic Types: Int, String, arrays, dictionaries (like Java
Map), …
 Optionals – nil (like Java’s null)
 Basics: “if”, “for”, “switch”, “while”
 Tuples
Swift Syntax
 Functions
 Classes
 Enums – Oh, the power! 💪
 Closures
 Structs
 Generics
Swift Syntax
 Inheritance
 Protocols and Protocol Extensions
 http://j.mp/swiftBasics - Language Guide
No Time This Time
 MVC – Model View Controller in Swift and iOS
 MVVM (Model View View-Model) + Services; RxSwift
Swift Coding Examples
Demo Using Playgrounds
CARFAX Code-ish
enum ListingRequest: URLRequestConvertible {
case saveSearch(savedSearch: ConsumerSearch)
var method: HTTPMethod {
switch self {
case .saveSearch:
return .post
CARFAX Hiring - Choices
 http://bit.ly/carfaxAllJobsJuly - Straight to All Jobs
 http://www.CARFAX.com - click on Careers
 http://bit.ly/carfaxColumbiaJuly - Columbia Only
 http://bit.ly/carfaxDeveloperJuly - Developers
Swift Learning Resources
 The Swift Programming Language - The Basics
 Google “swift language reference”
 OR http://j.mp/swiftBasics
 IBM Swift Sandbox – https://swift.sandbox.bluemix.net
 https://stackoverflow.com/
 https://bitbucket.org/finneycanhelp/swift_sample
Resources
 Images from https://pexels.com
 Stack Overflow Developer Survey Results 2017 -
https://insights.stackoverflow.com/survey/2017
 Swift - https://swift.org – get an overview. Not best place to start learning.
 “Swift! Optionals?” – https://medium.com/ios-os-x-development/swift-optionals-
78dafaa53f3
 “Swift for the Java Guy Part 2: The Basics” – https://dzone.com/articles/swift-for-
the-java-guy-part-2-the-basics
Thank you!

Swift, a Swift Sample

  • 1.
    Swift, a SwiftSample @FinneyCanHelp aka Mike Finney from CARFAX, Inc.
  • 2.
  • 3.
    Swift  How Popularis Swift?  Where is Swift used?  What Swift Basic and Advanced Items You’ll See  Swift Coding Examples Using Playground  Swift Learning Resources
  • 4.
  • 5.
  • 6.
    Most Loved SO2017 Survey  Swift Ranks 4th - 63.9 %  Java Ranks 17th - 50.5% “% of developers who are developing with the language or technology and have expressed interest in continuing to develop with it” -- Stack Overflow Developer Survey Results 2017
  • 7.
    Most Dreaded  Objective-CRanks 6th – 68.1%  Java Ranks 19th – 49.5% “% of developers who are developing with the language or technology but have not expressed interest in continuing to do so” -- Stack Overflow Developer Survey Results 2017
  • 8.
    Blowing Away CLanguages  “Swift is intended as a replacement for C-based languages (C, C++, and Objective-C).” Source: swift.org/about
  • 9.
    Where Swift?  OnmacOS (Desktop apps),  iOS (iPads and iPhones)  watchOS (Apple Watch)  tvOS (Apple TV)  On Servers  “Top Server-Side Swift frameworks at this time are Vapor, Perfect, Kitura, and Zewo”  “Current Features & Benefits of the Top Server-Side Swift Frameworks” by Ryan Collins
  • 10.
  • 11.
    Swift Syntax  Constantsand Variables  Basic Types: Int, String, arrays, dictionaries (like Java Map), …  Optionals – nil (like Java’s null)  Basics: “if”, “for”, “switch”, “while”  Tuples
  • 12.
    Swift Syntax  Functions Classes  Enums – Oh, the power! 💪  Closures  Structs  Generics
  • 13.
    Swift Syntax  Inheritance Protocols and Protocol Extensions  http://j.mp/swiftBasics - Language Guide
  • 14.
    No Time ThisTime  MVC – Model View Controller in Swift and iOS  MVVM (Model View View-Model) + Services; RxSwift
  • 15.
  • 16.
  • 17.
    CARFAX Code-ish enum ListingRequest:URLRequestConvertible { case saveSearch(savedSearch: ConsumerSearch) var method: HTTPMethod { switch self { case .saveSearch: return .post
  • 18.
    CARFAX Hiring -Choices  http://bit.ly/carfaxAllJobsJuly - Straight to All Jobs  http://www.CARFAX.com - click on Careers  http://bit.ly/carfaxColumbiaJuly - Columbia Only  http://bit.ly/carfaxDeveloperJuly - Developers
  • 19.
    Swift Learning Resources The Swift Programming Language - The Basics  Google “swift language reference”  OR http://j.mp/swiftBasics  IBM Swift Sandbox – https://swift.sandbox.bluemix.net  https://stackoverflow.com/  https://bitbucket.org/finneycanhelp/swift_sample
  • 20.
    Resources  Images fromhttps://pexels.com  Stack Overflow Developer Survey Results 2017 - https://insights.stackoverflow.com/survey/2017  Swift - https://swift.org – get an overview. Not best place to start learning.  “Swift! Optionals?” – https://medium.com/ios-os-x-development/swift-optionals- 78dafaa53f3  “Swift for the Java Guy Part 2: The Basics” – https://dzone.com/articles/swift-for- the-java-guy-part-2-the-basics
  • 21.