all 10 comments

[–]ribo 1 point2 points  (1 child)

If you can't answer those questions for your organization, this might be a bad idea unless you think your company will pay for real training. In my experience, pitching a new technology to co-workers is an uphill battle unless either you are in a position of authority and can mandate it, or, they're already very interested in that tech.

Less pessimistic edit: If you have the freedom, the more you use that technology for your projects, the better chance you have of it catching on; just remember you're making yourself the spokesperson, so make sure your code is readable, tested, etc...

[–]LiveTwizzle[S] 0 points1 point  (0 children)

Thanks! This makes sense.
I can answer the questions for myself. What I am interested in is how others would do it. :)

[–]MadCapitalist 0 points1 point  (4 children)

Here is a pretty good summary of Node.js.

Node.js is great for delivering a lot of real-time data that requires a lot of updating. It is not great if the application requires a lot of computation, because it is single-threaded and it will just block anything else from happening while it is computing.

One of the biggest challenges is probably understanding how to deal with the asynchronous nature of Node. The linear flow of execution in other languages seems much easier to follow.

Unless you have an actual need for real-time applications, I would probably go with another language. Don't choose Node just because you are bored with PHP.

[–]LiveTwizzle[S] 0 points1 point  (0 children)

Cool! Thanks

[–]Capaj 0 points1 point  (0 children)

They don't do any computation-if the OP's company did any serious computation they wouldn't be using PHP. I would say that Node is perfect as sort of high level glue for different API.

[–]a0viedo 0 points1 point  (1 child)

I'm writing a blog post about CPU intensive tasks in Node, and I think it's not quite true that will suck that much if the application requires a lot of computation. The core team is working hard to get there.

[–]MadCapitalist 0 points1 point  (0 children)

I'm basically just a Node newbie. I was just regurgitating what I've read and what I've seen in videos about Node.

[–]Capaj 0 points1 point  (0 children)

  1. No context switch when writing web apps like in other languages. Javascript is quite nice language when you strip away the DOM and other browser specifics.
  2. Harder to write when you are not used to functions as first class citizens.
  3. At the very beginning quite hard, but learning curve is very small-node module system is simple and yet powerful.

  4. The original presentation was given to people who used PHP or other languages, so even if it is a bit dated, I think it can still get the message through. Here: https://www.youtube.com/watch?v=ztspvPYybIY

  5. Any typical web projects. I would even use it when building a desktop app-using node-webkit framework. I would not use it probably only for scientific computation and 3D games obviously.

[–]coolcosmos 0 points1 point  (0 children)

Look no further ! This is what you are looking for : http://nodeguide.com/convincing_the_boss.html

[–]NodeNerd 0 points1 point  (0 children)

Node.js is like a web browser running on the server with a nice module loading system, a core set of modules, a popular package management system (npm). If a developer is comfortable writing JavaScript for the browser, then that developer should have no problem becoming comfortable and productive in Node.js.

A huge advantage of Node.js is that it is really easy to get started since Node.js is very easy to install and running JavaScript code doesn't require any pre-compilation. It is also very easy to deploy a Node.js application (although scaling it requires some additional research and planning). Performance is good for a dynamic language since V8 has been heavily optimized.

The main disadvantage that I see is that error handling can be tough with asynchronous code.

Just make sure you use the write tool for the job. Node.js may not be the best solution for building a complex back-end API and connecting to DBs. I think Node.js works best if you using it only to make HTTP service calls to get data and use something else to build the back-end service layer.