Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Refactor events #224

Open
mweibel opened this issue Jan 26, 2014 · 3 comments
Open

Refactor events #224

mweibel opened this issue Jan 26, 2014 · 3 comments
Assignees
Milestone

Comments

@mweibel
Copy link
Member

mweibel commented Jan 26, 2014

While working on #207 I discovered that we actually use the jQuery events in a wrong way, or let's say: jQuery has a namespacing feature which we didn't think about when creating the names for our events.

So, this raises some problems and might raise unknown problems in the future. Therefore we should think about how to refactor them to
A) Use namespaces in a actually helpful way
B) don't use namespaces at all (i.e. replace . with : in event names)

Opinions?

@Hypher
Copy link

Hypher commented Feb 19, 2014

I'm absolutely for replacing . by : since namespaces should be kept for lib end-users that would manage their own subscriptions (eg: candy:some:event.myNamespace).
Additionnaly, jQuery "namespace" is only a tag, ie event.ns.ns2 does not define a hierarchy, but simply two "tags" ns and ns2 on the listener (this last point enforces the choice).
(And not to mention that, to me, the better choice would be to get rid of jQuery event capability (since Candy events are not related to DOM) and go for a real events lib as EventEmmiter for instance).

@joshuah
Copy link
Contributor

joshuah commented Mar 5, 2014

+1 on EventEmitters. Any word on how long until events are re-factored?

@mweibel
Copy link
Member Author

mweibel commented Mar 5, 2014

About EventEmitter: yeah would be a good option, but why adding another dependency?

How long: I don't know yet, first I want to get another release out - this should take place soon. Afterwards I'll want to do the events refactoring along with the other refactoring.. This might take a while due to limited resources (I'm currently the only one working on this project). I do hope however that I can make good progress.

@mweibel mweibel mentioned this issue Aug 5, 2014
5 tasks
benlangfeld added a commit that referenced this issue Aug 5, 2014
@benlangfeld benlangfeld modified the milestones: v1.8.0, v3.0.0 Aug 12, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants