10
sjwsjwsjw
42d

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.

Comments
  • 2
    I wonder if they cared if people transpile from a better language to jawascript.
  • 4
    > I can understand if you know nothing else it would make sense.

    No, it wouldn’t.
    Learning a new language would make sense.
  • 6
    @retoor using JS for the backend feels like a sin, utter blasphemy. CRINGE.
  • 3
    @int32 maybe in protestantism but you guys betrayed the pope
  • 1
    @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.
  • 2
    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.
Add Comment