You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.
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?
The text was updated successfully, but these errors were encountered:
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 ns2on 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).
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.
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?
The text was updated successfully, but these errors were encountered: