O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.
Thinking in Swift
Classes
Problems with classes
• Implicit sharing
• Class inheritance is too intrusive
• Lost type relationships
Protocol Oriented
Programming
https://developer.apple.com/videos/play/wwdc2015/408/
Protocol Oriented
Programming
• Protocols are more flexible
• Structs are lightweight
• Protocol extensions
• Retroactive ...
MVC
Model - View - View Model
Functional Reactive
Programming
Streams
Transformations
Bindings
RXSwift
• Observable
• Variable
• Driver
• bindTo
Objective-C libraries
Networking library
• Based on NSURLConnection
• No dependency on Objective-C
• Not complex requirements
• To try something...
Networking
Start with a protocol
protocol HTTP {
func executeRequest(request: Request) -> Result<Response,
NSError>
}
Demo
• Table views
• Protocols
• HTTP client
Finishing thoughts
• More expressive
• Less bugs
• Better testing
• Different
• Fun
var questions?
https://martinmitrevski.com
Próximos SlideShares
Carregando em…5
×

Thinking in Swift

76 visualizações

Publicada em

Presentation about our experiences in developing an app in Swift. Which design and architecture decisions we took, what was the impact of those decisions and how the language taught us to think and develop in different ways.

Publicada em: Software
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

Thinking in Swift

  1. 1. Thinking in Swift
  2. 2. Classes
  3. 3. Problems with classes • Implicit sharing • Class inheritance is too intrusive • Lost type relationships
  4. 4. Protocol Oriented Programming https://developer.apple.com/videos/play/wwdc2015/408/
  5. 5. Protocol Oriented Programming • Protocols are more flexible • Structs are lightweight • Protocol extensions • Retroactive modelling
  6. 6. MVC
  7. 7. Model - View - View Model
  8. 8. Functional Reactive Programming Streams Transformations Bindings
  9. 9. RXSwift • Observable • Variable • Driver • bindTo
  10. 10. Objective-C libraries
  11. 11. Networking library • Based on NSURLConnection • No dependency on Objective-C • Not complex requirements • To try something new
  12. 12. Networking Start with a protocol protocol HTTP { func executeRequest(request: Request) -> Result<Response, NSError> }
  13. 13. Demo • Table views • Protocols • HTTP client
  14. 14. Finishing thoughts • More expressive • Less bugs • Better testing • Different • Fun
  15. 15. var questions? https://martinmitrevski.com

×