Re:MVC is dead, it's time to MOVE on (2012)
by alttab on Wednesday September 11, 2013 @09:01PM
(#6371301)
You would need a static js compiler to type check the enum. So that's an extra step. This doesn't happen in Java or C, but browser based event models (the topic of the post) are almost always strings. Most front end shops choose this implementation. You could add that step to your build, sure, but in. Lot of cases the app is already interpreted so there is no "build" per se. Who else has seen this?
[ Parent
| on HN ]
Re:MVC is dead, it's time to MOVE on (2012)
by plorkyeran on Thursday September 12, 2013 @04:11PM
(#6376612)
You can make them properties on a global object, so that using an invalid event name is at least a runtime error (when you try to bind to an undefined event) rather than being mystified about why the event never triggers.