3 ms·
You know what's ridiculous? I totally agree that WndProc was horrible. But the web community is now reinventing it so directly that all I can do is bang my head
by gecko 11y ago
You know what's ridiculous? I totally agree that WndProc was horrible. But the web community is now reinventing it so directly that all I can do is bang my head repeatedly on my desk.
Have you seen Facebook's Flux/Dispatcher framework, for example? The Dispatcher is usually a massive switch statement that takes a single argument, which will be a record field that corresponds with the event type. It's exactly like switching on uMsg and then casting lParam to the relevant struct. And this is considered one of the absolute best web frameworks available right now.
On the bright side, I suppose we can look forward to equivalents of message crackers, OWL, and MFC for React soon enough.
- mstade 11y agoHaha yes, this is so on point it makes me laugh and then want to cry a little bit. Also, they host conferences for these things, where the kool-aid is a-plenty.
- narrator 11y agoOne thing that also reminds me of Windows culture in web development is the continuous reinvention of how to do the same old boring stuff.
- agumonkey 11y agoIt kinda frightens me too. Partly because reinvention at that scale is a bit sad, partly because it took me far too long to unplug myself from the current trends thrill and realize it. Somehow it also says something, whatever the underlying structure, local and native VS remote and abstracted (dom/js), some patterns keeps coming back over and over.
- gecko 11y agoAnd the comment is now a blog post with more context for those who were lucky enough never to write raw Windows code: http://bitquabit.com/post/the-more-things-change/ http://bitquabit.com/post/the-more-things-change/
- nubianwarrior 11y agoGood article.
- mosburger 11y agoAlso, incidentally, how Java 1.0 handled events in its windowing toolkits IIRC.
- neurohax 11y agoI am creating this small library that can be described as "jquery for streams of heterogeneous schemaless messages" which pretty much could be a lean replacement for the ugly switch at flex-like architectures. You can sneak a working barebones, very early preview at https://github.com/constructo/neurobus https://github.com/constructo/neurobus
- kaonashi 11y ago> The Dispatcher is usually a massive switch statement that takes a single argument, which will be a record field that corresponds with the event type. Stores have the switch, and you're supposed to break those up along model lines. In most the apps I've written, they never get beyond 4 or 5 branches.