7 ms·
> for all other languages i know of, there is quite a process to get started It's funny that you included javascript in the list when you can literally just ty
by Kwantuum 7y ago
> for all other languages i know of, there is quite a process to get started
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.
- travbrack 7y agoOr push three buttons from any webpage in Chrome and get a js console
- nkozyra 7y ago> 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. 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
- bpfrh 7y agoIs he? Somebody built a photo editing app in JS which runs locally in your browser. https://www.photopea.com/ https://www.photopea.com/
- nkozyra 7y agoJust because it can be done doesn't mean it's the ideal way to do it or to learn.
- bpfrh 7y agoThis was about your post saying you can't do anything with only JS and me disagreeing, not on how sensible language X or methode X is for anything. Nobody would write a php app without js today and you can use js server side with nodejs, same as php and php fpm.
- nkozyra 7y ago> your post saying you can't do anything with only JS I ... didn't say that?
- bpfrh 7y agoI meant your comment: >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.
- nkozyra 7y agoThat's not a fair translation of what I said at all.
- epse 7y agoOf course, such things are perfectly possible and for an image editor I'd consider in-browser js superior to anything but native apps. 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
- bpfrh 7y agoOr I just use node on the server side and write the server part also in js? 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.
- stef25 7y agoThat script tag alone isn't going to do much without a backend. 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.
- Kwantuum 7y ago> That script tag alone isn't going to do much without a backend. 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.
- la_fayette 7y agoOk. The focus of my argument was only on server-side development as php was the language of comparison... however as you mentioned javascript is easy to get started as well and more or less the only option for front end dev anyway (as typescript, coffeescript, etc are transpiled to js and webassembly has no direct dom access)...