top | item 41066463

(no title)

gaptoothclan | 1 year ago

A long time ago I started converted to using node js for backend work, seemed to offer many benefits over writing code in PHP without bringing many problems of Java. I found node to be somewhat clunky and a language where you had to bolt it together to get the language you wanted. Eventually started writing golang and it felt much easier to write, sometimes way more verbose but the type safety just made coding simpler.

Typescript seemed like a good option but was just another bolt on, I am not sure what value you gain by using Typescript over Golang, you have nice defined types which is great but it does not solve other issues with the language that are resolved in golang (also solved in deno).

One large benefit of using node over golang is the speed of prototyping something which I think having to use type script largely negates, so I can not really decide if this is a good step forwards or is making node loose some qualities that made it a good choice in other ways.

discuss

order

bezier-curve|1 year ago

Typescript is safer JS. You're still using JS with TS. The "bolted on" phrasing makes me think your issue may be more the absence of more opinionated frameworks like Django, that manage everything out of the box. I love using Django, but it's a little harder to go off the beaten path with it.

hot_gril|1 year ago

"Bolted on" is how I'd describe it too. Using TS means messing a lot more with random config files. And standard tools like the NodeJS profiler don't work with TS, which hopefully will change soon.

I've never used Django. Express seems a lot nicer.

gaptoothclan|1 year ago

My phrasing there was a direct comparison of developer experience between golang and nodejs. Golang has a very complete core library, I try to avoid frameworks as much as possible. For me I rarely have to think about the language or ecosystem, everything I want or need is already part of the language, testing, linting are some great examples

__alias|1 year ago

I mean the obvious answer is language familiarity, If your projects frontend code is in javascript/typescript ( which it is ), then using node is an easy choice. Shared libraries, shared types, etc etc

gaptoothclan|1 year ago

I was in the paradigm, there was very little code reuse from front to backend, some time performing validation I would like to have that option, but I would not have that as a killer feature that determined the language I use.

fulafel|1 year ago

Lots of people do of course use other languages for the frontend. (Or go for thin frontends, ala HTMX )

_joel|1 year ago

I guess if you already know Javascript, or have inhouse experience vs. learning Go. We use it with cdktf as previous fe experience, seemed logical vs. Go

gaptoothclan|1 year ago

sorry was going to add that there are probably more javascript developers in the jobs market, although there is a limit to the usefulness of these developers.

In the company I worked at we were fairly small and did not have huge applications running on node, so it made that journey easier