What a way of explanation, i love your explanation, because often you co relate with some intresting example, Keep sharing such amazing content 🙏🙏🙏🙏🙏🙏🙏
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)
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.💯💯
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 ??
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
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.
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
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.
Perfect example of adapter to introduce the topic
Explanation was great, starting with a real world example then coding it and following up with a class diagram. Thank you!
Mam, Please complete this course. I was interested to learn more on LLD from you. Its amazing!!
I randomly came across this video and found it worth my time. So nicely you have explained i!
Your explanation is really simple to understand. Please keep making such videos. Thanks a lot
very useful and clear explanatoin. thankyou!
Very well explained. Understood it completely. Thanks for this tutorial 😊💯
Thank you so much! Means a lot! ❤️😇
What a way of explanation, i love your explanation, because often you co relate with some intresting example, Keep sharing such amazing content 🙏🙏🙏🙏🙏🙏🙏
Excellent, It is very helpful design pattern videos, Waiting for other patterns - Facade and decorator and others.
Thanks for the video! awaiting for the next video!
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)
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.💯💯
Good example
Video was really helpful. Thank you 💖
Good Explanation 👏
Very Clear !!
Very helpful. Thank you.
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?
enchanté
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!
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 ??
Awesome video didi
Make videos on remaining design patterns also (facade, strategy, decorator)
Please make a video on the decorator pattern
But client still have to change the object creation. Kindly correct me if I am wrong
Hey ,really appreciate if you give idea on priority inversion , mutex and multitasking
Will cover all of this in detail as well!
where are facade and strategy design pattern videos? as mentioned in the last of this video
If only you didn't use C++ and used more mainstream language like Java or C# it would be a lot more helpful
Is C# really mainstream LOL
@aakashrana1524 I don't know what cave you live in... More than half of all enterprise applications run on C#
@@seeker4430 and other half of your world would be on java , 🤣
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
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
Why should we use virtual?
thank you very much didi
Hope you like the video! ❤️😇
What if the DataAnalyticsTool class (the target class) is an external library and it does not allow itself to be inherited ?
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.
How can i get this code?
Would you mind doing same in java
di, when will the next video come out in code from scratch channel? 😴
Next 5 videos are recorded and in pipeline for editing. Will start uploading this or next week for sure!
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
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.
eXcellent’e
Can you explain in java😢
you are not correctly putting your classes into the diagram. Adaptee is not a XmlData class
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);
}
}