0

We are about to start building a web based application to be used by employees within our facilities. The scope of the application is rather simple.

  • accept user input
  • pull data from DB based on user input
  • pull data from Web Services
  • display said data so user can review and/or modify it
  • save changes to database

At this time, I am most comfortable with C#. I believe I can work in any programming language but, C# is my current default. Having said that, I am not the one who will build this application. I built a C# Windows application to iron out the proof of concept but, my teammate will build the production web application. At first he suggested we build this using Javascript, the language he is most comfortable with. So I reminded him that we need to interact with a database and I rejected his idea of connecting to the DB using JS.

https://stackoverflow.com/questions/857670/how-to-connect-to-sql-server-database-from-javascript-in-the-browser

So then he said... well then, how about I make it using Node.js?. So I started looking into Node.js to understand why I should accept, or why I should reject the idea. Quite frankly, I don't see why I would let him build this app using Node.JS over C#. He's not yet proficient in writing C# but, he's not proficient in writing Node.JS either. His learning curve will be similar either way...

My actual dilemma is this... Why bring in Node.JS if I know I can get this done without it?

1

As someone who currently uses Node exclusively for all backend stuff, I have to warn you about possible problems that a beginner as your teammate may have. I see those problems regularly on Stack Overflow.

The number one problem that people have with Node is asynchronous I/O. If your teammate has a frontend background than this can be not a problem. But even having hardcore backend background with languages where you handle concurrency with threads can still lead to problems unless the person fully understands single-threaded event loops, callbacks, promises, events and streams used in Node, plus possibly async/await generator stuff if you want to use cutting edge features.

So my recommendation would be to use C# or other language with blocking I/O that allows you to think linearly by anyone with no experience with asynchronous I/O. Blocking I/O may be less efficient but it is at least easier to reason about and someone the main bottleneck is the human, not the computer. For very high throughput application I would recommend using non-blocking I/O and event loops even in C but for things that are not that demanding it's not such a big deal.

For anyone who understand async I/O I can recommend Node because it works really well. But don't think that it's easy just because it's JavaScript. It's not. It's hard but it's very satisfying to see 10,000 concurrent connections handled with no problems even with simple code like this (this answer was downvoted for some reason but I assure you that all of the code and the data is correct).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.