Ask HN: Are there and will there be a lot of JavaScript backend developer jobs?

23 points by Onixelen ↗ HN
How is it going to compare to Ruby and PHP?

PHP is pretty old and popular. Around 82% of websites are using PHP. How long is it going to stick around for?

55 comments

[ 12.4 ms ] story [ 1600 ms ] thread
As you say, PHP is pretty old and still widely used. There is still a lot of Cobol code running in the world. I would argue that there is so much inertia in programming languages that you can allow yourself the privilege of selecting strictly from which language you enjoy the most, not by trying to analyze which will provide a stronger career path.
I used to be a flash developer.

It's worth considering.

It is. Flash however is also an example of something very much depending on a single vendor. If is somewhat comparable with focusing on the application level. There are plus sides to it but risks can materialize faster.
You can't compare PHP and Cobol. PHP is insanely popular (#3 globally) and will be for a while. Cobol isn't even in the top 20.

http://pypl.github.io/PYPL.html

Searches on Google don't mean anything. COBOL programmers are from an era where programming wasn't just cut-and-paste-from-Stack Overflow.
Still, PHP is more popular than many "good" languages. It's not going anywhere.

Cobol has been dead for a long time. It's not popular even on HN.

Neither is FORTRAN. But the computing world is a good deal bigger than web-based startups making CRUD applications.
I hope not. It's the only real choice on the front end.
No, front-end and back-end cultures are too different. Front-end people like things that are shiny and new, the latest framework in the latest browser and it's only got to last a year at the very most before it gets re-written again (or the company is bust). Back-end people like things that are proven and stable and don't care if it's a decade old, because they want something that will last another decade. If you try and cross these streams you get things like MongoDB and Node.JS - lol.

It's why I never trust anyone who claims to be a "full-stack" developer. They will be bad at least one of them.

> It's why I never trust anyone who claims to be a "full-stack" developer. They will be bad at least one of them.

Or you don't have to use the latest fart.js and still implement frontend that will last more than 1 year. Or maybe I'm just a backend developer claiming to be full stack...

it is not about trust. Probe them. Ask them questions. You will know with an hour how deep their knowledge of frontend or backend goes.
Absolutely. There's a lot of value to be had in understanding everything from the browser down to the power supply into the rack. But no-one is equally good at all of it - I have more respect for people who know their strengths and play to them, while also knowing how they fit into a team, and the team is "full stack".
Go is not a decade old. And backend guys like it as well. Django is not that stable either and backend guys like it as well.
Django is the most stable framework I have seen without falling into obsolescence. There are breaking changes but they are easily manageable and thoroughly documented.
Is this comment satire?
Caricatured, perhaps, but the characterisation of a typical front-end developer vs. a typical back-end developer is disturbingly close to the mark. Obviously there are exceptions in both cases.
I'd argue that frontend web dev was a pretty terrible experience until fairly recently, and that new tools and libraries make it much easier and more organized. I think the enthusiasm for the new and shiny is warranted, and I spend a portion of my current work day writing ISRs in assembly.
As javascript has continued to crawl into many areas where nobody thought it would, my guess it could grow in the future. But it still lacks a good/popular backend framework (in node), as apposed to client frameworks.

At the same time I think PHP has a good future, where 7.0 made a really great progress in performance. Laravel is awsome for web development.

Express seems pretty popular, it has stuff for routes, templates etc... Bit like Backbone for Client, without the HTTP stuff
Yeah, though I still think its a bit thin to act as a good backend. I'm waiting for a better DB/model/controller framework to serve APIs.
I'd say the backbone comparison is pretty apt, but I've always felt both strived to be "libraries" of structural building blocks rather than frameworks (for better or worse).

Writing express servers feels a lot like writing a Ruby server at the Rack level. To people that are used to Rails/Django, it feels a lot more manual and painstaking. While I personally like the clarity of request flow and modularity that I get using express, there are definitely some friction points (picking the best model layer, quickly picking up a new codebase, generating admin UI, to name a few).

From my point of view, JS development can only grow. I'm seeing it in more different places and is our way to go for different projects.

