Linked by Hadrien Grasland on Fri 27th May 2011 11:34 UTC
Thread beginning with comment 474816
To read all comments associated with this story, please click here.
To read all comments associated with this story, please click here.
Actually most people working on 'frontend development' (javascript, html, css and so in the browser) are already wired to doing it the event-driven way and they like it.
It is how it was intended to be used in the browser, it's is probably better to not fight it. There is already enough fighting with browsers. ;-)
RE: Comment by Mystilleef
by Delgarde on Sun 29th May 2011 21:45
in reply to "Comment by Mystilleef"
However, I know many developers (usually with a background in web development) who hate callback based programming. They claim it's hard to understand.
Like Lennie said, that's a weird thing to say. Web developers, of all people, are most accustomed to dealing with async behaviour. Javascript is a fundamentally single-threaded event-driven language, and it's been Javascript developers (via frameworks like Node.js) that have been pushing the async model into server side code in recent years...
RE[2]: Comment by Mystilleef
by Mystilleef on Mon 30th May 2011 06:00
in reply to "RE: Comment by Mystilleef"
It's still a novel idea in the web arena. Async event-based programming has been the way to program desktops apps for about 2 decades. Web app development is still predominantly synchronous. Async event-based web frameworks are the exceptions, not the norm, in web programming. Remember Javascript only started being abused a few years ago with the hype that "Ajax" spurred.




Member since:
2005-06-29
That's the only way things ever work properly in the real world, asynchronous event-based message-passing systems. I don't ever use blocking calls. I always opt for non-blocking calls. If anything, it forces me to write robust code.
I've noticed the wild assumptions programmers make when writing code based on blocking calls is monumental. The obvious dangerous assumption is that the call will complete successfully, if at all! That's where the cards begin to fall because if that call does not complete, for 10 million and 1 possible reasons, your program just hung indefinitely or crashed.
I learned the hard way. Anyone, who has done any kind of desktop application development probably has an endless list of war stories about the perils of blocking calls.
However, I know many developers (usually with a background in web development) who hate callback based programming. They claim it's hard to understand.