Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Thinking in Swift

68 views

Published on

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.

Published in: Software
  • Be the first to comment

  • Be the first to like this

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

×