u isomorphic swiftpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfbrief history of swift...

18
ISOMORPHIC SWIFT MDCC2016 Ӿᑏݎᘏय़տ

Upload: others

Post on 27-May-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

ISOMORPHIC SWIFT

MDCC2016

Page 2: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

祁⼀鸣 携程APP

国际机票主流程团队

Page 3: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

BRIEF HISTORY OF SWIFT• A modern language to develop applications for Apple’s

iOS and OS X platforms, as well as on Linux

• First Announced by Apple in WWDC 2014

• Version upgrade from Swift 1.0 to Swift 2.0 in one year

• Open Sourced in December 2015

• Swift 3.0 officially announced in September 2016

Page 4: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

SWIFT LANGUAGE STATUS

http://stackoverflow.com/research/developer-survey-2016

Page 5: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

WHY CLIENT SIDE SWIFT

• Expressiveness

• Safety

• Speed

Page 6: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

EXPRESSIVENESS

• Objective-CNSDate *newDate = [[NSDate alloc] init];

• Swiftvar newDate = NSDate()

Page 7: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

SAFETY

• Objective-CNSURL *newURL = [[NSURL alloc] initWithString:”http://ww.ctrip. com"];

• Swiftvar newURL = NSURL(string:”http://ww.ctrip. com")

Page 8: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

"SPEED"

• Swift is intended to be a replacement of Objective -C and the runtime performance is comparable if not faster

• Developer productivity

Page 9: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

SPEED

https://medium.com/@qutheory/server-side-swift-vs-the-other-guys-2-speed

Page 10: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

OPEN-SOURCE SWIFT

• Compiler and Standard Library

• Package Manager

• Core Libraries

• REPL

Page 11: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

Swift

• SPM

• Package.swift

• Packages

• REPL

Node.js

• NPM

• package.json

• node_modules

• REPL

Page 12: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

SERVER-SIDE SWIFT FRAMEWORKS

• IBM Kitura

• Vapor

• Perfect

• Zewo

Page 13: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

IBM KITURA• Kitura

• Swift Sandbox

• Bluemix (Swift Cloud Hosting)

Page 14: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

VAPOR

Most used web framework for Swift

Page 15: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

PERFECT

First freely available web framework for Swift

Page 16: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

ZEWO

A set of libraries for server-side development

Page 17: U ISOMORPHIC SWIFTpic.huodongjia.com/ganhuodocs/2017-06-19/1497852904.7.pdfBRIEF HISTORY OF SWIFT • A modern language to develop applications for Apple’s iOS and OS X platforms,

SERVER-SIDE SWIFT PROSPECTS

Cons

• Core Libraries not quite ready on Linux

• Swift version changes

Pros

• All the good stuff you’ve seen