I work with java at work.. In last year i've worked on (react/redux, graphql, vuejs, react native, angular, elixir/phoenix ...). I want discover new things
i want now work on an technology for "mastered it". I haven't lot of time so i prefer work on only work on 1 technology at server side (i will keep react/react native for front-end)
In your opinion, what is the most "versatile" programming language for back-end, for example :
- Web server
- Deal easily with databases
- Doing intensive CPU task (resizing image ...)
- Doing data analysis, IA ?
I would do lot a different things with my future programming language.
Any suggestion ? (I was thinking to python, but i really don't know anything about it)
Write your answer…
Now let me tell you what all you can do with node.js:
EVERYTHING, yes you read that right.
With node.js you can create web server, APIs, which also allows you to easily deal with all kind of databases, suitable for data analysis, doing intensive CPU task and what not.
node.js has very large communities, and due to it's popularity in the market, you can get various library to make your task easier. making web application with node.js is faster, with great performance.
Hope this answer will be helpful.
Just want to add on, although Node.js is very good for some of these, because of its single threaded nature, CPU intensive tasks can make it take a hit. Number crunching is one of the weak points of Node.js. This is because since Node.js is a single threaded application, if it is stuck resizing an image, then the server will be unable to respond to other requests. The way to get around this, is to rework the algorithm so that it is more event-based. There are various ways to do this, one of which will return a bunch of Promises with each having a small bit of the calculation to be done. This will allow Node.js to shallow the calculation a bit better. Another solution is to move the CPU intensive operation into another application/service, in which Node.js will call that. Node.js works best for small requests.
Now, allow me to talk to you about our Lord and Savior, Google. Google, in its infinite wisdom, has created a language called Go. Go is very much like C, except it has more modern concepts, such as concurrency and requests. Go handles concurrency by making it simple to create a goroutine, which can be created on a separate thread, or on the same thread, managed by the go scheduler. With that, you then use a channel to pass the calculated data back into the main routine. Also, it compiles down to machine language, instead of being interpreted, and also comes with its own garbage collector.
Node.js is very much a web server type of language, meaning it is good with quick requests. Go is a server language, as it is designed to handle concurrency a bit better, so it can handle longstanding requests.
Honestly, you should not tie yourself to one language, as they all have weak points. Do you just want to work on servers? What do you want to do on that server? I haven't even gone into application type languages, which you already have Java. There is also system languages such as C and Rust, if you need that memory control.
so we got all 3 standard "RAD" languages now to something fancy just because such questions always boil down to "what do you need" :D and everyone has a different opinion :)
So lets add Ruby to the mix ;D and just because I think that programming is fun and I raise with Elixir :)
Two completely unrelated languages that happen to share the first few letters because of a marketing deal that duped Sun into throwing money at Netscape twenty-plus years ago.
PHP is the go-to choice for making server-side websites for the simple fact it is ubiquitous. Try finding shared or managed hosting that doesn't provide it! THEN try and find the same thing that will let you have node.js installed/available, much less something like Python or Ruby. Unless you're self managing a VPS or dedicated, just getting access to anything other than PHP? You'll either be told "we don't do that" or "sod off".
Now, PHP has its faults, but many of those have disappeared since PHP 7 dropped, if you bother doing what we've been told to do for the past decade in terms of dropping outdated methodologies, and the language in general is pressing forward with optimizations and changes that make many other languages look like they are standing still. (yes Python and Perl, I'm looking at you when I say that!)
A few of the things you mentioned -- like image manipulation -- is offloaded onto C optimized libraries -- like GD. This means you do not see the performance impact you might see in languages that don't provide access to a graphics library. Few languages interface as cleanly or smoothly with SQL databases, particularly if like a good little doobie you use PDO (PHP Data Object) since with a bit of care you can write one codebase that can work with many different database engines! More so if you practice an older concept called "named queries" and proper separation of data from query using the prepare/execute model.
To that end if you see any tutorial for PHP saying to use mysql\ functions instead of mysqli or PDO, or that is putting variables into the query strings using double quotes or string addition? GO FIND ANOTHER TUTORIAL, you're in web-rot land!_
Which is why it is so disturbing to hear about people who've learned a server side language (like PHP, ASP, node.js) but clearly don't know enough about HTML or CSS to be using either to build websites. Just look at the codebase for turdpress or all the feeble minded morons singing bootcrap's praises. There's something in the kool-aid.
The Dev Community
Free, friendly and inclusive platform for developers
Or connect with