Skip to content

Conversation

nepsilon
Copy link
Contributor

No description provided.

Julien and others added 7 commits September 9, 2013 17:24
Rewrite Draft
An advantage of CoffeeScript compared to JavaScript is its ability to
check for array membership with the `in` keyword.
A feature it borrowed from Python.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if req.status in [200, 304]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean you want to revert line 51 to if req.status in [200, 304] ?
Please see #discussion-diff-6180754 as for why we used the if req.status in successResultCodes syntax.

@sukima
Copy link
Contributor

sukima commented Sep 11, 2013

Could you provide an example of how not using this pattern could complicate matters? Maybe a before and after picture?

I ask because the subscribe / publish seems like a typical event handler / emitter pattern. I'm curious how this specific pattern helps even more (for it's use cases).

@nepsilon
Copy link
Contributor Author

@sukima Ok I will extend my comparison of the Mediator pattern to the Observer pattern. But as a note, there is no such thing as a Pub/Sub design pattern, and the Mediator pattern is actually how we implement the most decoupled way of a Pub/Sub mechanism.

@lolmaus lolmaus closed this Jan 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants