Factory Design Pattern in Swift & iOS (2023)

Поділитися
Вставка
  • Опубліковано 21 жов 2024
  • In this video we will explore the factory design pattern for iOS development using Swift. Specifically we will focus on exemplifying the pattern with a screen factory object. The factory pattern is a common architectural pattern used in scalable large scale iOS projects and applications. It is common in industry and essential to master.
    FREE 3-DAY CRASH COURSE FROM ESSENTIAL DEVELOPER:
    essentialdevel...
    💻 Source Code: / iosacademy
    🎥 Subscribe for more: www.youtube.co...
    😎 Like my teaching style? Check out some of my most popular courses! courses.iosaca...
    👉🏼 Connect (personal LinkedIn) / afrazsiddiqui
    🚀 Follow on LinkedIn / ios-academy
    ** Popular Series
    Building Instagram: courses.iosaca...
    Building TikTok: / @iosacademy
    SwiftUI for Beginners: ios-academy.te...
    ** Get Skillshare free for 2 Months and learn iOS
    www.skillshare...
    ** Manage all your investments from app earnings on Betterment!
    bit.ly/3eBwlI9
    ** Grow your own UA-cam tech channel with TubeBuddy:
    www.tubebuddy....
    #swift #architecture #iosdeveloper

КОМЕНТАРІ • 19

  • @micahburnside2281
    @micahburnside2281 3 місяці тому +1

    Its better not not have any mistakes so that the person coding along with you doesn’t get told the wrong information while they are learning.

  • @gijoecodes
    @gijoecodes Рік тому +2

    Very interesting. First time I’ve heard of it. Normally if I have repetitive code I create an extension of a particular class. This looks so much better. Perhaps I’ll try to incorporate this into my apps. Incidentally, when my simulator stops working. I just quit the app and it gets fixed. For me erasing it means that I would have to log back in.

  • @emiralkal4548
    @emiralkal4548 Рік тому

    is this design pattern same with builder pattern? Or they are something different?

  • @dartdragoon5929
    @dartdragoon5929 Рік тому +1

    Thanks for the explanation! It's the factory the same as a mapper then?

  • @GleiksonAri
    @GleiksonAri Рік тому +2

    Can this Designer Pattern be used in projects with any architecture (VIPER, MVC, MVVM)?

    • @3366Har
      @3366Har Рік тому +1

      Конечно, можно. Одно другому не мешает

    • @iOSAcademy
      @iOSAcademy  Рік тому +1

      Yes, absolutely

    • @ConernicusRex
      @ConernicusRex Рік тому +1

      All architectures are made up of various design patterns. you can use any you'd like they simply may not be best for the job.

  • @jsedlacekjr
    @jsedlacekjr Рік тому +2

    We use this pattern + coordinators where I work at

  • @victorriurean
    @victorriurean Рік тому

    cool

  • @rev_kous9275
    @rev_kous9275 Рік тому

    I'm waiting for Clean Architecture implementation in iOS (UIKit/Swift).

  • @itnadivane
    @itnadivane Рік тому

    Are there any cons about making all those factory functions static? In this case you don't need to inject this Factory object into each view controller, and you can use it just like this - ScreenFactory.makeLoginScreen(params: SomeParams)

    • @iOSAcademy
      @iOSAcademy  Рік тому

      Static is generally harder to test and has a memory impact. Instance APIs are preferred though its subjective to a degree