5 ms·
From the article: "In fact, for many modern PHP applications the notion of the LAMP stack seems limiting. Fortunately, PHP developers on Heroku can fearlessly t
by mantrax5 12y ago
From the article: "In fact, for many modern PHP applications the notion of the LAMP stack seems limiting. Fortunately, PHP developers on Heroku can fearlessly take advantage of just about any technology they can imagine."
I'd argue that for many modern PHP applications it's PHP that's limiting. Modern PHP libraries and best practices are mindlessly copied from Java cargo-cult-style, without any of the benefits of Java, and without any understanding why Java does things in a certain way.
If PHP programmers were truly "fearless" about taking advantage of just about any technology, they really wouldn't be using PHP most of the time.
I'm a (semi-former) PHP programmer. I've really squeezed everything out of this shitty little language I could before opening my eyes and seeing other solutions. I see this as my mistake. And especially now, seeing "Modern PHP" turn into "a crappy Java clone", I had the choice of using a crappy Java clone or just using actual Java. So I eventually chose the latter (plus others, Erlang, C++, now Rust etc.).
PHP's only remaining benefit is the cheap shared hosts. It's a huge benefit for most sites, but that's it. The language itself is crap. So is everything around it.
- icehawk219 12y ago"I've really squeezed everything out of this shitty little language" Whenever PHP is mentioned people always jump to talking about the limits of the language and I'm curious what those limits were? I've worked on big and small code bases, large scale and small, and everything in between and haven't hit anything I'd call a "limit of the language" that we didn't just go right past without missing a beat. I do agree there are much better options out there now but based on a very different criteria which is why I'm doing what I can to learn many of them and move on from PHP.
- opendais 12y agoTbh, the only true limits I see in PHP are performance related. [e.g. I can write in Golang something that outperforms straight PHP+Accelerator or HHVM by a mile] That and it was really designed as a fire-and-forget language so longer running processes have issues.
- mantrax5 12y agoThe reasons I can list are thousands. But to understand them it's really a matter of mindset. I can talk about long-running processes, threads, weak references, actor systems and so on, but most PHP developers would just phase out completely if I do this without sufficient background. At most they'll say something like "shared nothing!", like a tick, almost. Because to PHP developers absolutely any problem fits into "state in MySQL and logic in PHP". Even with Memcache, or now with NoSQL stores like Redis, the mindset remains the same, just the API is different. Someone once said "You can't connect the dots looking forward you can only connect them looking backwards." To realize why PHP is shitty, you have to first get familiar with the larger landscape. Because if you don't, you'll believe every problem is fit for the golden hammer of MySQL+PHP until the end of your days, even if there are vastly superior solutions out there.
- bowlofpetunias 12y agoSo, you're talking about design choices for which PHP (amongst many other languages) is the wrong tool, and your complaint is that... PHP is the wrong tool. Therefor, PHP is shitty. Yes, I'm not surprised people phase out when you start talking.
- mantrax5 12y agoYou see, turns out the design choices for which PHP is the wrong tool start to very seriously overlap the design choices that are best for most projects written in PHP these days. But you can only know this if you are even aware of these design choices, and their benefits. PHP's architecture isn't the best paradigm for web development & "web scale" despite years of brainwashing in the PHP community. It's not the best by far. So we have countless PHP apps shoved into the PHP paradigm for no better reason except that this is what PHP offers. I've seen this happen a few times before with various technologies and I recognize the signs. Despite PHP supporters talk about PHP's bright future, the fact it's seriously starting to resemble a bad Java clone is only further moving us to the point people will start abandoning PHP in droves. An example from the recent past which PHP devs might be familiar with is Flash. Flash's future was extremely bright mere year before it imploded very suddenly and "unexpectedly" to the uninitiated. The signs were there for years prior to that.
- camus2 12y agoI wouldnt consider Java crap first.Java is rigid,yes,but there is a reason why people can code these huge Java libraries. Because it's very structured.Now yes ,PHP is a flawed language.And in the age of the cloud where devs control their entire stack,there should be little reason to use PHP. Except PHP is good at webpages,blogs,ecommerce and is mainly use with well known CMS that are not going to vanish overnight. And frankly,when i see projects like Doctrine or Symonfy,which are bloated yes,yet powerfull, i'm amazed by what devs write in this language.
- mantrax5 12y agoI didn't call Java crap. I edited the post to make this more clear.
- Terr_ 12y agoWhile I agree that the "truly fearless" would just use Java, PHP has been significantly enriched by adopting some of the structure/idioms from Java. (Partly the adoption of any structure, Java or not.)
- bowlofpetunias 12y agoWhy the fuck does any post on PHP bring out the programming language hipsters who's semi-intellectual critiques actually have as much depth as the average "OMG, Nickelback sux!" comment on Reddit? With this as the level of discourse in our industry, PHP or any other language is definitely not the problem...
- deleted 12y ago[deleted]