开发者

node.js, what is that good for?

开发者 https://www.devze.com 2023-04-13 02:54 出处:网络
I am a .net web developer. I like learning new languages and try to get up to date with their different features开发者_开发百科.

I am a .net web developer. I like learning new languages and try to get up to date with their different features开发者_开发百科.

I have been hearing of node.js for quite some time. I finally have a few days off so I decided it might be a good opportunity to learn.

From a quick glance at node's documentation, I must say that I didn't understand what's all the fuss about. As an experienced .net programmer, why should I study node.js? Does it replace my c# code? Can node really compete with dot net (database support, multithreading, OOP, readability, etc.)? Do you really develop faster with node.js?


As an experienced .net programmer, why should I study node.js?

For example if you are interested in asynchronous programming model or you want to use single language across your client/server stack or your want to try slightly different way of doing things and so on ...

Does it replace my c# code?

In general it can both replace and complement various parts of your existing applications (not only) written in C#, however it may depend on the scenario and whether it's suitable to use patterns and paradigms which are applied with node.js.

Can node really compete with dot net (database support, multithreading, OOP, readability, etc.)?

Node.js has very active community which produced so far around 4.5K packages which covers wide range of areas, functionality and systems, for example you should be able to find several packages for every major (and even minor) database system without problems.

Do you really develop faster with node.js?

Node.js is less verbose in code quantity than C#. Area where it particulary excels is for example network programming. Its network related API is rather simple and you should be able to write these kind of programs fast. Of course it's not limited to only network stuff, for example node is extensively used in web based (real-time) applications. You should however be careful with asynchronous/callbacks stuff and learn or read some articles on this stuff before diving headlessly into node.


For me the core concept of node.js is dealing with high latency operations without explicit multi-threading. IMO non CPU bound applications should not need any multi-threading at all. Multi-threading adds a lot of complexity, but is not really necessary when just dealing with latency from IO.

But I'm sure that this programming style will get more popular in the .net world too. C# 5 gets the async language feature which makes this programming style much easier. So once you get the appropriate libraries you should be able to write asynchronous non multithreaded code in C# very well.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号