4 ms·
PHP has a special place in the story of the web-dev. The whole "no build step" was the most underrated factor for its success, because it was such a low-skill
by gopalv 2y ago
PHP has a special place in the story of the web-dev.
The whole "no build step" was the most underrated factor for its success, because it was such a low-skill tool to pick up.
The tightness of that edit-test-move loop was why I used it, even if the "edit" included "sftp it to a vhost".
That bit is what made it successful & I can't think of anything I've used in the last decade which felt as easy as PHP for that particular style of self-taught programmer.
- supernes 2y agoHot Module Replacement and Live Reload in Node-based web dev servers bring some of that magic feeling back, although you will quickly need to learn about module resolution and other intricacies.
- cabirum 2y agoIt's only easy to start up to hello world kind of projects. To build anything useful you quickly discover that it's hard to build from source (both the lang and extensions), some parts unmaintained for years. There are many counterintuitive idiosyncrasies you must deal with to be productive. The ecosystem suffers from the overuse of indirection and reflection. Php only looks easy, but the rabbits hole goes deeper than most other langs.
- gog 2y agoHow would you describe something useful? Can you give examples of counterintuitive idiosyncrasies you must deal with to be productive?
- deergomoo 2y agoWhy on earth would you need to build PHP or its extensions from source to build a useful web project?
- pjerem 2y ago> It's only easy to start up to hello world kind of projects. Sure but the important part here is it’s also easy to deploy to the internet for free or a few bucks. All you said is right but still, I don’t think there is anything comparable nowadays and if I had to explain to my son how to create a basic non static website without using proprietary PaaS, I’d have a hard time (without PHP). Was it the best option when you were a company building a product ? idk but at least it was a viable option. Was it the best option for any kiddo wanting to learn creating things on the internet ? Totally and we never got anything better for this since PHP.
- pjerem 2y agoI didn’t touch PHP for a long time but it have a nice place in my heart especially for the reasons you gave. I have a hard time with people joking about PHP because while it wasn’t perfect back in the day, it’s probably the culminating point of the non elitist computing. PHP was accessible to anyone who had the basics of creating an HTML website (which was a skill any random person could acquire in a day or two). Also, the people making those jokes are most of the time working on projects with micro services and SPAs everywhere for a boring business app with CRUD and forms. Which I find pretty ironic since a single PHP monolith solved this exact use case 20 years ago.
- kaba0 2y agoAlso, it had dirt-cheap hosting, as a single process could host multiple sites (though it did come with some security implications). Nowadays we tend to bring up a whole virtual OS. An interesting direction in this area might be GraalOS, which might allow running multiple applications in a single OS process, doing the necessary isolation itself. (Not affiliated)
- yashg 2y agoBack in the day when VS Code didn't exist and even sftp was rare and the world ran on port 21 classic FTP, we had code editors with built in FTP like PHPEdit, we would literally hit Ctrl+S and save and upload the file on production in one stroke. Refresh the page in browser on the live site and there it is. Those were the insane days before terms like agile and CI/CD were even invented.
- throwaway11460 2y agoScrum is older than Linux.
- progx 2y agoYes insane and after upload "bang error", sh...t, fast fix the error and upload it quick again, befor anybody register the error :D :D
- aaviator42 2y agoCtrl-Z, Ctrl-Z, Ctrl-Z, Ctrl-S!
- aaviator42 2y agoI still do this! Often still over FTP, sometimes over folder mounted over SSH.
- kijin 2y agoI'm taking the "no build step" thing to the extreme in one of my projects. PHP has libraries for compiling SCSS and minifying JS, and filemtime() is very fast. So if you wire them together in just the right way, you can edit any script or stylesheet under the project hierarchy and have them compiled, minified, and bundled together on the fly. Cache the bundle until you edit one of them files again, and automatically bust the cache once you do. No need to build anything whatsoever, both on the frontend and on the backend. It's like REPL over HTTP.
- todotask 2y ago> PHP has libraries for compiling SCSS and minifying JS, and filemtime() is very fast If you do compiling and minifying, that's a build step.
- wildrhythms 2y agoThe usage of the term 'step' here is in the pre-deployment development process sense. I think what this person is doing is converting SCSS to CSS on request, at runtime.
- todotask 2y agoRegardless of which steo, compilation process is typically done as part of a build step, where the SCSS files are transformed into the final CSS that will be served as a bundle to the end users' application. Web browsers can't understand SCSS natively. To be truly extreme (performance), devs should consider tree-shaking unused CSS and JavaScript. This may require using Vite (Rolldown is in the works/Rollup) if there are no other options or it makes no sense to serve bloated resources. That's the reason, I chose Astro as I care about users, not prioritse the developers' minimalistic workflows. I prefer Tailwind because it allows me to avoid duplicating classes (mine and vendors), which is an advantage over other approaches. I did dogfooding in Go development.
- kijin 2y agoEvery human-readable programming language must be compiled into some sort of bytecode (opcode in PHP) and/or machine language in order to work. The question is whether a human ever needs to be aware of that step. In PHP, you generally don't. In the aforementioned setup, you don't need to be aware of SCSS compilation and minification, either. Not even if you use devtools, because the map file will point to the correct line in the original source.
- Morelesshell 2y agoThis also lead to shitty tool integration. While it was always easy to debug java based apps and the debug support is great (remote connection, drop frames, all types of breakpoints etc.) people struggled with this in php. I showed a professional a few years back how to debug with php, after 2 weeks he stoped using it...
- M95D 2y agoI liked the documentation. The old documentation, in a .chm file.