js experts :-)! Can I implement a complex business tier in a web-projects (CRUD Operations, Algorithms, complex calculations and optimisation, loading pictures, interactive user GUI, content export in csv and other formats, time-driven events such as email news, security aspects, and so on) completely with Node.js?
Of course you can. You could use any programming language for that.
The Short answer is yes, and for some of these, Node.js will perform exceptionally well.
Personally I find that Node.js is very well suited to handing real time events, and multi-client/server communication.
When it comes to complex calculations, and business logic, Node.js can get tricky. By it's nature it runs things asynchronously, meaning that some things that you would expect to work, don't. Things like
var script = 0;
for (i=0;i<10;i++){
script = i
}
console.log(script);
will return some number between 0 and 9, most likely 0. If you aren't used to it (and sometimes even if you are), it can cause countless headaches. There are ways to get it to work the way you would expect, at the very basic level there are callbacks.
var script = 0;
var somefunction = function(i, callback){
if(i < 10){
i++;
somefunction(i, callback);
}else{
callback(i);
}
}
somefunction(script, function(i){ console.log(i)}
There are also libraries that can help with the control flow such as async.js.
Because of this though it can make implementing complex calculations and business logic a bit difficult. In some of the projects I've worked on, we've used python, ruby or PHP for the business logic side of things, and node.js to handle realtime communication with the client.