Now, as a professional, I wouldn't tie myself down to a single stack but be able to work with others because there's lot of stuff written on JEE, .Net and PHP that someone has to maintain and are so different from Node.

Also, I don't see other stacks growing as much as Node, like Go or Pyton. And even PHP is that big not because PHP itself but because of Magento, Joomla and all the other PHP based products already out there.

On a final note, affirming that a frontend developer can't do backend is simply stupid. And once Node and ES6 confluence it will be even easier.

From my point of view, JS development can only grow. I'm seeing it in more different places and is our way to go for different projects.

Now, as a professional, I wouldn't tie myself down to a single stack but be able to work with others because there's lot of stuff written on JEE, .Net and PHP that someone has to maintain and are so different from Node.

Also, I don't see other stacks growing as much as Node, like Go or Pyton. And even PHP is that big not because PHP itself but because of Magento, Joomla and all the other PHP based products already out there.

On a final note, affirming that a frontend developer can't do backend is simply stupid. And once Node and ES6 confluence it will be even easier.

There are a ton of PHP jobs, but I have the impression that you don't get paid as much as NodeJS and other programming languages, since a lot of people know PHP.
PHP, Java, and C will probably stay around as long as their isn't a huge shift in software development, e.g. by having AI doing the development for you.

JS as a backend is more of a joke, though. It has heartful followers, true. But it doesn't bring anything valuable to the table. I may be wrong (and happy to be corrected) but this was developed by people who learned the JS frontend stuff first and then didn't want to learn another language for the backend just as well. So they decided to make the language they already know available in the backend as well. But that's it.

Think about competitions in the backend/desktop area. For instance Go. It aims to combine the advantages you have in the most popular programming languages, while also providing stuff as core elements (e.g. packaging) that are only attached on top of other languages. Or coming from the other direction of the "cool" languages, it provides all the nice little modern features you know from other languages but also enables you to write and compile code as fast as the C codes of the ancients you always read about.

This is what real competition looks like. It provides something huge and new while also providing quality features you know from your current favorite language. If you don't bring something like that to the table people won't switch to you, at least not for serious projects. The advantage of already having educated developers on the market for the "old stuff" and having an infrastructure of libraries that solve most of the tasks at hand, is just too big to compete against without killer features.

And as I said, I may just not know the killer feature of server side JS, in which case it may be just a marketing blunder of the server JS people that can be corrected.

The killer feature (and only reason I use it) is being able to render the same templates with the same data on the server (isomorphic/universal/whatever).

The result is a webpage that can do lightening-fast transitions client-side without breaking the back button.

For what it's worth, ReactJS.NET does server side rendering, so you can have a .NET backend.

https://reactjs.net/guides/server-side-rendering.html

In most cases, it's probably still easier to use C#, but JScript has always been an option in ASP.Net (and classic ASP). I found that the ability to use the same code on the back-end and front-end was nice when you needed it, but those occasions were quite rare.

The code also usually required some (often significant) refactoring of the code in question to make it portable between the front-end and back-end environments. In classic ASP, this usually meant ensuring front-end code moving to the back-end was isolated from any DOM interaction and didn't use any ES5(+) features, while back-end code moving to the front-end had to be isolated from the ASP objects (Application, Server, Session, etc.). It's all stuff that seems like common sense, but wasn't rigorously applied to JScript code which only had to work on IE5 (later 6, finally 7 before the project was put out to pasture), especially since use of JavaScript on the client wasn't significant until the project's last couple of years.

IronES2015 or IronTypeScript. Interesting thought.
That part of the web workflow just doesn't seem big enough to warrant all the other parts that are missing in the NodeJS ecosystem. In practice if those things are important enough there's a variety of template languages that are ubiquitous.
so you have to keep the same code on client side for every page that requires re-rendering. kind of bloated?
Hm? Other languages also have template systems. PHP actually started as template system. Even today it should be possible to do inline templating stuff just with PHP (although other template languages are easier to use for that purpose). Not a huge fan of PHP either, but templating is not a killer feature. Everybody has that.
I have been doing some NodeJS development and it has been pretty miserable compared to something with a real type system.

Lately, I started converting everything over to Typescript and the situation has improved a lot. I think if Typescript becomes the main way that people program JS stuff then Node might have a chance of gaining some mind share.

