swift - uma fama repentina

45
Swift Uma fama repentina!

Upload: hanneli-tavante

Post on 24-Jan-2015

89 views

Category:

Technology


6 download

DESCRIPTION

TDC POA 2014 - trilha Mobile

TRANSCRIPT

Page 1: Swift  - uma fama repentina

SwiftUma fama repentina!

Page 2: Swift  - uma fama repentina

Oi!

Hanneli (a.k.a. @hannelita)!

Desenvolvedora @Codeminer42!

Jogos!

Café, Lego, Pokémon e bichos <3

HIRING

Page 3: Swift  - uma fama repentina

O que *NÃO* vamos ver aqui

Objective C é melhor que Swift!

Desenvolvedora com 5 anos de exp em Swift!

Evangelização de Swift!

Teorias chatas zzzzzzzz

Page 4: Swift  - uma fama repentina

O que *vamos* ver aqui

Alguns enroscos do Objective C !

O que os desenvolvedores sentiam falta!

Swift - resolvendo alguns desses buracos!

Swift - bizarrices!

GIFs e imagens legais <3

Page 5: Swift  - uma fama repentina

Desenvolvendo

Objective C

iOS

Xcode

SQLite

Foundation

C

C++

UIKit CoreGraphics

CoreServices

CoreLocation

ARC

Page 6: Swift  - uma fama repentina

Desenvolvendo

Page 7: Swift  - uma fama repentina

iOS Development

[ ][ ][ ][ ]

Page 8: Swift  - uma fama repentina

Se fosse só isso…

Agonia

Page 9: Swift  - uma fama repentina

Quem nunca…

Saiu implementando no .m

E esqueceu de colocar no .h ?

Page 10: Swift  - uma fama repentina

Quem nunca…

Page 11: Swift  - uma fama repentina

Quem nunca…

Não sabia o tipo de retorno de uma API…

E colocou um tipo nada a ver…

Porque não tinha documentação?

Page 12: Swift  - uma fama repentina

Quem nunca…

Page 13: Swift  - uma fama repentina

Quem nunca…

Tomou um erro de compilação…

Porque faltou um simples

; ?

Page 14: Swift  - uma fama repentina

Quem nunca…

Page 15: Swift  - uma fama repentina

Noooo

Page 16: Swift  - uma fama repentina

Noooo

Page 17: Swift  - uma fama repentina

SWIFT!

Page 18: Swift  - uma fama repentina

YEEES

Page 19: Swift  - uma fama repentina

O Swift suaviza quase tudo isso

Page 20: Swift  - uma fama repentina

.m e .h no mesmo lugar

Page 21: Swift  - uma fama repentina

auto-detecta os tipos

Page 22: Swift  - uma fama repentina

auto-detecta os tipos

var tdc : String = "TDC"

var tdc = "TDC"

Page 23: Swift  - uma fama repentina

Não precisa de ;

Page 24: Swift  - uma fama repentina

Consigo chamar métodos sem []

Page 25: Swift  - uma fama repentina

FAVOR NÃO TROLLAR

Page 26: Swift  - uma fama repentina

**NÃO**

var tdc = 2014!tdc = “Oi!"

Page 27: Swift  - uma fama repentina

**NÃO**

var meusNumerosLegais = ![1,33,345,349]

meusNumerosLegais.append(“trololol")

Page 28: Swift  - uma fama repentina

**NÃO**

var numero : Int = 0

numero = nil

Page 29: Swift  - uma fama repentina

Swift possui algumas 'bizarrices'

Optionals

Page 30: Swift  - uma fama repentina

Swift possui algumas 'bizarrices'

Optionals∆ Existe um valor e ele é igual a

alguma coisa

∆ Não existe NENHUM valor

Page 31: Swift  - uma fama repentina

Swift possui algumas 'bizarrices'

Optionals

Page 32: Swift  - uma fama repentina

Swift possui algumas 'bizarrices'

Optionals

Vamos ver um pouco de código

Page 33: Swift  - uma fama repentina

Swift possui algumas 'bizarrices'

Optionals

1. Meet Playground!

Page 34: Swift  - uma fama repentina

Optionals

Page 35: Swift  - uma fama repentina

Optionals

let palestrasCount = hanneli.palestras!.quantidade

Não FUNCIONAAA fsdhufuhfsuhfhuefwkfhudfs

Page 36: Swift  - uma fama repentina

Optionals

Page 37: Swift  - uma fama repentina

Optionals

Não tenho um objeto Palestra!

Instanciamos um!

Não tem nenhum valor MESMO!

Page 38: Swift  - uma fama repentina

Optionals

Page 39: Swift  - uma fama repentina

MOAR cool stuffTraz um pouco de ‘FP' (Programação funcional)!

Closure!

Tuple!

Generics!

Map e Filters

Page 40: Swift  - uma fama repentina

Is it production ready?

Page 41: Swift  - uma fama repentina

Is it production ready?Existem poucos exemplos!

Existe pouco material de estudo!

Existe menos conteúdo no StackOverflow!

A IDE da Apple dá uns paus!

Page 42: Swift  - uma fama repentina

DISCLAIMER

MINHA VISÃO

Você não precisa concordar, discordar ou achar que estou xingando/elogiando

Page 43: Swift  - uma fama repentina

Minha visãoSwift: BACANA! Traz um pouco de ‘Ruby-like' para o mundo de iOS!

Menos verboso! :D!

Alguns conceitos confusos!

Como muitas vertentes de FP, temos que lidar com . ! e etc.

Page 44: Swift  - uma fama repentina

Valeu!!!Perguntas?

[email protected]@hannelita

Page 45: Swift  - uma fama repentina

Referênciashttp://www.slideshare.net/talesp/swift-optionals !

http://www.slideshare.net/jollen/mokoversity-course-swift-101-3-hours?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=1!

http://www.slideshare.net/giordano/a-swift-introduction-to-swift?next_slideshow=1!

http://www.slideshare.net/giordano/a-swift-introduction-to-swift?next_slideshow=1!

http://www.slideshare.net/ThoughtWorks/taking-swiftfora-spinmrc?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=10!

http://www.slideshare.net/newgenapps/developing-ios-apps-with-swift?qid=525c7536-b9e1-4d45-b8da-0447854f6a93&v=qf1&b=&from_search=11!

Apple Official Reference