A few questions about node.js [closed] - node.js

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Am I right in thinking that node.js is a "total" development platform, in much the same way as asp.NET, PHP and even classic ASP are?
There seems to be a lot of excitement about node.js which makes me a little nervious about it being yet another "flash in the pan" type technology that will fade away?
If I was going to go about learning node.js have you got any tips how I might start out, without frying my brian?

Node.js is not a platform for common applications like blogs, etc.
It's for fast async apps like chats, relays, etc
It can be compared to Twisted framework (Python), Tornado framework (Python) or eventmachine framework (Ruby).

As said DmitryR, node.js is a framework of Javascript.
It is also based on the V8 engine of Chrome.
It is server side based, but can be used for non-internet application too (I m develloping one right now).
What is your goal in learning Node.js?
Create a website
Wrong choice
Create a web app (like a chat)
Good choice
Learning a new language ''for fun''
Good choice too, Node.js is asynchronous and quite easy to learn, even with obscure docs, and can be used for a lot of things. It is also a script, so it don t require to be compiled, but you better be on non-windows os, since node.js for windows can be a pain for devellopement.
If you want tips about where to start, you d better start by understanding asynchronous programming, it s the only "hard" part of this language.

There are some interactive ways to learn node.js like:
nodeschool
node.codeschool
You can give them a try.

Related

Is it a bad idea to start to write a microservices NodeJS backend application in REST, then try to convert/wrap some/whole parts with gRPC or GraphQL? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 months ago.
Improve this question
Is it a wrong manner to start writing a NodeJS application using REST architecture, then try to use GraphQL or gRPC approaches in some parts or completely rewrite some or whole the application in the future?
The reason for doing this is previous experience and coding speed in REST APIs. But at the other hand it's kinda a big microservices project and should support millions of users.
GraphQL is not going to help you scale, quite the opposite in many cases. GraphQL is an optimization (in some cases) but mostly for developer productivity, but there is a complexity cost.
Generally I would suggest to steer away from this optimization unless you have a clear understanding of what you're solving for. REST is a good 'default choice' because it's well understood, requires little tooling and is pretty universal.
Once you are further into your project and you find that you have (ideally measurable) challenges, you're in a much better place to decide to use a more specialized paradigm (gRPC/graphql) and why, but it doesn't sound like you're there yet.

What language to use for developing the front-end part of a messenger? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I'm trying to develop a program like Windows Live Messenger for fun and personal use, using Node.js for the backend part of the messenger, and I've come up with two questions:
Is Node.js a good choice for backend?
Which language(s) should I use for the frontend part?
Thank you very much.
The backend language doesn't matter at all. Python, node.js, ruby, perl, c#, java, scala, golang, as long as you expose an interface that can be consumed by the client. (generally a RESTful web service interface, but it doesn't have to be.)
The frontend language depends on the target platform. You should use the native language for the client platform for the most streamlined development experience. C# for windows, Java for android, Swift for ios, javascript for web. If you want to "write once run anywhere" consider React Native.
But be aware that any "write once run anywhere" strategy is going to be plagued by hard-to-debug cross-platform bugs, in practice it's almost always cheaper to maintain a client for each platform, because it's easier to debug in the native language.
Another alternative is Ruby. With http://reactrb.org and rails you easily put together such a system. In fact the tutorial on the above site ( under docs/tutorial) is a simple chat app

Is it best to use Node.js or SignalR [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
At the risk of this question being closed I will ask anyway.
I have been looking at the different JavaScript Frameworks as most jobs roles seem to want:
angular.js
Knockout.js
Node.js
Whilst i can see Angualr.js and Knockout.js provides a MVC construct to the markup pages (though still not sure which one is best to use) I cannot see what is the case for node.js?
Whilst I appreciate node.js is good for real-time comms but so is Signalr as they both use long-polling.
At present I use signalr to update images on my clients.
is there any purpose to swapping this out for node.js?
Like I said this question could be voted to be closed as it may seem to be asking an opinion - and that would be an answer to me in itself as it would be down to developer choice but is there a DEFINITIVE reason to use node.js over signalr?
thanks
One reason to use node.js is code redundancy. Both the server and client run the same language, thus they may share a certain part of the codebase, meaning potentially less to write. With libraries like Browserify this process can be made a lot more transparent and writing the client-side can be almost indistinguishable from server-side development. Another opportunity this opens up is both client and server side rendering + MVC setups with, for example, rendr.js. So you can have both the fast load speeds of server-side and responsiveness of client-side rendering. If any of this will be useful naturally depends on what you are developing.

can I trust node.js? safety/stability issues [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
Dont get me wrong people, let me clarify.
I would like to ask if I can trust node.js. I know its an amazing tool. But its a really young platform, to be honest. Should I start playing around with it (production, not just experimental use), or should I wait till it "grows up"?
Does it work fine on Windows? Because at the beginig it was not supported. Are there any stress tests that actually prove that its safe and can be trusted?
It demands to write a lot of code by hand, stuff that in other platforms are done by just one line of code. I know you are gonna say to me "that depends on your experience" . I agree, but does it worth "learning" node? What if its developing stops? Again, I'm only asking because its pretty young.
What of node's add-ons and modules are to be trusted about their safety/stability? There are so many out there.
Is it stable? And finally, what about node's interoperability? Does it work on every platform/browser? What about smartphones and mobile devices?
Again, dont get me wrong, I am not critisizing. I am just concerned because its pretty new, everybody is excited and I haven't see any cons, or safety/stability issues around.
Thanks
I don't understand why would anyone choose to use node.js to do backend: the statically typed code is easier to maintain and Javascript is not the best (a good?) language.
That said, there are situations, where it makes a lot of sense to have the same code running in the browser and in the back end. When you run into one of these, you will know. And then Node works just fine. We've had it in production for months exposing its functionality as an internal web service to our back end application and haven't had any problems with it.

How to Learn ExpressJS? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
Is it possible to learn ExpressJS without much prior knowledge of Node.js?
Is this a good approach? If yes, what resources can you recommend that I use to learn Express?
Yes of course, it's possible to learn expressJS without NodeJS. Even if it's always better to know both.
The best way to learn expressJS is the official guide :
http://expressjs.com
It is not a good idea to try to use Express before learning node.js basics. You really do need to understand the fundamentals of async because the node.js library modules are all async.
However, it shouldn't require more than a couple of days of studying some of the node.js tutorials and exploring modules like Promises and Steps.
Simple answer is yes, but it's not recommended, you can learn more about Express on their site.
Why is this not a good idea, well simply becuase nodeJS has programming standards, where you have to learn about the Disk I/O and cycle counts before you dive into coding, the reason for this is Node is designed to be Non-Blocking meaning that every action you perform in node that requires the disk to spin up or network access requires it to be compliant with its event structure.
For example:
require('http').createServer(function(Request, Response){
/*
* If your code here is blocking every request that comes in to the server get's bottlenecked.
*/
});
Because if this reason alone i would start on the video presentations around the net to start getting an understanding, and then hit the Node API before you attempt to create anything in node.
Why do you not wish to learn Node before you attempt to learn a module for node?
What I also advise is for you to get a IRC Chat and visit the #node.js channel as the guys over there will help you immensely.

Resources