6 ms·
Yessss! Except I get heartburn when I eat PHP :) Maybe I can port the 100 LOC to JS and try a node version! Code flavor aside, your logic is right on point: for
by bikamonki 12y ago
Yessss! Except I get heartburn when I eat PHP :) Maybe I can port the 100 LOC to JS and try a node version! Code flavor aside, your logic is right on point: for 99,99% sites out there* a CMS like WP is like using an 18-wheeler to go do grocery! Why did that happen? My only explanation is that The Home Depot is behind this whole DYI website non-sense...
* Yeah, I made that stat up.
- josephernest 12y agoYes exactly :) I was fed up about using an 18-wheeler for each small project-website I had to set up ;) If you like stats in the same fashion as yours: http://www.thisisvoid.org/article/04 http://www.thisisvoid.org/article/04 ;)
- bikamonki 12y agoMy solution is called Statico: a json file with all the site content and front-end magic to display it. A locally run software allows me to edit the pages, upload images to S3 and update the json file. The additional advantage in my opinion: no server. All hosted on S3 :)
- dheera 12y agoAs much as I too hate PHP is as a programming language, I'd say it's fine for this though, where it's being used effectively as a more powerful version of server-side includes. Python/Ruby/Java/node are all awesome to develop on at first (and have excellent development servers) but all PITAs to production-deploy thanks to poor documentation/tutorials, lack of any kind of project cooperation from the major production HTTP servers, and lack of shared hosting services that have built infrastructure to support these. PHP is easy to production deploy. Drop .php files into /var/www/html. This is unfortunately what keeps PHP going, because newbies like the simplicity of deployment.
- blumkvist 12y agoYou can deploy node on IIS.
- falcolas 12y agoTo be fair, if you're using a web server other than Apache, PHP involves an equal amount of pain.
- dheera 12y agoSure, but newbies don't care about "web servers other than Apache". They will just use Apache, or whatever can deliver instant gratification. And non-newbies, in general, don't use PHP to start new projects. Part of my point is that I think if we, the development community, want to popularize frameworks with better engineering design, e.g. RoR, Python+Django/Flask, and so on, we'll need to think more carefully about what the newbie experience is like. Because newbies look for instant gratification with something (anything!) and then build up and out from whatever that something is. If the easiest door to open is PHP, they'll keep building with PHP for years. Unfortunately, the easiest door to open is still PHP by a longshot.
- vdaniuk 12y agoAs someone who helps people to learn programming, I'd like to challenge your statement that PHP "is an easiest door to open.. by a long shot". The reality is that the easiest way for a beginner to do a finished product is a make as static HTML webpage with Javascript fetching dynamic data from a remote datastore/website. The cognitive load of request-response model from the client side view is much smaller than from a server side and you actually write your first code in any browser console.
- falcolas 12y agoThe problem with making things simple for newbies is the knock on effect of making it hard for non-newbies to do non-newbie things. Sure, we can then work around the allowances we make for newbies, but complexity is the bane of reliable software.
- vdaniuk 12y ago>Python/Ruby/Java/node ... all PITAs to production-deploy thanks to poor documentation/tutorials I don't get it. I am not a professional programmer or devops and I was able to deploy multiple servers for ruby(rails on webrick, puma and unicorn) and node apps without any significant problems. Over time, I used do/linode prebuilt images, stock ubuntu server, docker containers with and without nginx and did not spend much time or effort in any configuration. There are multiple easy "git push" heroku-like paas alternatives, docker is available on most popular iaas platforms. Can you elaborate what exactly cooperation from http servers do you need to deploy ruby/python?
- jerrac 12y agoWe're deploying several tomcat apps at work. Each of them have to have apache in front to proxy from 80/443 to 8080/8443. We tried to get jcvs(or whatever it's called) working, and it did not work. Thus, deploying java apps is a pain. Seriously, do they expect me to ask my users to add the port number to the url? We love GitLab at work as well. But a few years ago it was real pain to set up. Mainly due to having to figure out how to get the correct Ruby version installed. GitLab fixed this issue with documentation describing exactly what version to compile, and how to compile it. The fact remains, though, that I'm not using Ruby from the distro repos, and thus, if a major security issue arises, I won't get automatic updates. If it was more than one server, I'd not be happy... I once deployed a python app. Then tried to deploy it again, and could not figure out what the heck I did the first time. I still have no idea how to do so. And I never did find a decent tutorial on the subject. So, ultimately, I prefer PHP. You install mod_php, php, configure your vhost, and drop your files in the correct directory. Done. As for how experienced I am, I run 50+ vmware vm's, most of which run different applications than the others. Thus, I've had to deploy many different applications over the years. PHP apps are always the easiest.
- vdaniuk 12y agoOkay, I don't know much about Java, its vast and sparsely connected ecosystem scares me and I am not going that way yet. But how "install mod_php, php, configure your vhost, and drop your files in the correct directory" is easier than "sudo apt-get install node, drop files in the correct directory, run node app.js"? Your example requires two distinct entities written in different languages using differerent config formats: apache server and php code to run. Node requires node runtime that doesn't have to be configured and a node app. Also if you are not ok with configuring apache to forward ports, why ios it ok to configure your vhosts? PHP apps may be the easiest but deploying single server php apps it is insignificantly easier than deploying single server javascript apps.
- jekrb 12y agohttp.createServer(... Easier than /var/www/, in my opinion.
- deleted 12y ago[deleted]
- lmz 12y agoEasier as a developer perhaps. Does that not require init scripts to keep it running if the server is restarted? (I'm not sure how the typical node package is configured).
- dheera 12y agoYes, also, this requires being able to, having access to, and having money for a virtual machine. Most newbies start with free or nearly-free shared hosting services. I like that Google App Engine can run Flask, for example, while abstracting away all production logic; we need more things like that.
- lmz 12y agocPanel claims to have support for RoR. Who knows, they might support node too one day. Won't hold my breath waiting, though.