Response title
This is preview!
TO;DR (Too Old, Didn't Read)
I see. Thanks for that bit of clarification. Yes, I'm looking more for framework agnostic events here, including taking the dependency on jQuery, if I can at all help it. At least where this is concerned.Special events are not Custom events. They are not the same thing. jQuery is updating and finally documenting special events. But they are special - most developers will not need them.
Yes, I started there, and it led me down the rabbit hole of, apparently, "special" events.
Yes, exactly. Not bound on a particular DOM element, but on my controller instance(s), in this case. So it would not be appropriate to have a loosy-goosy call to an event somewhere. They really do belong as a property attached to the controller (in this case) itself. Or whatever service-y object from which I might want to radiate events.Do you have some need for pubsub for non-GUI purposes?
As have I; with the help of Boost.Signals2, it's really not that difficult, and the event driven pattern itself helps to keep the thought stream very concise and well organized. As well as in MFC, as well as in Qt, and yes, definitely not for the faint of heart in places. But with the advent of C++1x and beyond, functional elements are so much more accessible to the C++ world now. Event driven isn't for everyone or for every application, but when you need it, increasingly there are ways for it to happen fairly painlessly these days. It could also be that in those 20 years, the pattern is not so sophisticated, that it is easy to land on "end of life cycle" but not so much end of utility. As I said, there are only so many ways one can approach the event driven pattern in any language, much less JavaScript.There are some Javascript pubsub libraries, but somehow in 20 years of using Javascript, I've never felt compelled to use one (or even look for one until now). I just did a quick search, and found mostly Abandonware. Maybe somebody else can suggest something currently-maintained and popular. (And, yes, I've done pubsub - painfully - in C++ MFC - good riddance!)
Well beyond the scope of what I'm after here, but good to know, thank you.<snipped/> re: Promises/futures.
Also, good to know. I'm not sure I consider myself "seasoned veteran", per se. There are still aspects that are somewhat mysterious, like the magical "this" reference, but are becoming more and more second nature the more I dive in two or three levels deeper than the average, let's say.If you are new to Javascript, you should spend a bit of time studying Javascript. It will surprise you when you dig in - it is not just a simple scripting language for gluing together It is important to understand that it is NOT an object-oriented language, though it can be corrupted into acting somewhat like one if you insist. It is a Functional, Prototype-based language, and has more in common at it's core with Lisp than it does with C++ (or C#).
© 2013 jQuery Foundation
Sponsored by and others.