72 points · by SmeelBe · 13y ago · 78 comments
Secondly, PHP devs and sites are used to very affordable hosting options, and GAE is horribly overpriced for the computing power you get.
Thirdly, Google doesn't really seem to care about customers of their AppEngine platform. App Engine Java routinely routes clients to new VMs that are not finished starting up, giving clients 5-15 sec delays on page loads. Google's response to this was to give a lecture at I/O 2013 on how to hard code configurations into your java code [1]. Basically, if you thought Heroku did a poor job of load balancing, Google App Engine takes the cake for terrible load balancing.
I really don't know who Google is trying to target with GAE - they seem to be trying to cater to bloggers, small startups, and enterprise all at once. This pretty much just gives everyone the worst of all worlds with bloggers getting a system that is very complex, small startups getting excessive costs as soon as any processing is involved, and enterprise getting a system that will likely fall out from under them in 5-10 years time.
[1] https://groups.google.com/forum/?hl=en&fromgroups#!topic...
I find a lot of folks aren't aware of https://developers.google.com/cloud-sql/
I'm not sure what you mean by the key-value datastore. Do you mean memcache, or do you mean the HR datastore?
PHP is not "most popular computing language on the planet", it's the most popular web coding language; C is the most popular "computing" language, whatever that means.
And in linked article they make it seem that PhoneGap apps are more native than they are, "built-in PhoneGap integration so developers can publish native app packages to the various app stores".
Not factually wrong, but not very clear truth either.
It's also not true. "Infinite are the arguments of sages," I hear, or something to that effect, but the distinguishing mark of expertise is not being able to offer an unqualified endorsement of any position.
The element of your comment that I find most concerning is that, after five years of using a programming language, I feel that you should be aware of its major flaws. Probably the minor flaws too. You should be aware of how it differs from other equivalent tools. And, if you don't know that, then the content of your post should not be "PHP is good," but "Why is PHP considered to be bad?"
Put that's not the point. It's not about bashing PHP for the sake of it. A large number of software projects is behind schedule and over budget. Why? Because developing software is hard and humans are bad at estimating effort.
Now why should we make the situation even worse by using tools that are not as good as possible while we are completely aware of the flaws (and good things) in our current tools?
Pointing out PHP's flaws over and over again while seeing that its usage does not drop tells us something - there seems to be no (obvious) better alternative. »PHP sucks!« is crying for help. Someone please build an obviously better alternative. Ideally as compatible as possible to make porting from PHP not practically infeasible.
What matters is that PHP has got big things right. Deployment is trivial. One process per request happens to mitigate leaks and (over)shared state. Failures affect one client at most, and scalability bottleneck is pushed down to the database.
The above has much less to do with PHP and more to do with the lack of experience of the developers, I would say..
"Tools as good as possible" is an extremely subjective thing, and there is no magical tool or framework that works perfectly in all hands.
Developers should choose the tools that are best suited to the job at hand, and "best suited" doesn't just mean the functionality and features, it also encompasses developer proficiency.
They're going hard on App Engine, and I'll take that as a win even for python-heads like me.
That's a little too far-fetched for me. GAE isn't in the same category as end-user services like Reader or any of the other apps they've dropped.
I don't expect them to run it forever, but I trust them enough to believe that if they ever decide to pull the plug, they'll give us a fair bit of warning (half a decade?).
They're not stupid, and they're not suicidal.
Just one additional advantage of using this approach is that I can use text files for testing and the program logic doesn't know the difference.
That's how I got rid of the lock in issue.
I think that the skilled members of any community or industry have a duty to stand against technology that is inherently broken. This is quite distant from being "childish". In fact, it's a sign of maturity when one can unemotionally analyze a given tool and deem it to be of an insufficient quality for practical use.
And the "typical reaction" is absolutely nothing like you suggest. Time and time again I see well-reasoned, objective analysis which clearly points out the numerous negative facts about PHP. The problem does not lie with those who express these facts, but rather with those who, for whatever reason, cannot or will not accept them.
Agreed. It's possible to make good, elegant and fast PHP code. Unfortunately, most of it is not. I would never advise anyone to start a new project with it mostly because of its many design flaws. Also, the App Engine environment negates PHP's biggest advantage: ubiquity. You just cannot deploy a PHP App Engine application on most PHP hosting providers unless you deny your app the App Engine runtime environment.
edit: burn, karma, burn.
My theory is that people ranting about PHP are mainly in three categories - the first being developers who have never used PHP. The second are people who used PHP back in 1998 and haven't never really checked out any any modern PHP frameworks. The rest are developers who inherit a horrible codebase written in PHP. So they're gripes are a combination of their own horribly-written codebase they're stuck maintaining along with PHP-specific complaints.
PHP definitely has its quirks but there is interesting work happening with the language and many frameworks. I do quite a bit of PHP coding at the moment but previously in my career I've been full time Java developer, C# developer and even now I write quite a lot of Objective C. I have hated things about every one of those platforms. Every one of them offers the opportunity to write horrible code. I think developers tend to be very judgmental and opinionated anyway, but PHP gets too much flak. If you're not using it then who cares, why should it bother you what other people are doing?
Python?
[UPDATE] According to Wikipedia (judge for yourself), Larry Page is quoted as saying:
"BackRub is written in Java and Python and runs
on several Sun Ultras and Intel Pentiums running Linux."
, back in 1996 whilst he was still at Stanford (Backrub being the original project name).There are some nice ideas in there, though. I dislike PHP-the-language as much as the next guy but sometimes you just need a three page website that you can hand off to a junior developer or web designer. If there is a language that does this, without being PHP, that would be awesome, but I don't think there is so I completely understand why somebody would just write three .php files rather than... install ruby, passenger, configure nginx, some supervisor script, etc. etc.
I think that Google Apps for Business + GAE services complement PHP nicely--now you can use that shell scripting core to tie together your data with some powerful APIs and basically have no operational worries. We'll see what they do with it. Maybe the next Facebook will start out as a three page website on AppEngine.
The insane part of PHP is the actual language. It's an overgrown template language. Half the functions are based on C, half the functions are based on Perl. There's no regularity or consistency.
Recently, a third half of it was based on Java. :-)
The benefit there is understanding. With PHP, knowing the C functions mean I understand how the PHP function works. The same with obj-c, I can drop down into C and work there. And the change in syntax, the way things works, helps me understand what is going on. Again, knowing C, I can do things in obj-c without needing to learn the obj-c part.
Maybe I'm one of the few, but context matters more than consistency. Maybe that's why I like vim.
However, a lot of modern PHP frameworks(Doctrine, Symfony2) are quite nice to work with.
PHP: a fractal of bad design [1] lists many - really many - broken things for which at least I am unable to see how the behavior could not cause headaches let alone contribute to the success of PHP. Go ahead and read it - it is long but entertaining.
[1] http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...
It doesn't matter if we're talking about PHP or JavaScript, or a web framework like Ruby on Rails, or various NoSQL databases, or even certain operating systems.
Even if people have used such technologies with some degree of success in the past, and even if they may still be using them today, it's important for us to move past them, as a community and as an industry.
Making their flaws widely known is a very good step toward moving to better technologies. So I encourage people to be vocal about their bad experiences, or about the flaws they see in technology. It's an important part of advancement.
I've been writing PHP for 12 years... I've learned that its got flaws... Just like anything else... I've gotten over it... Why? Because I actually enjoy writing PHP. And nothing you or anybody else can say will change that, so just get over it. Use what's best for you, not what is the new hip thing to use.
I don't mean major, fully-fledged app stuff, I mean simple CMSes, on-page loops / conditionals, <? echo $_GET["foo"] ?>, etcetera.
I'm no hardcore uber-coder, but I know enough to know there are languages I prefer to use than PHP. Personally, I like Ruby. But for a bit of quick glue or a relatively simple bit of web coding, I simply can't figure out what you'd use instead of PHP - and I assume from the number of "PHP sucks" comments that there must be such simple options?
Serious return question - who has requirements like that? In my experience CMSes are never simple, and I can't think what kind of site has the latter requirements, but only has those requirements and won't ever need any more functionality.
Personally I'd maybe use something like Django + the Flatpages app for a "simple CMS", and a tiny wsgi app for adding simple logic to a web page. Not, to be honest, because they're a perfect fit for those particular tasks but because I'd get to use a sensible language (python) that will remain sensible for the majority of other tasks (including non-web based ones).
Anything that's either focused on content or sales and either doesn't have a programmatic backend or hands off to another site will probably fall into the "not a full-fledged webapp" category.
If I'm running an A/B test on a landing page, for example, I just need logging code and a conditional to choose what variants to display on-page.
There's a lot of conditionals based on input conditions, too - "Hello, Hacker News reader!", redirects depending on country of origin, that sort of thing.
I'll also use simple snippets of PHP or Javascript on sites that are already using Wordpress, but there you're locked into PHP from the outset, of course.
char* a = "PHP";
while (*a) putchar(*a+++7);