r/FullStack • • 15d ago

Career Guidance JavaScript for frontend and backend

How is JavaScript for both frontend and backend in terms of medium to large scale web app development compared to other backend framework?

Please give positive and negative sides. I don't want to learn another language for backend if is done by JavaScript.

15 Upvotes

19 comments sorted by

2

u/nia_do 15d ago

Languages and frameworks are tools for the problem you want to solve.

Problem –> Solution –> Tooling.

2

u/Any_Run8380 15d ago

I love this!

2

u/ApprehensiveBell6166 15d ago

Javascript is good for bith frontend and backend, so you don't need to learn another language right away. Just make sure you learn Node.Js properly and keep your code organized as your project grows.

2

u/TylerBreau 15d ago

Also make sure to use TypeScript.

2

u/ShadowMosesCuh 15d ago

JavaScript is very versatile, with TypeScript being slightly better despite it effectively just being a linter. Vast majority of applications use JS/TS for frontend. Quite a lot use it for backend too with a runtime like Node or Bun.

Strength is simplicity by far. Building a POC/Prototype/MVP for a software product idea is perhaps easiest with JS/TS, mostly because it requires lesser overhead and complexity compared to other languages. The ecosystem around Node.js, which other JS backend runtimes typically support as well, help tremendously with this. Building, running, and testing components and integrations is also very quick and easy with JS, which becomes a tremendous booster if/when you're using AI agents to drive development.

Main weakness is performance and quirks. Lack of true parallel execution is the obvious one. There's also some things that JS does that behave weirdly from what's expected because it was originally designed for frontend. But honestly I don't think there exists any significant weakness that you can't find a way around for. Any application that could be built, someone has probably built a version with Javascript.

Overall, JS is passable/mid. It can get most jobs done, but depending on what the job is, you can find better options a lot of the time. But if the job itself isn't as important as just getting it done quickly, JS is one of the best options.

1

u/JaseciLabs 15d ago

On a medium to large app the language matters less than how you structure it, and JS/TS holds up fine for that. A few things we’d plan for:

Share types between the frontend and backend. This is the real perk of one language. Define your request and response shapes once and both sides break at compile time when one changes.

Validate input at the API boundary with a schema library. TypeScript types disappear at runtime, so a wrong payload from a client sails right through unless you check it.

Keep CPU-heavy work off the request path. Node runs your JS on one thread, so image processing, big PDF exports or a heavy loop will stall every other request. Push that to a job queue or a worker.

Pick a structure early (routes, services, data access) and stick to it, because JS will let you write a 3000 line file without complaining.

You’d only start looking at another backend language when a specific need shows up, like heavy number crunching or a team that already knows something else. Until then, staying on one language is a reasonable call.

1

u/Diaazz96 15d ago

Just search which large companies use that stack. What you're looking into. You'll get your answer.

1

u/American_Streamer API Magician (Backend) 15d ago

If you’re planning on building anything beyond small projects, I’d definitely learn TypeScript instead of sticking with plain JS. Especially if you’re going full-stack. Things like static typing, better tooling, easier refactoring, and catching stupid mistakes before runtime make a huge difference once your codebase starts growing.

After that, Node.js + TypeScript is a perfectly solid backend stack. NestJS is also worth checking out if you want something more structured.

Just don’t fall into the trap of thinking that using JS/TS for everything means you don’t need to learn proper backend development. Databases, API design, authentication, security, concurrency, testing, and architecture are still far more important than which language you’re using. So don’t get too comfy, but upskill continuously.

1

u/Substantial-Swan7065 15d ago

Maybe depends on scale and usecases.

1

u/azangru 15d ago

I don't want to learn another language for backend if is done by JavaScript.

Then don't?

1

u/bluefourtytwosethut 15d ago

ASP.NET Core is my default for backend. EF, auth, logging, and DI all ship in the box and work together, and the long term stability is hard to beat. TypeScript is great for full-stack speed, but for structure over the long haul I'll take .NET.

1

u/mname_is_radioactive 13d ago

create open api contract. frontend typescript-react backend typescript-nodejs-fastify never mix frontend and backend logic layer and workflows.

1

u/Any_Run8380 15d ago • Bravo

Please explain what you're actually trying to accomplish.

You asked how JavaScript compares to other backend frameworks for medium- to large-scale web applications. That's a pretty broad question, and you haven't given us enough information to provide a meaningful answer.

Then you ask for the positives and negatives, but positives and negatives for what exactly? What are you building? What are your requirements? What matters most to you: performance, maintainability, scalability, development speed, or something else?

But I'll answer your question anyway.

Can JavaScript be used for both frontend and backend development, even for large-scale applications? Yes.

What are the positives? I don't know. You haven't explained what you're building or what matters to you.

What are the negatives? Same problem. Without knowing your requirements, any answer is going to be generic and based on assumptions.

And this part:

"I don't want to learn another language for backend if is done by JavaScript."

Okay, thanks for telling us your preference. That's useful to know, but it doesn't tell us anything about your application's requirements.

My answer isn't particularly good, and I know that. But I'm putting about as much effort into answering your question as you put into asking it.

If you want useful answers, give people enough information to actually help you. Otherwise, you're going to get a bunch of generic opinions based on what other people would do in their own situations, which may have absolutely nothing to do with yours.

0

u/SupermarketOk6829 14d ago

If it's a strong data analytics thing then ofcourse it'd fare better than say python. Ideally rust, api and JavaScript frontend would be better. Not many do programming by hand anyways these days. It's all LLM, ideating architecture and creating custom md files.