JavaScript Beginners Tutorial 25 | OOP | Abstraction with example

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • FREE Tutorial - automationstep...
    An abstraction is a way of hiding the implementation details and showing only the functionality to the users
    Abstraction hides certain details and only show the essential features of the object.
    This approach improves understandability as well as maintainability of the code.
    FREE Courses - automationstep...
    GitHub - github.com/Rag...
    Udemy - www.udemy.com/...
    Training by Raghav at your venue - raghav.qna@gmail.com
    Training schedule - automationstep...
    ----------- UI TESTING -----------
    Selenium Beginners - bit.ly/2MGRS8K
    Selenium Java Framework from Scratch - bit.ly/2N9xvR6
    Selenium Python - bit.ly/2oyMp5x
    Selenium Tips - bit.ly/2owxc50
    Selenium Builder - bit.ly/2MKNtlq
    Katalon Studio - bit.ly/2wARFdi
    Robot Framework with RIDE- bit.ly/2Px6Ue9
    Robot Framework with Eclipse - bit.ly/2N8DZxb
    ----------- API TESTING -----------
    Web Services (API) - bit.ly/2MGafL7
    SoapUI - bit.ly/2MGahmd
    Postman - bit.ly/2wz8LrW
    General - bit.ly/2PYdwmV
    Katalon Studio API Testing - bit.ly/2BwuCTN
    ----------- MOBILE TESTING -----------
    Appium - bit.ly/2ZHFSGX
    Mobile Playlist - bit.ly/2PxpeUv
    ----------- CI | CD | DEVOPS -----------
    Jenkins Beginner - bit.ly/2MIn8EC
    Jenkins Tips & Trick - bit.ly/2LRt6xC
    Docker - bit.ly/2MInnzx
    ----------- VERSION CONTROL SYSTEM -----------
    Git & GitHub - bit.ly/2Q1pagY
    ----------- PERFORMANCE TESTING -----------
    JMeter Beginner - bit.ly/2oBbtIU
    JMeter Intermediate - bit.ly/2oziNVB
    JMeter Advanced - bit.ly/2Q22Y6a
    JMeter Tips & Tricks - bit.ly/2NOfWD2
    Performance Testing - bit.ly/2wEXbLS
    ----------- PROGRAMMING -----------
    Java Beginners - bit.ly/2PVUcXs
    Java Tips & Tricks - bit.ly/2CdcDnJ
    GROOVY - bit.ly/2FvWV5C
    JAVASCRIPT - bit.ly/2KJDZ8o
    ----------- IDE -----------
    Visual Studio Code - bit.ly/2V15yvt
    ----------- MAVEN -----------
    Maven - bit.ly/2NJdDRS
    ----------- OTHERS -----------
    Redis- bit.ly/2N9jyCG
    Misc - bit.ly/2Q2q5xQ
    Tools & Tips - bit.ly/2oBfwoR
    QnA Friday- bit.ly/2NgwGpw
    Sunday Special - bit.ly/2wB23BO
    Ask Raghav - bit.ly/2CoJGWf
    Interviews - bit.ly/2NIPPxk
    All Playlists - bit.ly/2LSiezA
    Keep Learning,
    Raghav
    Website - automationstep...
    LifeCharger - lifecharger.org/
    Udemy Courses - www.udemy.com/...
    Facebook - / automationstepbystep
    Twitter - / automationsbs
    RUclips - / automationstepbystep
    Instagram - / automationstepbystep
    You can support my mission for education by sharing this knowledge and helping as many people as you can.

