Swift Design Patterns (Adapter)

  Рет қаралды 2,125

Venu Gopal Tewari

Venu Gopal Tewari

Күн бұрын

Пікірлер: 13
@abhaytewari6467
@abhaytewari6467 3 жыл бұрын
That was really entertaining and simple explanation of Adapter pattern. Thank you sir !
@VenuGopalTewari
@VenuGopalTewari 3 жыл бұрын
This made my efforts success !
@josiasmayo7203
@josiasmayo7203 2 жыл бұрын
one question in ProductionDeptDataSource i have workers.append(Worker(name: "Random Name 3", department: "Production")) not workers?.append how come u get the optional? workers in not optional. o_o thanks in advance. great tutorial :)
@VenuGopalTewari
@VenuGopalTewari 2 жыл бұрын
Hi Josias, In DataSourceBase class which is following WorkerDataSource protocol, workers get allocated as an array so inside ProductionDeptDataSource workers is non optional.
@vprashant86
@vprashant86 4 жыл бұрын
Good explanation
@VenuGopalTewari
@VenuGopalTewari 3 жыл бұрын
This made my effort success !
@ronrolle7610
@ronrolle7610 2 жыл бұрын
very good video > but why music in the background and why is the unnecessary music such a terrible one ...
@VenuGopalTewari
@VenuGopalTewari 2 жыл бұрын
This is one of the old videos, in recent videos this feedback is taken care.
@nikhilchandrasingh2447
@nikhilchandrasingh2447 4 жыл бұрын
Itss so nice.....,😇😇
@kanpurcoachingmandi9293
@kanpurcoachingmandi9293 4 жыл бұрын
👍👍
@chbhargavsai4068
@chbhargavsai4068 3 жыл бұрын
Hi bro first of all thats great explanation, design patterns are complex but you are explaining those better, secondly i have a doubt in the above example when new agency conforming to search protocol the worker computed property is implemented right, then what is the need of creating workers from the DICTIONARY again, can't we use the same workers array for searching too?
@VenuGopalTewari
@VenuGopalTewari 3 жыл бұрын
Hi Bhargav, Greetings from the channel !! This all makes my effort successful if you are finding it helpful. Lets come to your Query now: In the described sample go to ViewController.swift file, assume it as an "Utility Application" that solves searching functionality for an old agency. Now this agency got merged with a new agency which is maintaining their employee directory in the form of "array of dictionary". Our objective was without disturbing code of our "Utility Application" this should keep working for the data of new agency also but old agency search methods (Utility Application methods) work with "Worker" objects as per protocol (WorkerDataSource) so when in Adapter New Agency follows - (WorkerDataSource) protocol then we need to convert all dictionary objects into worker objects so that our app > utility app > ViewController.swift just keep on working without any structural change. Now assume the bigger picture here your app is only a search utility what if it contains a 1000 features in some giant application??? without Adapter how much code you are going to change ??? Just think about it.
@waheedafolabi6929
@waheedafolabi6929 2 жыл бұрын
@@VenuGopalTewari This makes loads of senses...saves a whole in cost of production!
Swift Design Patterns (Facade)
6:57
Venu Gopal Tewari
Рет қаралды 1,6 М.
Adapter Design Pattern | Explanation with Code in Easy Way! ✌🏻
19:04
Sigma baby, you've conquered soap! 😲😮‍💨 LeoNata family #shorts
00:37
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 98 МЛН
Mediator Design Pattern in Swift
30:57
Venu Gopal Tewari
Рет қаралды 1,2 М.
How to use AsyncStream in Swift | Swift Concurrency #18
26:32
Swiftful Thinking
Рет қаралды 6 М.
Decorator Pattern - Design Patterns (ep 3)
54:35
Christopher Okhravi
Рет қаралды 486 М.
Builder Design Pattern Explained in 10 Minutes
10:45
Kantan Coding
Рет қаралды 31 М.
Facade design pattern in iOS || Learn by Coding
9:14
App Developer
Рет қаралды 2,1 М.
Swift Design Patterns (Builder)
6:58
Venu Gopal Tewari
Рет қаралды 2,1 М.