241 points · by sthatipamala · 15y ago · 32 comments
This is pretty neat and I like the emphasis on getting stuff going in as few lines as possible but I'm not convinced that return values and implicit result callbacks are the way to go for asynchronous requests, which is how I understand this project to work. Often when you want to make a remote call you'll be doing some I/O on the server side, which in node is asynchronous so you can't return right away. Passing along a callback from the client side works much better when the I/O actions have some values to call the client back with.
The implicit callback is definitely my least favorite part in building NowJS. You can still pass in an additional callback to do any asynchronous I/O. We're trying to find ways to make this experience better for the next version
https://github.com/substack/dnode-protocol
It's written for continuation-passing style but it shouldn't be too hard to retrofit it for other call styles if you want to preserve explicit returns for instance.
http://armstrongonsoftware.blogspot.com/2008/05/road-we-didn...
I'm still trying to figure out node so pardon my ignorance, but am I supposed to run this from a specific location? anyway, the project looks pretty cool, looking forward to playing with it.
I'd love to see an example as to how you'd integrate that into a Python/Django project.