Heisenbergjs / heisenberg

A project base for building modern JavaScript applications
http://heisenbergjs.github.com/heisenberg/
156 stars 12 forks source link

Add the Events stuff back in #24

Closed jackfranklin closed 11 years ago

jackfranklin commented 11 years ago

I removed the sample Events in modules that @benhowdle89 had added when we moved over to RequireJS.

I like the way Ben does it as per his blog: http://benhowdle.im/2012/12/03/using-jquery-custom-events-in-your-object-literal-and-observer-pattern-applications/

And I think we should show an example of this.

Thoughts?

boye commented 11 years ago

Yes, that would be nice. I ran into Heisenbergjs via this article and was actually expecting some examples of the Mediator pattern :)

jackfranklin commented 11 years ago

@boye wow, didn't realise stuff had been written already. The mediator stuff was removed by me when we did some edits, and I want to get it back in there asap.

benhowdle89 commented 11 years ago

Agree. I think it's crucial to have it in there. It's the first piece of functionality I put in to Heisenberg! I need to understand how it might interfere/compliment RequireJS, @jackfranklin maybe you can guide me?

jackfranklin commented 11 years ago

I removed it because I wasn't entirely sure how to add it back in. I'll have a think about it and post some stuff up.

OliverJAsh commented 11 years ago

I've been thinking about this. If we're going to add it back it, I think Heisenberg should ship with an example – as it did in Ben's v0.0.1, just not with funny names :tongue:

I personally think it's really important to have a template like this in there: https://github.com/Heisenbergjs/heisenberg/blob/559c77025b06a3e8c6cd68da5c0e12860aeb30c9/js/app/modules/walter.js

jackfranklin commented 11 years ago

Yeah I agree. I might have a crack at this when I get home this evening, but if anyone else wants to, feel free!

OliverJAsh commented 11 years ago

Having a shot now.

On 22 Jan 2013, at 12:51, Jack Franklin notifications@github.com wrote:

Yeah I agree. I might have a crack at this when I get home this evening, but if anyone else wants to, feel free!

— Reply to this email directly or view it on GitHub.

jackfranklin commented 11 years ago

Awesome - look forward to it :)

OliverJAsh commented 11 years ago

I don't think utilities/helpers necessarily needs to be a separate module. Seems a bit pointless when it could just be in app.js, but that's how it was when Ben initiated Heisenberg.

I believe I have permission to contribute to this repo, but I'll continue to do so via PRs because code review is important. :)

jackfranklin commented 11 years ago

Out of interest - how did you turn an issue into a pull request? Didn't know you could do that!

OliverJAsh commented 11 years ago

I use https://github.com/defunkt/hub

git pull-request -i ISSUE_NUMBER

On 22 Jan 2013, at 13:58, Jack Franklin notifications@github.com wrote:

Out of interest - how did you turn an issue into a pull request? Didn't know you could do that!

— Reply to this email directly or view it on GitHub.

jackfranklin commented 11 years ago

First thoughts: we need a style guide!

Not got time to properly try it yet - I'll post when I have :)

OliverJAsh commented 11 years ago

Haha yes, we do.