No video

Adapter Design Pattern | Explanation with Code in Easy Way! ✌🏻

  Рет қаралды 21,280

Keerti Purswani

Keerti Purswani

Күн бұрын

It’s beautiful to understand how such a common problem is handled so elegantly. Once you really understand, you realise you don’t need to mug up the class design. It will start coming naturally to you!
You can get 𝐃𝐈𝐒𝐂𝐎𝐔𝐍𝐓𝐒 using code "KEERTI" -
➡️ On 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰𝐑𝐞𝐚𝐝𝐲 - get.interviewr...
➡️ On all 𝐆𝐞𝐞𝐤𝐬𝐅𝐨𝐫𝐆𝐞𝐞𝐤𝐬 paid courses - practice.geeks...
Please 𝐬𝐮𝐛𝐬𝐜𝐫𝐢𝐛𝐞 here - / keertipurswani
CFS Channel for beginners of DSA - / @codefromscratch-keert...
Personal Content here - / @ittisikhushi-keertipu...
You can also connect with me on-
𝐈𝐧𝐬𝐭𝐚𝐠𝐫𝐚𝐦 (for not so professional, chill side of my life) - www.instagram....
𝐓𝐰𝐢𝐭𝐭𝐞𝐫 - Ke...
𝐋𝐢𝐧𝐤𝐞𝐝𝐈𝐧 - / keertipurswani
#designpatterns #systemdesign #softwareengineer

Пікірлер: 42
@kishorepurswani1212
@kishorepurswani1212 Жыл бұрын
Perfect example of adapter to introduce the topic
@shivraj940
@shivraj940 10 ай бұрын
Mam, Please complete this course. I was interested to learn more on LLD from you. Its amazing!!
@seeker4430
@seeker4430 Жыл бұрын
If only you didn't use C++ and used more mainstream language like Java or C# it would be a lot more helpful
@pramodkumarkar6573
@pramodkumarkar6573 26 күн бұрын
Very Clear !!
@kritangnasingh5934
@kritangnasingh5934 Жыл бұрын
I randomly came across this video and found it worth my time. So nicely you have explained i!
@mumtazirteqaahmed8553
@mumtazirteqaahmed8553 Жыл бұрын
Explanation was great, starting with a real world example then coding it and following up with a class diagram. Thank you!
@handover007
@handover007 11 ай бұрын
Your explanation is really simple to understand. Please keep making such videos. Thanks a lot
@athifpasha3302
@athifpasha3302 9 ай бұрын
Excellent, It is very helpful design pattern videos, Waiting for other patterns - Facade and decorator and others.
@HarshSharma-ff3ox
@HarshSharma-ff3ox Жыл бұрын
Very well explained. Understood it completely. Thanks for this tutorial 😊💯
@KeertiPurswani
@KeertiPurswani Жыл бұрын
Thank you so much! Means a lot! ❤️😇
@shruthakeerthis4549
@shruthakeerthis4549 Жыл бұрын
What if you have now a new format to be converted to JSON ? I think you need to have a parent class called "data" and derive "xmldata" and other new formats. And now, the the adapter class should have "data *" as member which calls getdata (overidden in xmldata and new formats class)
@quadsoft7376
@quadsoft7376 Жыл бұрын
What a way of explanation, i love your explanation, because often you co relate with some intresting example, Keep sharing such amazing content 🙏🙏🙏🙏🙏🙏🙏
@abhinavshukla7630
@abhinavshukla7630 Жыл бұрын
Not very much aware of such situations as I don't have much experience yet in software development but understood the topic really well, very well explained mam.💯💯
@shivarajakumar9175
@shivarajakumar9175 9 ай бұрын
very useful and clear explanatoin. thankyou!
@zyx7955
@zyx7955 Жыл бұрын
PLS REPLY 🙏: Mam i just saw ur interview/talk with Harnoor on his channel Singh in USA... U said u started coding very late and u wasn't from CS ... So if I get lower branch in NIT Calicut and I start coding from 1st year itself can I get better package or can I get into Maangn or any other big companies like Uber atlassian if I crack my interviews and prepare accordingly from start itself ??
@alans8771
@alans8771 Жыл бұрын
This was amazing, I am studying this pattern for python but you explained it so well I understood it perfectly, thank you so much, you got a new sub!
@arunprabhu123
@arunprabhu123 Жыл бұрын
can we create a object of baseclass(DataAnalyticsTool) with a derived class, instead we could have created an object of adapter class itself isnt it?
@jenishadsouza907
@jenishadsouza907 Жыл бұрын
Thanks for the video! awaiting for the next video!
@gopalsirotha
@gopalsirotha Жыл бұрын
Video was really helpful. Thank you 💖
@maheenazeez460
@maheenazeez460 9 ай бұрын
Good Explanation 👏
@harshthakur1078
@harshthakur1078 Жыл бұрын
Very helpful. Thank you.
@ShivamKendre-fc3su
@ShivamKendre-fc3su 4 ай бұрын
Awesome video didi
@yash_verma
@yash_verma Жыл бұрын
Make videos on remaining design patterns also (facade, strategy, decorator)
@matheens6689
@matheens6689 Жыл бұрын
Hey ,really appreciate if you give idea on priority inversion , mutex and multitasking
@KeertiPurswani
@KeertiPurswani Жыл бұрын
Will cover all of this in detail as well!
@tweenfun91
@tweenfun91 Жыл бұрын
Hi Keerti, Could you please let us know when you will upload videos for rest of the design patterns. I found these videos very helpful. If it takes time please let me know the other source from where i can learn rest of them. Please help
@KeertiPurswani
@KeertiPurswani Жыл бұрын
Hey, most of the common patterns are covered. strategy is another imp one. Will cover that soon. But, The LLD lives should be more helpful I think
@herculean6748
@herculean6748 Жыл бұрын
Please make a video on the decorator pattern
@uttambhat4542
@uttambhat4542 7 ай бұрын
Shouldn't the adaptees specificRequest be called instead of converting XML to JSON? XMLData class needs a analyseXMLData(); which should be called when adapyer.analyseData() is called from the client? I guess we have to either write different functions to analyse different kinds of data(in different data classes) or write functions to convert different data types into XML(in different adapter classes) seems like writing different data classes is reusable too
@yashkhurana5204
@yashkhurana5204 Жыл бұрын
thank you very much didi
@KeertiPurswani
@KeertiPurswani Жыл бұрын
Hope you like the video! ❤️😇
@anchitbhushan6172
@anchitbhushan6172 4 ай бұрын
What if the DataAnalyticsTool class (the target class) is an external library and it does not allow itself to be inherited ?
@coolfyb
@coolfyb 3 ай бұрын
Then we’ll have to create Adapter class which will contain (Containment) DataAnalyticsTool, it will do the conversion (XML to JSON) and delegate (Delegation) processing to DataAnalyticsTool.
@coolfyb
@coolfyb 3 ай бұрын
eXcellent’e
@santoshs4393
@santoshs4393 Жыл бұрын
Thanks for Nice info about Adaptor pattern. Just a suggestion, It would have been easier to understand if you had written client code in separate file like your earlier videos.
@debmalyapan53
@debmalyapan53 Жыл бұрын
di, when will the next video come out in code from scratch channel? 😴
@KeertiPurswani
@KeertiPurswani Жыл бұрын
Next 5 videos are recorded and in pipeline for editing. Will start uploading this or next week for sure!
@singiri697
@singiri697 Жыл бұрын
Why should we use virtual?
@programwithdenis3643
@programwithdenis3643 Жыл бұрын
Would you mind doing same in java
@tyrionlannister8268
@tyrionlannister8268 Жыл бұрын
How can i get this code?
@KolkanatBashpayev
@KolkanatBashpayev 6 ай бұрын
you are not correctly putting your classes into the diagram. Adaptee is not a XmlData class
@bhargavim9861
@bhargavim9861 Жыл бұрын
java code : import org.json.JSONObject; import org.json.XML; class XmlData { String xmlData; public XmlData(String xmlData) { this.xmlData = xmlData; } public String getXmlData() { return xmlData; } } class DataAnalysisTool { String jsonData; public DataAnalysisTool(String jsonData) { this.jsonData = jsonData; } void analyzeData() { System.out.println("Analyzed data"); } } public class Client { public void processData(DataAnalysisTool obj) { obj.analyzeData(); } } public class Adapter extends DataAnalysisTool { XmlData xmlData; public Adapter(XmlData xmlData) { super(""); this.xmlData = xmlData; } @Override void analyzeData() { String json = convertXmlToJson(xmlData.getXmlData()); System.out.println("Converting xmlData to JSON format: " + json); super.analyzeData(); } private String convertXmlToJson(String xmlData) { JSONObject jsonObject = XML.toJSONObject(xmlData); return jsonObject.toString(); } } public class AdapterPattern { public static void main(String[] args) { XmlData xmlData = new XmlData("sample XmlData"); DataAnalysisTool obj = new Adapter(xmlData); Client client = new Client(); client.processData(obj); } }
Adapter Pattern - Design Patterns (ep 8)
26:36
Christopher Okhravi
Рет қаралды 241 М.
Meet the one boy from the Ronaldo edit in India
00:30
Younes Zarou
Рет қаралды 15 МЛН
Bony Just Wants To Take A Shower #animation
00:10
GREEN MAX
Рет қаралды 7 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 18 МЛН
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 854 М.
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 250 М.
Factory Design Pattern - Why and How with Code!!
15:35
Keerti Purswani
Рет қаралды 82 М.
Singleton Design Pattern | Implementation with details & code ✌🏻
21:09
Low Level Design of Elevator with @gkcs - Mock System Design Interview
51:21
Design Patterns Master Class | All Design Patterns Covered
3:46:08
Daily Code Buffer
Рет қаралды 58 М.
The Smart Way of Using the Decorator Pattern in C#
12:37
Nick Chapsas
Рет қаралды 67 М.