NodeJS has an advantage on very lean teams where you need a front-end that's not hideous and a backend of some sort, NodeJS makes it easier to find a single person who can do all the programming on that project. It's not a technical win, but it is a business win.
Biggest myth I have ever heared. Only because someone can write frontend JS, doesn't mean he can understand backend logic and actually write proper backend code. Also, if you are a 1-2 person team and using a frontend JS MVC framework in 95% of all cases you are doing it wrong.
I agree. Backend and Software are two different worlds. At least if you want to get both right :-)

But!!! If you have the same language in both, its easier to check the code of the over side and derive some insights, or to eventually fix some small bug somewhere or implement a minor feature.

I experience that currently.

Not all projects require "proper backend code" whatever that means. It's not my team, but our enterprise/analytics dashboard is written in Node; we've been fine with 2 developers on that team for 3 years. It doesn't receive a tonne of traffic since it's largely just interactive reports for our users and the actually complicated parts are handled by a separate team that makes sure the relevant data lives in a Druid database that the dashboard team can query.

The whole product started as a NodeJS+MongoDB app, which was a disaster at scaling to the billions of requests a day we handle and we've replaced it everywhere except the dashboard, but there is absolutely no incentive for replacing it there and when something truly tricky comes up there is support in the rest of the org for them; of course nothing stops them from writing a hair ball besides themselves, but that's always the case.

You don't necessarily need to find someone who is only good at frontend code and throw them into a backend project, but if you find someone comfortable with Node, they're probably in that position because they also know how to do frontend, and once you have at least one senior Node developer, you can teach your frontend-only developers.

Maybe I just don't have a good sense for the web developer market and there are a lot of backend+frontend people who are not Node developers, but my intuition tells me that's not the case.

"if you are a 1-2 person team and using a frontend JS MVC framework in 95% of all cases you are doing it wrong."

You're saying having a small team makes it a bad idea to use a standard-ish library for organizing things and avoiding grunt work?

I would argue the exact opposite.

nodes killer feature is the (accidently) combination of good practises. And the commonjs lexical scoped module system
> combination of good practises

Other languages have that as well, although probably not the same good practices.

> commonjs lexical scoped module system

Fast googling of commonjs results in it being some kind of standard library? Not really sure what this is. Can you explain more in depth?

Node uses JavaScript witch is a simple scripting language that is event based, asynchronous, and thread safe.

In JavaScript there are values: 42, "hello", true. And objects: [list], {object}, function. And if statements ... While more stuff exists there is a consensus in the JavaScript community that they should be avoided, so you rarely see the bad parts. Then there are only a handfull of built in JavaScript functions. And there is no concept of stack, pointers or types. How the data is represented in binary vary and is very optimized.

A node script is usually a bunch of functions that are called by IO events, like a IP socket connection or callbacks from data streams, like when a buffer is filled.

Node has no standard library, just a bunch of built in modules, that are required like any other module. And Node does NOT support imports, includes, or global variables, instead you require Modules. And since modules are lexically/function/block scoped, they can only be called from within the function from where you required them. You never have to look elsewhere to see where a variable is declared, or search for places where it's used, like in many other programming languages.

Here's an example how a NodeJS script can look like:

  var socket = require("socket");
  socket.onConnection = function socketConnection(client) {
    client.onData = function dataReceived(message) {
       var sms = require("sms");
       sms.send(message);
       client.send("SMS message sent");
    }
  }

Besides lexical scoped modules in the example above there is also a "closure" of client in dataReceived from when socketConnection was called.
I am working currently as a Senior dev on a team of 8 developers. We use NodeJS6 for the backend and its a great language wot work with. I've never been so productive. There are some drawbacks (weird type system, you need disciplined programmers, etc...) but the overall experience is great. We have a microservice architecture, where every service is on average maybe max 700 lines or so and honestly, Node works great there. You don't have to worry about threads etc.. The event system simplifies all this tremendously. You have millions of library for every flavour. So Microservices in Node are a joy.

I wouldn't do a monolith in Node though... But actually, I'd never do a monolith again :-)

