Other Stuff
• File System
• Compression
• Encryption /
Cryptography
• Logging
• Command Line
Access
• Push Notifications
• Networking
• Parsers (XML/JSON)
• …
Slide 58
Slide 58 text
https://github.com/Awesome-
Server-Side-Swift/TheList
Other Stuff
Slide 59
Slide 59 text
Goin’
Deeper
!
Slide 60
Slide 60 text
Communicating
Sequential
Processes
• concurrently
executing entities;
• communicating by
sending “messages”
to each other.
Slide 61
Slide 61 text
Communicating
Sequential
Processes
• provides two
concurrency
primitives namely
coroutines and
channels
• allow concurrent
programming in the
style of Golang.
Slide 62
Slide 62 text
Communicating
Sequential
Processes:
Channels
• a thread-safe
queue;
• any entity can add
messages or retrieve
messages from a
channel without
worrying about
interference;
• by default, a channel
is synchronous.
Slide 63
Slide 63 text
Communicating
Sequential
Processes:
Coroutines
• a procedure executing
concurrently with
other coroutines;
• a coroutine may
send messages to and
receive messages
from channels;
Slide 64
Slide 64 text
Communicating
Sequential
Processes
• you might get “some”
parallelism with this
approach–but not a
lot;
• if channel is not
ready a coroutine
waits by giving
way to other
coroutines
Slide 65
Slide 65 text
Communicating
Sequential
Processes
a single thread can
“multiplex” thousands
of routines and ensure
that “logically
concurrent entities” are
making progress
Functions as a
Service /
Serverless
Architecture
• functions as a unit
of application logic;
• development focus on
well defined units of
business logic.
Slide 79
Slide 79 text
• without decisions
related to how this
logic is deployed or
scaled;
• frees the developer
from deployment
concerns.
Functions as a
Service /
Serverless
Architecture
Slide 80
Slide 80 text
• running back-end
code without
managing your own
server systems or
applications;
• deployment is very
different to
traditional systems;
• horizontal scaling is
completely automatic.
Functions as a
Service /
Serverless
Architecture
Slide 81
Slide 81 text
• Amazon AWS
Lambda;
• Google Cloud
Functions;
• Windows Azure
Functions;
• Auth0 Webtasks.
Functions as a
Service /
Serverless
Architecture
Slide 82
Slide 82 text
https://github.com/algal/
SwiftOnLambda
Functions as a
Service /
Serverless
Architecture
Slide 83
Slide 83 text
“people have been
doing "BIG-BOY"
EXPERIMENTS
with FULL-STACK
SWIFT.”
Swift to
JavaScript
Compiler
https://github.com/shift-js/shift-js
Slide 96
Slide 96 text
func greet(person:String, event:String) -> String {
return "Hello \(person). Welcome to \(event)!"
}
greet("Augusto", event: "CocoaHeads") Swift to
JavaScript
Compiler
function greet(person, event) {
return 'Hello ' + person + '. Welcome to ' + event +
'!';
}
greet('Augusto', 'CocoaHeads');
Slide 97
Slide 97 text
• Basic Declarations
and Assignment;
• Basic Operators;
• Arrays and
Dictionaries;
• Control Flow;
• Functions;
• String Interpolation
and Concatenation
Swift to
JavaScript
Compiler
Slide 98
Slide 98 text
Swift to
TypeScript
Compiler
https://github.com/
marcelganczak/swift-js-transpiler
Slide 99
Slide 99 text
let array: [String] = ["CocoaHeads", "is", "top"]
print(array.count)
print(array[0].characters.count)
Swift to
TypeScript
Compiler
const array:Array = [ "CocoaHeads" , "is" ,
“top!" ];
console.log(array.length);
console.log(array[0].length);
Slide 100
Slide 100 text
• data types
(primitives, tuples,
arrays, dictionaries,
sets)
• control flow (if, for-
in, while)
• optionals & chaining
• functions & closures
Swift to
TypeScript
Compiler