MicroEvent.js

Languages and libraries

javascript event library

SHOW HN2011

60points
15comments
#213of 1,097 in 2011
Top 20%of 2011 by points

How HN took it

QuietFewer than 5 comments about the project

2 positive, 1 neutral or asking, 0 mixed, 1 critical, out of 4 comments about the project.

Execution: 1 for, 0 againstDesign: 1 for, 0 againstIdea: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Code is well written and clean

    From 1 comment
    • I really like the code, I think it's very well written! A couple small suggestions and thoughts: Add a couple lines so that all methods return this; to allow for chaining,…
      amadeus on HN
  • Small size makes it easy to maintain

    From 1 comment
    • backbone is super nice, i wont be the one saying otherwise. It isn't the same scope tho. It does event emitter and much much more! I like micro frameworks (aka tiny libraries)…
      jerome_etienne on HN

Objections

  • Tiny scripts would be better inlined in HTML than fetched over HTTP

    From 1 comment
    • Wouldn't tiny code like this better included in the HTML itself? A fraction of a packet size versus a HTTP request.
      aw3c2 on HN
  • Concatenating and compressing scripts may not always be fastest

    From 1 comment
    • This has been shown to not necessarily always be the best option for performance. See http://blog.getify.com/2009/11/labjs-why-not-just-concat/, and http://yepnopejs.com/ The…
      morganpyne on HN

Requests

  • Return this from methods to allow chaining

    From 2 comments
    • I really like the code, I think it's very well written! A couple small suggestions and thoughts: Add a couple lines so that all methods return this; to allow for chaining,…
      amadeus on HN
    • Since I'll probably be using this for a couple smaller things of mine, I forked it and went ahead and changed it to: subscribe/unsubscribe/publish and also added return this.…
      amadeus on HN
  • Rename bind/unbind to avoid clash with ES5 Function.bind

    From 2 comments
    • I really like the code, I think it's very well written! A couple small suggestions and thoughts: Add a couple lines so that all methods return this; to allow for chaining,…
      amadeus on HN
    • Since I'll probably be using this for a couple smaller things of mine, I forked it and went ahead and changed it to: subscribe/unsubscribe/publish and also added return this.…
      amadeus on HN

Questions

  • Why not bind, trigger or unbind on a function directly

    From 1 comment
    • To be honest I was surprised you couldn't bind, trigger, or unbind on a function this way already. I guess I never came across a specific need for it.
      peregrine on HN

Alternatives named

  • Backbone

    From 1 comment
    • Backbone by documentcloud could be the other option to consider because 4k of gzipped code is not so big also.
      yatsyk on HN
  • Eve

    From 1 comment
  • Jiverscripts conc.observable

    From 1 comment
    • Reminds me of https://github.com/jivesoftware/jiverscripts. Check out the conc.observable component
      maxogden on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/2359656)