Skip to content

EventEmitter workshop #32

@grabbou

Description

@grabbou

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.tellMeWhenNewChickArrives that will just call on - event name hidden from end user [prototype chain is no longer a mystery!]
  • Following the above, add custom emit method, 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 use method and create additional plugin, like em.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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions