Node.js Tutorial - 21 - Events Module

Поделиться
HTML-код
  • Опубликовано: 31 дек 2024

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

  • @nadimalaa8961
    @nadimalaa8961 11 месяцев назад

    Vishwas always makes the learning process enjoyable by using real-life scenarios. I have seen it in many of his courses, such as in redux toolkit and I could never forget the flow of it thanks to the real-life scenario he provided.

  • @suganyashanmugam9709
    @suganyashanmugam9709 Год назад +2

    The way you went through the series is awesome. Summary points are helpful to recap it again. Well down and keep doing advanced topics. 👏👏

  • @alifhasanshahOfficial
    @alifhasanshahOfficial 2 года назад +18

    You are doing a great work. In future please make a series for Express JS, and make rest api project .

  • @VENKATESHPS-l9z
    @VENKATESHPS-l9z 9 месяцев назад

    00:09 Events module in Node.js allows working with events and custom event handling
    01:01 Events in Node.js mimic day-to-day scenarios
    01:52 The Events module in Node.js encapsulates functionality to emit and respond to events.
    03:06 Register a listener for an event using the on method.
    04:11 Using the events module to dispatch and respond to custom events.
    05:16 Event module in Node.js allows registering multiple listeners for the same event
    06:33 Event-driven programming in Node.js delays function execution until a certain event occurs.
    07:28 The Events Module returns an event emitter class
    Crafted by Merlin AI.

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

    love learning with you man, thanks a lot for this course!

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

    Thanks for explaining this concept in a way I could understand

  • @yashgandhi-pg4rh
    @yashgandhi-pg4rh 11 месяцев назад

    Note that when you've multiple event handlers for a single event then both of them will be executed one after each so they will be synchronous to each other only (not for any another part of code)

  • @shineLouisShine
    @shineLouisShine Год назад +1

    This is quite an incredible channel, and I'm grateful for its existence and your efforts.
    Nevertheless, 2 comments:
    1. Do try to respond people from time to time.
    I know that it is a lot to ask (no pun intended) but I can assure you that there are content providers who has lots of viewers and yet respond.
    2. Vite. I know many people who are mind-blown by Vite.
    It can be awesome if you'll teach it in your own uniqe and awesome way.
    Thanks!

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

    Thank you. This is exactly what I was looking for. Clear as crystal :)

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

    Really enjoying this great series, welldone 👍🏾👍🏾

  • @kerrykreiter445
    @kerrykreiter445 4 месяца назад

    Great tutorial! Thanks!! One question: is it possible to create the event in a node server and listen for the event in the client?

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

    Learning is easy now great videos ... Thanks a lot.

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

    Thank you Vishwas

  • @TheL0rdOfTheStrings
    @TheL0rdOfTheStrings 2 года назад +2

    You are doing god's work 🙏 thank you

  • @frontend_ko
    @frontend_ko Год назад +1

    thanks teacher 21

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

    How do I enable Intellisense for Nodejs built in functions? I get the suggestions for JavaScript functions but not getting them for Nodejs functions ?

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

    You have to pass the optional arguments as strings?

  • @ALLSTARDECOURO2
    @ALLSTARDECOURO2 11 месяцев назад

    good stuff bro thanks

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

    what is the scope of emitter, can you emit from one file to another?

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

    Do event listeners respond in the same order as they are defined, or is it random? In the pizza example, could "Serving complimentary drink" appear before "Order received" sometimes? And if so, is there a way to guarantee the order of execution?

  • @GauravKumar-dw2ml
    @GauravKumar-dw2ml Год назад

    Why do we need event Emitter when we can use simple function and call then whenever necessary ?

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

      its built in and can be exported/imported between modules

  • @vishalwaliyan8115
    @vishalwaliyan8115 6 месяцев назад

    tutorial is really good, only thing that was irritating to me was same tone at the end of every sentence

  • @3minutesbibletruth
    @3minutesbibletruth 2 года назад

    Thanks for your good work but can you please assemble the course into one

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

    Summary: Events allow us to write code in a non-blocking manner.

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

    why emitter.emit should be after emitter.on in the file? I tried to replace and emit didnt work then ...

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

      think of it like arrow functions, if you call it before initialization, that doesn't look right

    • @Support-Phalestine
      @Support-Phalestine Год назад

      this is just like we declare a function first and then call the function on the end jus like think that the ''emit is calling the function '' and ' emitterOn is function declaration '

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

      It's actually the way these methods work. When we use the on() method, for example, like this: on('request', () => {console.log('Hello!')}), the 'request' event is stored in an 'event object'. We are registering a callback function whose purpose is to handle this event. This name (request) serves as a key (event identifier) in an object, and its callback function is the value. So it would look something like this: { request: [ () => console.log('Hello') ] }. These callback functions are sequentially allocated in this 'master or event object' as they are specified in the code.
      When you emit an event, for example with emit('request'), Node looks for the 'request' key in the event 'object' and executes all the callback functions associated with that key in sequential order and synchronously (synchronous in this case means it calls one function after another). So if the emit method is before the event listeners, it won't be able to execute the callback functions, because they don't exist yet.

  • @adrianocamargo165
    @adrianocamargo165 5 месяцев назад

    Excelent!!!

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

    Thanks

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

    bloody ads are always annoying

  • @vipinkoul595
    @vipinkoul595 4 месяца назад

    awesome!!!

  • @VENKATESHPS-l9z
    @VENKATESHPS-l9z 9 месяцев назад

    00:09 Events module in Node.js allows working with events and custom event handling
    01:01 Events in Node.js mimic day-to-day scenarios
    01:52 The Events module in Node.js encapsulates functionality to emit and respond to events.
    03:06 Register a listener for an event using the on method.
    04:11 Using the events module to dispatch and respond to custom events.
    05:16 Event module in Node.js allows registering multiple listeners for the same event
    06:33 Event-driven programming in Node.js delays function execution until a certain event occurs.
    07:28 The Events Module returns an event emitter class
    Crafted by Merlin AI.