5 ms·
"There is nothing more exciting than modifying a file, hitting Refresh on your browser and seeing the result right away" I think this feature is definitely use
by asifjamil 15y ago
"There is nothing more exciting than modifying a file, hitting Refresh on your browser and seeing the result right away"
I think this feature is definitely useful, but you can virtually do the same thing in other languages with templating engines.
- tvon 15y agoWith additional setup, yes, but PHP has a fast development cycle out-of-the-box which I think is significant.
- mseebach 15y agoThis mind-bendingly important. In 1999, you could download one single installer on Windows, run it and with literally no further configuration you'd be writing PHP on an Apache/MySQL stack. No other environment even came close at the time and for a long time following.
- j_col 15y agoThis is still the main reason why I use PHP: the development cycle is just so fast, and if you are experienced enough to write good code without anyone holding your hand, you can do great work in PHP in a much shorter period of time when compared to most other platforms (at least the ones I've tried). When people criticise the PHP language I think they really miss the point: it is the PHP platform that is really powerful because of: 1. The shared nothing architecture (it really helps you scale). 2. The rapid development cycle. 3. The portability (Apache, IIS, nginx, persistent in-memory interpreters via PHP-FPM...). 4. The huge amount of native C extensions providing amazing functionality. Sure the language has warts, but who cares when the platform is this powerful?
- ericd 15y agoYep. And compared to Rails, something like mod_php is just so much faster and less resource hungry, it hurts. I use both regularly in production, and scaling the PHP side is almost trivial compared to the rails side.
- boyter 15y agoSorry to nitpick but that isn't scaling. Unless I can add double the number of machines and double or almost double the capability, and keep doing so to thousands of machine your application doesn't scale. In the case of web applications all tend to scale equally well as you can just add another web server. Its the database that causes the scale issues.
- ericd 15y agoScaling vertically is still a valid strategy, and is scaling. Not every company needs to be able to scale to the moon, and if they don't, it's a poor use of time to focus too much on architecting for scalability. With a lightweight PHP framework and a sensibly written app, you can stick to one machine for much longer than you can with Rails, and after that, it will require a fraction of the number of app servers. Beyond that, app processing time is generally much lower without all of that cruft, so you don't need to do as much caching, etc. to get a snappy webpage.
- boyter 15y agoMaybe its just me but I don't consider "scaling up" as scaling. In my mind scaling means running on more then one machine. Don't get me wrong though, throwing a bigger hardware box at a problem is a totally viable solution to most problems, up-to a point.
- 18pfsmt 15y agoAs someone learning, I figured out pretty quickly from many forum threads about this topic, that I was simply too ignorant to be confident in writing solid PHP. I am in no rush to do anything useful (just having fun), and I'm trying to concurrently learn Vim and Git. so I chose Python. I might try PHP, if I ever feel I have learned to write OO code competently. tl;dr: Too many gotchyas for a beginner. I need discipline imposed on me when I'm learning, ymmv.
- ch0wn 15y agoExactly. This is not a feature of PHP, but simply CGI.
- wccrawford 15y agoIt's a feature of PHP because PHP isn't a compiled language. C, Java, anything .NET... They all require an added step in the middle.
- thorwawy99 15y agoin .net you can run your site off source files, and the server will compile as needed
- iaskwhy 15y agoIt's slower, right? I remember some years ago it would take like 5 seconds on this kind of big web app to show me the newer version of the file I just changed.
- j_col 15y agoIn production, or just your dev environment?
- evilduck 15y agoYou technically can compile ASP pages on the fly in production but it's bad practice, just like making changes directly to production is bad practice. The whole blog post is pretty much a great write up of how not to manage a website.
- ericd 15y agoHe was talking about small sites, in which case a deploy script, etc. is probably more trouble than it's worth.
- 15y ago