So I definitely don't see it as a joke. Before that I did C#, Clojure, Java, Python, C++ and Ruby jobs and honestly, I think Node is up until now my best experience. In terms of speed, joy and community. The latter is GREAT(!). I love js confs, so much different people, zero hostility, open minded. Great!

Also JS allows you to write very nice code. Look at libraries like Ramda, or the fantasy-land movement. You can write wonderful code in it if you know how to do it. ES6 really helps here. I wouldn't like to write code anymore in ES5 or earlier to be honest...

I think JS will do quite well as JS becomes the back end scripting language over time (in place of lua for example.)

I don't see a bright future for ruby, I think it had some lead advantage, but RoR/opinionated-design really cut down the options for innovation with a Ruby based web dev group. It is interesting to see how diametrically opposed philosophy of Ruby the language is from the RoR community, it is like Ruby created a liberal blank space and RoR immediately filled it with conservative inflexibility.

Php is in an interesting position, but I think ecommerce systems catching up and offering more integrations will erode its position. It is very expensive to hire and retain loyalty on a php project, especially when it is of any complexity since anyone who will tolerate it and understands CS has plenty of other options.

If I had to say what will trouble JS, it is C++ as the VM. Too many groups will lack members that are able to look bellow the scripting layer when the inevitable low level problems occur.

Personally, I see the future as a war (and up/down stack integration) between JS/v8 and LLVM based languages. While other options will keep their markets for years, they have no solid positions for growth. Python will hold on as long as it has the academic position, but it needs a better relation with LLVM or clever curriculum builders will choose another language to teach using only one easy enough language up through compilers, with llvm-ir replacing assembly in a way that makes sense given the Arm/Intel war could go either way now.

Python needs popular applications such as Magento, Joomla, oscommerce, etc. in PHP. Python needs better integrated with LAMP as the default in 'P'.
Absolutely agree that Python has a weak showing, but Java always had an odd disconnect with the real world too. These languages survive in every field despite relatively odd and impractical infrastructure in most due to the availablity of fresh grads that have been taught in them.
I see PHP holding its position. It looks like the committee has woken up and now PHP is moving into the right direction.
I don't think ruby is going anywhere anytime soon. It has a strong and welcoming community; It is also very easy to get started with.

I agree with you that Rails requires following conventions but then again which framework doesn't?

Rails is a mature framework and has been widely used in production. The reason why rails succeeds is because it allows you to deliver applications very quickly to market to meet the business needs.

Ruby's philosophy is move quickly and break things, I have no doubt ruby will stay relevant thanks to the community embracing change rapidly.

Ruby and parts of PHP are the quick wins. The real question when it comes to backend jobs is what is going to happen in the JS backend vs. Java. And that is at the moment hard to predict. The Java eco system is showing some weakness (Oracle stewardship, Eclipse stumbling, IBM embracing Swift) but on the other hand it is massive.

JS is not in a place yet where it could take on Java. But it is on the way to become an alternative that could eat away at Java use cases. JS6, TypeScript and the consolidation around NPM packages are significant improvements. Node control is too concentrated for a long term healthy ecosystem and lacks alternatives but if such would emerge then all bets are off. The primary back-end stack which is at the moment compiled Java byte-code could in the long run split into compiled whatever code and scripted Typescript code.

Caveat: Java investments stay subdued. JS investments don't level off.

The trend is microservice with polyglot environment where developers can use their favorite language for the right task. I can see Java, Python, Go, Nodejs all having their place in back end. Especially with PaaS buildpack, docker container, devops, it is less and less significant to choose one particular language as primary back end language.
For basic CRUD apps, choice of language is arbitrary.

At my company we have a mix of python, PHP and JS devs. Node is great for a lot of things, but it's better suited to smaller apps that do one thing. Cue microservice debate.

We have a lot of worker services written in Node, with a majority of our API services using PHP (Laravel/Lumen.) That's starting to change as some of our developers see the benefits of not having to context switch between languages when working on front and back end simultaneously.

I think/am hoping that as web assembly becomes better defined, that JavaScript becomes less necessary on the front end, and with JS not as required, people won't choose JS on the back end either.
I personally see elm + phoenix becoming the next mega stack. They are both very elegant, and performance-wise there's hardly anything better.