Except the regular Design Patterns which we use daily in our work like Singleton, Factory, Facade, Proxy etc. which makes sense as we anyways use them daily the other patterns used to feel boring and uninteresting to me as even after reading from books and tutorials the concept just remained as theory. I felt they are not as important as we don't use them much. For the same reason i was also going to make them less priority from your playlist as well. But thanks a lot to your amazing practical explanation i am finding each Design pattern so much practical, interesting and useful and easy to remember and apply.
Nice explanation ! This reminded me of your isA hasA both properties needed in the Decorator pattern. This also looks similar but isA(Expression) hasTwo(Expressions) + Internal Operation. Thanks!
How would I handle multiple files in a single folder situation? Would we: 1. Create the first file as a leaf and then all subsequent files as file systems with only leaf and no child file system 2. Modify the filesystem object to have an array of leaves and an array of child file systems Please let me know which one would be the better approach? PS: Honestly, great work. I come from a place where I do not have much hands-on coding experience and these videos have really helped me and challenged me in the right kind of ways that I now feel much more confident with LLD. Great work man! Hats off to you!!
List implies that Directory can have either have a list of directories as leaves or list of files (leaves of files). The iterator in the ls() method will iterate over each file and call its ls() to print filename.
@@ConceptandCoding Like im from korea but in korea absolutely theres no lld or oop design class for interview and also in youtube. some professors make videos for that but not that much in detail. Love ya from korea
Great explanation! Really appreciate your work. How can we create mkdir method in filesystem using this approach? Mkdir should be a part of only directory and not file and that need be be recursively call using ((Directory) file).mkdir(), is there a way to avoid this and use same design pattern?
None of the youtube tutorial provide example of what's the problem and how the same can be solved with composite design pattern. Everyone just starts with the pattern directly. Its really not useful for most of the beginners. Thanks for this explanation
@@ConceptandCoding sorry if I was not clear, I have mentioned that "Thanks for this explanation" which means this video does explain the problem and solution for both.
I can see that u have made some of the imp questions like parking lot and car rental system paid. I don't think everyone can afford it especially the students.
@@ConceptandCoding Also sir, if u can make a video on lld video on these could be great :- 1) Zomato/ food delivery app 2)Netflix/online streaming website 3)true caller 4)Uber
Great explanation sir, I've a question: Can LLD be learned using JS as majority content on-line is in JAVA or any other low-level languages like CPP, etc.
Correct indentation in output is the one thing I can't get with the file system program. I added System.out.print("\t"); right after opening the for loop (I'm talking about the ls() method of the Directory class in 7:54 ). This works for the children of the directory from which you call the method. Problem is that the children of a SUBdirectory still end up having the same indentation as the SUBdirectory. Anyone knows how to solve that problem ?
Sir @Shreyansh there is one doubt that I have regarding the file system, I don't know whether I have misunderstood the problem itself, suppose I have directory ABC and in ABC I have like three other directories-> BCD, CDE, and EFG in BCD-> I have GHI, in GHI-> I have FGH. so according to your design it will print like in preorder dfs wise all the names(ABC ->BCD->GHI->FGH->CDE->EFG), but in practically if i pass ABC.ls( ) then it should print only (BCD,CDE,EFG) so how can composite design pattern help here?
I got confusion in between adapter and composite design(i.e Object inside object) since adapter also follow the same thing (i.e. creating new class that extends previous class ) hence at run time object inside object
@@ConceptandCoding yes there you told like wrapping the existed class with new class and user will call the new created class for their desired output ... If I am wrong correct me
@@UtkarshGupta-hp3nm Okay Utkarsh, after office. I will clarify your doubts regarding both. we can talk for some time in evening and hope you will get more clarity
I think you haven't seen the HLD playlist. Kindly check it out High Level Design from Basics to Advanced: ru-vid.com/group/PL6W8uoQQ2c63W58rpNFDwdrBnq5G3EfT7
Hey Shrayansh, if we were to add a new operation, say modulus, then we would need to update the existing Evaluate()'s switch case to accommodate it. Thus, violating 'O' of the SOLID principles. How should we handle that? Is it by having separate class for each operation with its own evaluate method implementation?
Are all structural design pattern follow same object inside object methodology?? Like in ur proxy, decorator pattern also same object was inside same class which have is a and has a relationship!!!? Its confusing plz help?