Solid Design Principle Interview Questions and Answers for fresher and experienced | Code Decode

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ต.ค. 2021
  • In this video of Code Decode we have covered Solid Design Principle Interview Questions and Answers for freshers and Experienced
    Udemy Course of Code Decode on Microservice k8s AWS CICD link:
    openinapp.co/udemycourse
    Course Description Video :
    yt.openinapp.co/dmjvd
    Solid Principle Interview Questions part 2 : • Solid Principles Inter...
    SOLID Principles Covered with live demo. With steps on how to implement these in day to day life.
    Why we need solid Principle?
    The broad goal of the SOLID principles is to reduce dependencies so that engineers change one area of software without impacting others. Additionally, they’re intended to make designs easier to understand, maintain, and extend. Ultimately, using these design principles makes it easier for software engineers to avoid issues and to build adaptive, effective, and agile software.
    they lead to better code for readability, maintainability, design patterns, and testability.
    What are solid Principles?
    The following five concepts make up our SOLID principles
    Single Responsibility
    Open/Closed
    Liskov Substitution
    Interface Segregation
    Dependency Inversion
    What is Single Responsibility Principle in solid principles?
    It states that “One class should have one and only one responsibility”
    Which specifically means - we should write, change, and maintain a class only for one purpose.
    Change Class only when you need to change state of one particular object or instance
    Example : POJOS follow SRP.
    Suppose we have Employee and Address Class, If we want to change the state of Employee then we do not need to modify the class Account and vice-versa.
    If you world have merged both as single POJO , then modification in one field for address (like state ) needs to modify and Whole POJO including Employee
    Worst Design - which don’t follow SRP Hitting Database in POJO of Employee Class. That’s why we have service layer, DAP layer and Entities separated.
    Why is Single Responsibility Principle IMP?
    In Real world, Requirement changes and so does your code implementation to cater the changing requirement ,
    The more responsibilities your class has, the more often you need to change it. To prevent frequent changes to same class,
    Testing is easier - With a single responsibility, the class will have fewer test cases
    Easier to Understand
    Less functionality also means fewer dependencies to other classes.
    So best practise says : Use layers in your application and break God classes into smaller classes or modules
    What is Open/Closed Principle in solid principles?
    It states that “Software components should be open for extension, but closed for modification”
    The term “Open for extension” means that we can extend and include extra functionalities in our code without altering or affecting our existing implementation.
    The term “Closed for modification” means that after we add the extra functionality, we should not modify the existing implementation.
    In real world, You must have noticed that you change something to cater a new requirement and some other functionality breaks because of your change. To prevent that we have this principle in hand. It s one of the most imp concept in in solid principles
    How to implement Open/Closed Principle in solid principles?
    The application classes should be designed in such a way that whenever fellow developers want to change the flow of control in specific conditions in application, all they need to extend the class and override some functions and that’s it.
    Example - created a pojo employee with id , name. now new functionality comes which says add Training location. your constructor will fail for employees who didnt do training. better extend employee class, name it Traineed employee then add constructor.
    Code Decode Playlists
    Most Asked Core Java Interview Questions and Answers : • Core Java frequently a...
    Advance Java Interview Questions and Answers : • Advance Java Interview...
    Java 8 Interview Questions and Answers : • Java 8 Interview Quest...
    Hibernate Interview Questions and Answers : • Hibernate Interview Qu...
    Spring Boot Interview Questions and Answers : • Advance Java Interview...
    Angular Playlist : • Angular Course Introdu...
    GIT : • GIT
    Subscriber and Follow Code Decode
    Subscriber Code Decode : th-cam.com/users/CodeDecode?...
    Linkedin : / codedecodeyoutube
    Instagram : / codedecode25
    --------------------------------------------------------------------------------------------------------------------------------------
    #solidprinciples #javainterviewquestions #codedecode

