-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
Description
Repo: https://github.com/grabbou/nodeschool-eventemitter
Not sure if this part has been already covered somewhere, but was thinking that we might want to create additional workshop to cover this field.
What you think?
Some simple topics that might be worth explaining during such a workshop:
- Event-loop, what it is, how it works [lecture to be given on site - there's a nice talk by somebody on ng-conf I guess available on Youtube we can translate/take inspiration from]
- Where are event emitters - some examples, socket.io, hapi.js and so on
- Use built-in node event emitter and emit one event / listen to it
- Inherit from event emitter and create a new one
- Add custom method to the above event emitter, like
em.tellMeWhenNewChickArrivesthat will just callon- event name hidden from end user [prototype chain is no longer a mystery!] - Following the above, add custom
emitmethod, e.g.newChickArrived - Breakdown of all event emitter implementations
- Upgrading event emitter we used to create a new one to v2 provided by asyncly and using some wildcarding to provide more interesting events
- Middleware pattern - provide
usemethod and create additional plugin, likeem.use(nightclub())so night club emits new chick events - this might give valuable knowledge to attendees on how to split their huge app into reusable components, especially when aggregating some data (I have a working example so I can even feature it during the workshop)
Languges to start with:
- EN
- PL
If anyone feels native in others, let me know and let's do it together!
Reactions are currently unavailable