JavaScript is a highly productive for Web Applications, although I also heavily use other alternatives for several reasons, But regardless, that is why it is my candidate for the best programming language especially working with the Web and Web applications in general. Anything beyond that is either niches or outside general purpose web. JavaScript can do:<p>- advance web applications (electron, NodeJS)<p>- ETL on the go (i.e. fetch, JSON, DOM, SVG)<p>- data visualization (i.e. d3, three.js, etc.)<p>- dependency management (i.e. NPM, CDN, ESM like in Deno)<p>- learning resources in general (extremely abundant and comprehensive on various sources)<p>It is hard not to learn JavaScript, it is almost everywhere. Also having to learn the 2nd or the 3rd programming language should also fill-in those gaps, even those huge gaps.
I've been doing web development since the browser wars and Perl scripts sitting in a cgi-bin directory. The HTTP verbs haven't changed much in 20+ years. XHR (XML HTTP Request, aka async JS, aka AJAX) has been around for almost that long.<p>Ultimately it doesn't matter what internet commenters think, the best language is always going to be the one you are most comfortable and productive using. PHP, Python, Ruby, Elixir, .NET/C#, Java, Perl, JavaScript, etc. - all of them can accomplish the task of a running web application. I would lean towards an ecosystem that has lots of libraries to pick from and good documentation.
I'm very happy using Perl with web frameworks like Mojolicious, and database ORMs like DBIx::Class.<p>You can get a working prototype up quickly, and recent versions of Perl along with OO libraries like Moo/Moose allow you to quickly create well-written code.<p>There's also a lot of mature testing libraries.
It depends on a lot of factors. Building a highly concurrent application such as chat? You may find node or elixir to be good fits. Building a reports service with lots of data crunching? Maybe checkout Python for it’s data libraries like Pandas / numpy. The choice of language stems from the domain you’re solving and what your team knows. Finding a happy middle ground is best, but sometimes you need to prefer either what the team already knows for the sake of time to market and other times you need to prioritize the problem space if the team’s knowledge has a limitation that will prevent it from being a maintainable solution.
In a vacuum inside a perfect sphere, the answer is always Lisp.<p>In the real world, Elixir. On the frontend, the choice is just one, making it the worst and the best.
Typescript. It's most utilizing the cutting edge web tech (Deno, Next, Serverless), succeeding in how best to deliver bytes between front-end and back-end (SSR, SSG, CSR, Edge, etc.), along with the biggest 3p ecosystem of packages/libraries you could find for almost all web and scripting tasks. You'll find no better integration with the front-end stacks rightfully used by almost all significant tech co's: React, Vue, Svelte.<p>There's a reason it's the biggest upward-trending lang:<p><a href="https://insights.stackoverflow.com/trends?tags=typescript%2Cpython%2Crust%2Cgo%2Cruby%2Cphp%2Cjava%2Ckotlin%2Celixir%2Cc%23" rel="nofollow">https://insights.stackoverflow.com/trends?tags=typescript%2C...</a>
Depends on what you mean by "best". If you mean best as in quick to launch, performant, and easy to maintain, then I'd say PHP because it was built specifically for web development.<p>The problem with PHP is that it's too easy to use and apps built with it have low maintenance costs. Which means that your ownership over a code base can easily be transferred to someone else.<p>If you want the best tech stack that will prevent you from killing the job, then I'd say Typescript or Java based API and a front-end framework like React. The more complex the code, the harder it will be to replace you and your team.
The language doesn't matter, what does is your ability to deliver on user and business needs with the resources you have access to.<p>Often times that's more about a framework than a language, or about the level of abstraction you want to deal with on the backend, or how you intend to scale, and what sort of shop you're at and what kind of devs you have. More often than not, unless you're a greenfield project or a startup, some or all of those decisions have already been made.<p>Compare two different approaches...<p>One, a traditional LEMP stack with server side interactivity and rendering. You define every layer of the stack, managing everything from the database to the CDN yourself. You deliver HTML to browsers with a sprinkling of Javascript for pagination or whatever.<p>Two, a Jamstack running on something like Next and hosted on Vercel, using some sort of headless CMS maintained by another vendor.<p>(You can substitut LEMP with any similar stack, or Next with any other Jamstack framework in any language).<p>But the levels of abstraction there are very different, as are your dev and infrastructure costs, as is the user and developer experience. And ecosystem support, everything from third-party packages to Stack answers. Everything gets compiled down to shades of HTML and Javascript anyway, it doesn't really matter what you start out with. The stack and its ecosystem will have way more impact on your final experience.<p>Most web apps are light on fancy algorithms and heavy on presentation. You're usually building documents more than apps. The tradeoffs you encounter are often between interactivity and infrastructure. Whatever stack you choose that lets you focus on that, without sacrificing business needs, is a good choice.
Depends, if you are trying to spin fast something working with simple business logic, you need a megalit like django, RoR or spring. If you are aiming for something with various microservices, go is the prefered solution nowadays.
Python, with Django, and Django Rest Framework. Steep initial learning curve, but its integration of many features (including auto DB migrations), great docs, and long-term track record.
Pharo + Seaside. For an introduction, see <a href="https://books.pharo.org/tinyblog-tutorial/" rel="nofollow">https://books.pharo.org/tinyblog-tutorial/</a>
As other posters say: there is no best language for web applications. However, some languages have richer options for web programming - libraries and frameworks. Popularity also makes it's easier to find answers and tutorials. Other things to consider: ease of deployment, performance.<p>It's fine to use a programming language not normally known for web programming. Just remember if web-related libraries and documentation doesn't exist, you will need to write them yourself.
The best? The language you(and your team) know. If you understood most languages then I'd say Haskell or Rust depending on the exact requirements.
PHP is a great option to start with, but after a few years of working with the PHP, I'm slowly switching to a JS stack: NodeJS, NestJS, TypeScript, GraphQL.
It gives me much more fun than coding in a php, even with organized framework like Symfony.
In my experience, backends are dictated by the business logic, but I use Node when I can. I just move so much faster handling data naturally as JSON or using shared libraries for the frontend and backend objects.
F#, I can target backend and frontend, using battle tested libraries.
Static typing that gets out of my way and has very good domain modeling capabilities.
Good enough tooling.<p>Scala as a close second!