ความคิดเห็น • 73

  • @dhareppasasalatti7102
    @dhareppasasalatti7102 2 ปีที่แล้ว +11

    Please try to upload the 2nd part of this videos ASAP. This is really helpful for the interviews and thank you so so much for the content. ❤💯💯

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure we will upload it soon....

  • @abirchaudhary6359
    @abirchaudhary6359 6 วันที่ผ่านมา +1

    Please add cqrs design pattern. I am big fan of your explanations.

  • @mohdfahimsaad3669
    @mohdfahimsaad3669 2 ปีที่แล้ว +4

    Mam really most valueable content which you are providing. And lastly please share the ppt content with us in the form or pdf or whatever you want so that we refer those later as well. Love and support from Indore.......

  • @vulligadlarohith5541
    @vulligadlarohith5541 2 ปีที่แล้ว +2

    Excellent , thanks again! 👍I was waiting for this topic from Code Decode ✌️

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sorry for keeping you waiting. Will upload next part very soon 👍

  • @dpkpk1573
    @dpkpk1573 2 ปีที่แล้ว +3

    Thanks for covering this Topic.....
    Yes please make a continuation on this

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Sure we will upload soon 👍👍

  • @nandkishor_patil_
    @nandkishor_patil_ 2 ปีที่แล้ว +2

    Please upload second part of this vedio.
    It will be really helpful to understand SOLID in easy manner.
    Thanks 👍

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      th-cam.com/video/zn2Sn7lMnLM/w-d-xo.html
      Here you go 🙂👍

  • @suryanarayansubudhi9439
    @suryanarayansubudhi9439 2 ปีที่แล้ว +1

    Thank you for making this video.
    In a recent interview, This question is asked to me.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      you are welcome suryanarayan

  • @dynamicdeveloper6658
    @dynamicdeveloper6658 2 ปีที่แล้ว +3

    Such a great informative explanations. 👍

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Thanks alot 🙂👍

  • @Rohit-yo4ik
    @Rohit-yo4ik 2 ปีที่แล้ว +1

    Please create remaining part of this soon.... getting better understanding of concepts. Thank you so much

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Publishing it today 👍👍🙂🙂

  • @KumarGaurav-xDsoCH
    @KumarGaurav-xDsoCH 2 ปีที่แล้ว +4

    With your every video lecture, I am getting some clarity that I didn't come to know, although practicing the same for a quality time. Thanks a ton again !!
    When I saw title this time, I thought it's something irrelevant to me and was about to skip it. But fortunately, I started playing and then it's only you and your voice for next 15:50 minutes 😁😁

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +2

      🙂🙂Glad u found it helpful. Keep learning, keep rocking Man 👍👍

  • @bsarvani5845
    @bsarvani5845 2 ปีที่แล้ว +1

    Thank you for clear explanation. Please cover other three principles also

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure, we will post it next.

  • @rahulshukla7883
    @rahulshukla7883 2 ปีที่แล้ว +1

    Good job !! Nice explanation of 2 solid principles for fresher and experience. Please make video for rest 3 . Waiting...

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure Rahul we will make it soon....

  • @SharifulIslam-nv7dq
    @SharifulIslam-nv7dq 2 ปีที่แล้ว +1

    It will be great, if you can explain the other 3 as well. Thanks.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure shariful we will create it soon

  • @sureshkumar-kq1jm
    @sureshkumar-kq1jm 2 ปีที่แล้ว +6

    Why can’t we create one more parameterised constructor instead of creating new class for open/close principle?

    • @devforall2006
      @devforall2006 9 หลายเดือนก่อน

      yes we can, but what she explained is also a way

    • @saithonukunoori412
      @saithonukunoori412 5 หลายเดือนก่อน

      See here the principle is our code should not be modified but want to extend functionalities in it so using classes we can enable this principle we can wrap a code in structure,functions,interfaces,abstract classes and classes so on. Which of these concepts make your code actually support the respective principle,hope you got it

  • @akhileshyaduwanshi6008
    @akhileshyaduwanshi6008 2 ปีที่แล้ว +1

    Thankyou for this video, Please make another video for other three remaining principle.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure next we will upload that 👍👍

  • @HkH103
    @HkH103 2 ปีที่แล้ว +2

    Hi madam, your explanation is good with suitable example, plz complete solid principles L,I and D

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure we will complete it soon

  • @aa-xe5gq
    @aa-xe5gq 2 ปีที่แล้ว +1

    please do the rest three! thanks!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure, we will upload that next 👍

  • @manojkumarshirapure107
    @manojkumarshirapure107 2 ปีที่แล้ว +1

    Very Helpful !!!!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Thanks Manoj 🙂👍

  • @gauravjaiswal7923
    @gauravjaiswal7923 2 ปีที่แล้ว +1

    Nice explanation...Can you please upload the second part of it. Thank you!!

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      We have it here
      th-cam.com/video/zn2Sn7lMnLM/w-d-xo.html

  • @pulkitkhandelwal1414
    @pulkitkhandelwal1414 2 ปีที่แล้ว +1

    Yes please complete all remaining solid principles.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure pulkit we will make it

  • @ummarfarooq4160
    @ummarfarooq4160 2 ปีที่แล้ว +1

    Ma'am pls make to video on other principles also.. your explanation gives good clarity to the concepts

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure ummar we will create it soon

  • @VoyageofLittleLiya
    @VoyageofLittleLiya ปีที่แล้ว +1

    This part was clear, well explained. Can you please provide link, if you have already done second part of this?
    If have not done second 2nd part, can you please do it?

    • @CodeDecode
      @CodeDecode  ปีที่แล้ว

      th-cam.com/video/zn2Sn7lMnLM/w-d-xo.html

  • @dnyaneshwarjadhav102
    @dnyaneshwarjadhav102 6 หลายเดือนก่อน +1

    Very well explained mam. Thanks a lot👍.

    • @CodeDecode
      @CodeDecode  6 หลายเดือนก่อน

      you're welcome

  • @abhinavpandey3356
    @abhinavpandey3356 2 ปีที่แล้ว

    In that open closed example what I f we make another constructor with 3 parameters ie instead of separate class

  • @riyanayak9836
    @riyanayak9836 9 หลายเดือนก่อน +1

    Thanks!

    • @CodeDecode
      @CodeDecode  8 หลายเดือนก่อน

      Thanks Riya 😊

  • @vengateshm2122
    @vengateshm2122 2 ปีที่แล้ว +1

    Thank you please cover the remaining too.

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      sure vengatesh we will make it soon

  • @APersonOnTheWeb
    @APersonOnTheWeb ปีที่แล้ว

    11:30 I have a doubt, Instead of creating another class, why can't we create a new constructor with that address parameter?

  • @nagarajjaladi5888
    @nagarajjaladi5888 2 ปีที่แล้ว +1

    Good work

  • @swapnilmishra697
    @swapnilmishra697 2 ปีที่แล้ว +2

    Mam what is PoJo I can't understand what we meant by pojo

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว +1

      Pojo is plain old java objects, it's same as dto data transfer object,. As name suggests it's a simple java object nothing else 🙂👍

  • @SaketAnandPage
    @SaketAnandPage ปีที่แล้ว

    Why not class for EmployeeName in Single Responsibility?

  • @divanshugupta4427
    @divanshugupta4427 2 ปีที่แล้ว +1

    Waiting for the rest three....

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Sure Divanshu we will upload it next 👍👍

  • @amitkale1284
    @amitkale1284 2 ปีที่แล้ว +1

    🙏🙏

  • @rakeshs1935
    @rakeshs1935 2 ปีที่แล้ว +1

    👌🙏👍

  • @venkatb8317
    @venkatb8317 2 ปีที่แล้ว +1

    HI Team,please make video on remaining things

    • @CodeDecode
      @CodeDecode  2 ปีที่แล้ว

      Hi Venkat . Please check below link for part 2
      th-cam.com/video/zn2Sn7lMnLM/w-d-xo.html

    • @venkatb8317
      @venkatb8317 2 ปีที่แล้ว

      @@CodeDecode thanks lot

  • @maankhurana5814
    @maankhurana5814 21 วันที่ผ่านมา

    Interviewer asked me this today and I was unable to answer

  • @gopikrishnagurram5780
    @gopikrishnagurram5780 4 หลายเดือนก่อน

    It will very hard to create new class fir every field addition. Please help us to understand with service logic.

  • @sravankumar9609
    @sravankumar9609 ปีที่แล้ว +1

    Part 2 please ?

  • @shreya1487
    @shreya1487 ปีที่แล้ว

    Ur cursor is reminding something

  • @zafariqbal92
    @zafariqbal92 ปีที่แล้ว

    the second log did not print the address 😄