Комментарии • 75

  • @ryancunningham8367
    @ryancunningham8367 4 года назад +4

    Very helpful Raghav, thank you for posting. The microwave example was a clear, common example and your coding walk-through was thorough, and nicely paced. Your final analysis of HOW this abstraction is helpful in changing only code in one (or a few spots) and not having the user care about those changes was particularly helpful.

    • @RaghavPal
      @RaghavPal  4 года назад +1

      Hi Ryan, so happy to know this

  • @mashooraraf344
    @mashooraraf344 3 года назад +7

    Best explanation I ever need in this topic. Thank you very much.💚

    • @RaghavPal
      @RaghavPal  3 года назад +1

      You're very welcome Mashoor

  • @murielarnio3758
    @murielarnio3758 3 года назад +2

    I very much appreciate this. Thank you very much for having this. It's very helpful.

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Glad it was helpful Muriel

  • @rekaviles
    @rekaviles 4 года назад +4

    That was extremely helpful, thank you. Also, I have that very microwave that you used in your example. :D

    • @RaghavPal
      @RaghavPal  4 года назад

      Glad it was helpful Erick

  • @timothy897
    @timothy897 3 года назад +1

    You are a great Teacher

    • @timothy897
      @timothy897 3 года назад

      My team has used your tutorial, it was truly helpful

    • @RaghavPal
      @RaghavPal  3 года назад

      So happy to know this

  • @AnthonyOdama
    @AnthonyOdama 8 месяцев назад

    This is very helpful, easy to understand, very easy to follow, thank you Raghav

    • @RaghavPal
      @RaghavPal  8 месяцев назад

      Most welcome Anthony

  • @shantanushukla1178
    @shantanushukla1178 7 месяцев назад

    Thank you sir, very helpful ❤

    • @RaghavPal
      @RaghavPal  7 месяцев назад

      Most welcome Shantanu

  • @mohanbalasubramani
    @mohanbalasubramani 4 года назад +2

    Perfect explanation...appreciate it...thanks

    • @RaghavPal
      @RaghavPal  4 года назад

      You're welcome Mohan

  • @lenhu7089
    @lenhu7089 3 года назад +1

    nice lesson, thank you very much

  • @gamzeozavci
    @gamzeozavci 9 месяцев назад +2

    Its not a abstraction. It is a encapsulation example. This information will cause confusion in people, please update it.

  • @satdiver
    @satdiver 3 года назад +1

    Thank you for keeping it nice and simple :)

  • @saurabhtapkir433
    @saurabhtapkir433 2 года назад

    The way you explain thats too easy man 👍😁

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Thanks Saurabh

    • @saurabhtapkir433
      @saurabhtapkir433 2 года назад

      @@RaghavPal actually i want to thanks you your so Good 👍❤️😘

  • @ShaileshKumar-sm1ns
    @ShaileshKumar-sm1ns 3 года назад +1

    Playlist done - great refresher ... Looking forward to Es6 topics if you can pls..

    • @RaghavPal
      @RaghavPal  3 года назад +1

      Glad to know Shailesh

  • @adithyancl3380
    @adithyancl3380 2 года назад

    best explanation sir..

  • @himats7195
    @himats7195 Год назад

    Hello Raghav, declared JS constructor as function . What is the advantage of declaring employee as function instead of constructor. Can't we achieve with constructor the same. Thank you.

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Hima
      In JavaScript, a constructor is essentially a function that is used to create objects. When we declare a constructor function, we can use the "new" keyword to create new instances of that object.
      When you declare an employee as a function, it means that the function can be called directly and does not require the "new" keyword to create an object. This approach is sometimes called a factory function, as it is used to create objects without relying on the constructor pattern.
      One advantage of using a factory function is that it can provide more flexibility in creating objects. For example, you can add additional logic to the function to create more complex objects or to enforce certain business rules. This approach can be especially useful when creating objects that require more complex initialization or when creating objects with dynamic properties.
      On the other hand, using a constructor can also be useful in certain situations. Constructors provide a standard way to create objects that follow a specific pattern. They also provide a way to encapsulate object initialization logic within the object itself, which can help with code organization and reusability.
      Overall, both approaches have their own advantages and disadvantages, and the choice between them depends on the specific needs of your application.

    • @himats7195
      @himats7195 Год назад

      @@RaghavPal thanks so much Raghav for the detailed reply as always

  • @100janyam
    @100janyam 7 месяцев назад

    what about closures, callbacks, modules and all? I was really hoping you would have made those videos too

    • @RaghavPal
      @RaghavPal  7 месяцев назад +1

      I will plan on that Sowjanya

  • @soubhagyajigautam522
    @soubhagyajigautam522 2 месяца назад

    You give provide the link of the playlist in the description or you can also share the link of your your previous related video

  • @atif5752
    @atif5752 3 года назад +2

    This is not abstraction. This is encapsulation. Abstraction is implementation details hiding

    • @RaghavPal
      @RaghavPal  3 года назад

      I will recheck on this

    • @dremiq6670
      @dremiq6670 3 года назад +2

      Abstraction is when we hide the complexity of the code, and also not letting the user access some of our functions. We do that by using var,let or const keywords.
      If you use the "this" keyword that function will be shown to the user and that wouldn't be abstraction because we are not hiding any complexity for the user + letting the user interact with our code.
      Encapsulation is when we combine relative functions and variables in a single unit(object).
      So what he is showing in the video is Abstraction, and not encapsulation.

    • @Ahmed-Hosam-Elrefai
      @Ahmed-Hosam-Elrefai 4 месяца назад +1

      @@dremiq6670
      Thanks for your informative reply!

  • @stevengaona6021
    @stevengaona6021 Год назад

    Can you explain this from the user perspective? Who is the user here? And in what way would they be trying to access the internal data? Would they be making changes from the UI or will they be opening up the code and making changes? Im not understanding that. Who are we hiding this data from?

  • @hamzanouh9153
    @hamzanouh9153 2 года назад

    great tutorial man

  • @carefree_ladka
    @carefree_ladka 2 года назад

    what font-family are you using in VSCODE ?

    • @RaghavPal
      @RaghavPal  2 года назад

      don't remember Pawan

  • @mdminhaj8567
    @mdminhaj8567 4 года назад

    Thank you so much brother

    • @RaghavPal
      @RaghavPal  4 года назад

      You're welcome Minhaj

  • @antonarbus
    @antonarbus 2 года назад

    Thanks for the video. Can anybody explain please why abstraction is explained with constructor function, instead of class like in previous videos about encapsulation, inheritance & polymorphism? Can we 'hide' properties via class in JavaScript? I tried to use #private properties in class, but they are still visible in dev tools inside instantiated objects. Hope my question makes sense.

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi Anton, this can help - stackoverflow.com/questions/12593917/abstraction-vs-abstract-class

  • @madhavikatta7346
    @madhavikatta7346 3 года назад

    This was extremely helpful sir
    But where can get practice questions in your website . I didn't found the practice questions.
    Plz reply sir.
    I am requesting you

    • @RaghavPal
      @RaghavPal  3 года назад

      Hi Madhavi, happy to know this helped.
      This is my website automationstepbystep.com/
      As of now I did not add practice ques on JS here.

  • @hileooo
    @hileooo Год назад

    HI Raghav, thank you for the videos.. will these cover all the JS concepts.. please advise..

    • @RaghavPal
      @RaghavPal  Год назад

      Hi Ravi, Yes it will all foundation concepts

  • @timothy897
    @timothy897 3 года назад

    Awesome

  • @vaxbun6188
    @vaxbun6188 3 года назад

    Very nice….

  • @ensar8177
    @ensar8177 2 года назад +1

    This is not Abstraction. This is Encapsulation.

    • @RaghavPal
      @RaghavPal  2 года назад +1

      Hi Ensar, I believe you are thinking of abstract class here, there is difference between abstraction and abstract class concept. Pls check this stackoverflow.com/questions/12593917/abstraction-vs-abstract-class

    • @ivanshatrov3
      @ivanshatrov3 2 года назад

      If abstraction and encapsulation are both hiding data and implementation - what is the difference?

  • @hessaa1712
    @hessaa1712 5 лет назад

    why you didnt use const ?

    • @RaghavPal
      @RaghavPal  5 лет назад +1

      It depends on the need. You can if you have to

  • @konstantinkkk8397
    @konstantinkkk8397 5 лет назад

    nice!

    • @RaghavPal
      @RaghavPal  5 лет назад

      Thanks for watching

    • @Imran-M-
      @Imran-M- 4 года назад

      @@RaghavPal Hi Raghav, i have watched all videos from your ''JavaScript tutorials' Playlist. Are these enough to start automating SPA applications? Also, which tool should i pick- WebDriver IO or something else?

  • @wasimkhan-th1it
    @wasimkhan-th1it 3 года назад

    how perform dmas rules

    • @RaghavPal
      @RaghavPal  3 года назад

      Not sure on this Wasim

    • @wasimkhan-th1it
      @wasimkhan-th1it 3 года назад

      @@RaghavPal how to perform dmas rules by use classes

    • @RaghavPal
      @RaghavPal  3 года назад

      Not much info as of now Wasim, can check online

  • @thambimoirangthem4499
    @thambimoirangthem4499 3 года назад

    cool :)

  • @davimuna1434
    @davimuna1434 Год назад

    Too fast hard to understand

    • @RaghavPal
      @RaghavPal  Год назад

      I will try to do it at a slow pace, For this one you can change speed from player settings