Thread.Sleep(2000) //Do something that takes a whileĬ("Hello from SimpleHandler") Public void ProcessRequest(HttpContext context) It uses a very fast JavaScript engine called V8, but more importantly its I/O is asynchronous and event-driven which contrasts with typical synchronous code.įor example, a naive hello world HttpHandler in ASP.NET that "does some work" for a few seconds (gets a file, accesses a service, etc) could look something like this: public class SimpleHandler : IHttpHandler Why bother with node at all? There's a number of interesting aspects to node as it sits. His subtitle is "Node isn't always the solution, but it does solve some important problems" and that's just exactly it. It's NOT an HttpHandler, but I'm using an analogy here, OK? Here's a lovely article by Brett McLaughlin that goes into more detail about Node.js and what it is. If you are an ASP.NET programmer, you can think of node.js as being like an IHttpHandler written in JavaScript. The idea is that if you are doing a bunch of JavaScript on the client and you do JavaScript all day, why not do some JavaScript on the server also. Folks called it "Node" and it's basically server-side JavaScript. ![]() ![]() It's the one that makes you feel not hip if you don't know what it is. ![]() ![]() If you're not familiar with node.js, it's a new web programming toolkit that everyone's talking about. Some folks on our team have been working on making node.js work awesomely on Windows.
0 Comments
Leave a Reply. |