Let's be fair: you're going to be very limited in terms of the type of web site you can make with this approach compared with a PHP app via web server
Somebody built a photo editing app in JS which runs locally in your browser.
However, consider this, you want an app that has to use a database, you can't store everything on the client or use things like Dropbox integration. Plenty of situations where you want that, but that just can't be done with clientside js without also making your database acces keys and encryption keys available to all. So all in all, it depends on what sort of app you want to build or form your course around
This was not about building anything sensible, but just to counter the point that js allows you less than php.
I think today the only big language with is a pain to setup is perl, java and sometimes python, the rest is just a matter of ecosystem, needs and personal taste.
Nobody would write a php app without js today and you can use js server side with nodejs, same as php and php fpm.
I ... didn't say that?
>Let's be fair: you're going to be very limited in terms of the type of web site you can make with this approach compared with a PHP app via web server
Which translates to me that you have the impression that JS is limited in usage, which it simply isn't.
Things like webrtc and other node, changed the way JS can be used and for the things it can be used.
JS frameworks (angular etc) have substantial learning curves for noobs and the language itself has at least as much WTF as php does. Then there's Typescript, Node, ...
Python & Flask are amazing but if you're taking your first steps at programming they do need a bit of effort to get up & running. What caused friction for me when I started out with Python was:
* V2 or V3, why, what ...
* pip / pipenv / virtualenv
* circular dependencies
You can start out with PHP using something like XAMPP + CodeIgniter MVC + PhpMyAdmin + FTP. Most people starting from zero should be able to build & deploy a todo list app in 1-2 days using this "stack". It's all old & outdated but as an introduction it works great.
When you're starting out, you're not going to do much in the first place
> the language itself has at least as much WTF as php does
Oh absolutely! My argument was mostly that for getting started, JS has actually less setup than PHP, not that it's a better language, or that it's a better learning language (although I happen to also believe both of those things but for different reasons, mostly because of the easily available REPL and debugger available in browsers, whereas debugging PHP is much more involved)
> Most people starting from zero should be able to build & deploy a todo list app in 1-2 days
and you can make a (local) todo list app in JS in the same amount of time without installing anything (because let's be real, setting up a database and web server, even bundled solutions like XAMPP can be a real challenge when you're starting out if anything at all goes sideways), and you can deploy it for free by just uploading the files to github from your browser. And if you feel that doing this without a framework is too hard there's a slew of tutorials to do it with jQuery (in the old and outdated category) or React/Vue (which don't have the added typescript complexity of Angular)
I am not saying that PHP isn't great to start with, but I feel like more and more JS can really compete in that space, and has some key advantages for further progression.
It's funny that you included javascript in the list when you can literally just type javascript code in an html <script> tag and open it in the browser that comes with your OS.
You quip at flask for requiring "command line experience" then talk about PHP's built-in web server that's also a command line tool.
And let's be realistic, if you're using php without a package manager, you're either no doing anything serious or you're reinventing the wheel, and you will need to get comfortable with the command-line sooner or later anyway.
I will say that PHP is probably the the most frictionless server-side web-development language to get started with, but it's not by a huge margin.
And considering that in web-dev you're gonna need to learn javascript anyway, I'd probably consider it to be the best introductory language.