Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Lensflare2165722h> I can understand if you know nothing else it would make sense.
No, it wouldn’t.
Learning a new language would make sense. -
retoor111520hFor some reason i don't like it for the back-end either. I do prefer python. But what is the actual difference. The JS version would perform better also. But python frameworks are quite matured and do not have much crazy changes over time unlike the JS shit. A backend should last, and JS does not last at all. My minimal 3rd party libraries approach is doing so well for me. I learn a lot of stuff. In the end, the maintaince is actually less.
-
Lensflare2165715h@antigermanist the common interface between FE and BE should be plain and simple DTOs, typically defined via json in a REST api.
Those are trivial and don't hugely benefit from sharing code or type info.
Then those DTOs should be mapped into domain models with functionality and structure that is specifically tailored for the particular system, the frontend OR the backend.
If you mix both into a single soup, you are committing a major crime against what is holy in software development.
You are the heretic. -
jestdotty662614hbackend js doesn't change much
people are still using express even tho koajs came out like 8 years ago -
As someone who wrote a fairly large JS-only backend and then abandoned it exclusively for the reason it was JS-only, let me give some insight (TypeScript only has a subset of these issues, the build system actually is really nice for adapting JS to the back-end):
- It's great for really small stuff. I still recommend it as a backend for dev servers, simple game servers (like slither.io, whatever), etc.
- It scales horrendously. I was even using modules, not CommonJS, and shit was just awful. Refactoring only worked half the time, so once you write code and start to use it, you're basically stuck with it.
- Performance *does* stink. You can point to benchmarks where bun outperforms assembly or whatever, but at the end of the day, you're writing a scripting language that lives on the stack. If you need to do something that requires high performance, you're going to need to write it as a micro-service that your backend calls out to.
... more, but I'm out of comment space.

Looking at a job posting and they check to ask if you have experience using javascript/typescript for the backend.
All I'm left thinking is why would somebody choose that for the backend. I can understand if you know nothing else it would make sense.
rant