Pro Yearly is on sale from $80 to $50! »

Flying away from the nest (Bye Bye UIKit)

Flying away from the nest (Bye Bye UIKit)

From the very beginning of your journey as iOS developer, UIKit is always there to help you. It helps you to walk your first steps, populate table views, handle notifications, create beautiful layouts and more. But as time goes by, you become more experienced and some day you realise that you have to leave the nest and become less dependent on UIKit. Let’s check how this turns out for you and see if we really need UIKit and iOS simulator to run and test our code.

Also known as "Short story about love"

C000c81ba3431780f90bcb18001cfb55?s=128

Eliasz Sawicki

April 12, 2017
Tweet

Transcript

  1. Flying away from the nest (Bye bye UIKit) @EliSawic

  2. About me Eliasz Sawicki Blog: www.eliaszsawicki.com Twitter: @EliSawic www.brightinventions.pl @EliSawic

  3. A short story about Love @EliSawic

  4. A short story about Love 1. Friendship @EliSawic

  5. A short story about Love 1. Friendship 2. Love @EliSawic

  6. A short story about Love 1. Friendship 2. Love 3.

    Doubt @EliSawic
  7. A short story about Love 1. Friendship 2. Love 3.

    Doubt 4. Betrayal @EliSawic
  8. A short story about Love 1. Friendship 2. Love 3.

    Doubt 4. Betrayal 5. Starting over again @EliSawic
  9. A short story about Love 1. Friendship 2. Love 3.

    Doubt 4. Betrayal 5. Starting over again 6. Rebuild the trust @EliSawic
  10. How does it end? @EliSawic

  11. Friendship @EliSawic

  12. Objective-C @EliSawic

  13. The UIKit @EliSawic

  14. Why do we need UIKit? @EliSawic

  15. Love @EliSawic

  16. Swift @EliSawic

  17. Tests! @EliSawic

  18. Why do we need tests? @EliSawic

  19. Why cars need brakes? @EliSawic

  20. Test Driven Development @EliSawic

  21. Doubt @EliSawic

  22. Slow feedback loops @EliSawic

  23. Long build times @EliSawic

  24. No tests for you today @EliSawic

  25. Betrayal @EliSawic

  26. React-Native @EliSawic

  27. Testing feels natural @EliSawic

  28. Qucik reloading @EliSawic

  29. Starting over again @EliSawic

  30. What was the problem? @EliSawic

  31. Slow feedback loop @EliSawic

  32. Long build times @EliSawic

  33. Rebuild the trust @EliSawic

  34. MVC @EliSawic

  35. MVC @EliSawic

  36. MVVM @EliSawic

  37. MVVM @EliSawic

  38. Why would you remove UIKit? @EliSawic

  39. struct Person { var firstName: String var lastName: String var

    birthday: Date } @EliSawic
  40. class PersonView: UIView { private var person: Person private var

    dateFormatter = DateFormatter() init(person: Person) { self.person = person super.init(frame: .zero) setupView() } private func setupView() { dateFormatter.dateStyle = .short birthdayLabel.text = dateFormatter.string(from: person.birthday) titleLabel.text = person.firstName + person.lastName } func workButtonTapped() { // Some complicated logic } } @EliSawic
  41. protocol PersonViewModel { var title: String {get} var birthday: String

    {get} func doSomeWork() } class PersonView: UIView { private var viewModel: PersonViewModel init(viewModel: PersonViewModel) { self.viewModel = viewModel super.init(frame: .zero) setupView() } private func setupView() { titleLabel.text = viewModel.title birthdayLabel.text = viewModel.birthday } func workButtonTapped() { viewModel.doSomeWork() } } @EliSawic
  42. class DetailedPersonViewModel: PersonViewModel { var title: String var birthday: String

    var dateFormatter = DateFormatter() init(person: Person) { title = person.firstName + " " + person.lastName dateFormatter.dateStyle = .short birthday = dateFormatter.string(from: person.birthday) } func doSomeWork() { // Some complicated logic } } @EliSawic
  43. Dumb Views @EliSawic

  44. Logic @EliSawic

  45. Why are they still together? @EliSawic

  46. Multiple targets @EliSawic

  47. One for UIKit @EliSawic

  48. One for logic @EliSawic

  49. Two for Tests @EliSawic

  50. Better architecture @EliSawic

  51. Easier to maintain @EliSawic

  52. Speeded up tests @EliSawic

  53. Faster builds @EliSawic

  54. Can they be faster? @EliSawic

  55. Long time ago... @EliSawic

  56. Something went wrong @EliSawic

  57. Flow Controllers @EliSawic

  58. MVVM + FlowControllers @EliSawic

  59. Work on your flow @EliSawic

  60. Feel young again @EliSawic

  61. Code or didn't happen @EliSawic

  62. How does it end? @EliSawic

  63. It depends on you @EliSawic