Hacker News new | ask | show | jobs
by tracker1 3433 days ago
JS is simply the language that runs in the browser... even with newer options for compiled code coming close to being a reality, it'll be a while before tooling catches up.

JS is actually a decent language, and imho with more recent advancements better still. Combined with npm there is simply anything you might need available (for the most part). Not that there aren't a lot of gems out there.

In the end, having one language to think about, rather than how to shoehorn communications and logic between two languages is simply more difficult. I went, similarly from C# to node, not because I didn't like C#, but because the friction in writing JS on the server and the client was so reduced from two differing languages throughout the day.

Similarly a lot of devs went to simpler data stores so they don't have to deal with layers of ORMs that only half work, and can simply store and query basic data forms. Mongo fits this development model well, early hiccups in the technology aside.

In the end, it allows you to build web apps in one language, and not have to write translations to get from one to the other on the client.

1 comments

Absolutely agree.

I've helped maintain REST APIs in both Java and NodeJS at different points in time.

Doing so in Java was always a painful iterative process; ask the ORM for data, painstakingly map the data to Java DTOs created mostly for defining JSON structure, pass it off to RESTEasy or some similar framework, see how the JSON turned out. Adjust and repeat until satisfied. Yuck.

In NodeJS, by contrast, fire off the SQL to get the data, map into the JS object that you need and return it.

Kind of funny how, years back, a selling point of GWT was that you could use the same language across the stack. It wasn't a bad idea, just a poor choice of language.