Google App Engine finally supports PHP
venturebeat.com
venturebeat.com
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'm not sure what you mean by the key-value datastore. Do you mean memcache, or do you mean the HR datastore?
I find a lot of folks aren't aware of https://developers.google.com/cloud-sql/
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.
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.
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?"
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.
If you feel that strongly about the problems, perhaps you should expand on them?
All languages have pitfalls and problems, and the more popular the language, the more likely that people will succumb to those problems. We get it.
From my point of view, ruby, python all the rest are inherently broken because nobody makes any damned products from them which aren't used by other programmers or sold as a service.
You don't need to be a programmer to use Wordpress, Drupal, Joomla, phpBB and the endless list of customer facing, customer usable PHP apps. You don't need to be a programmer to configure their environments and get them running. You don't need to be a programmer to extend them, you just need to find the right plugin/module to suit your needs.
I cannot think of any other web based language that even comes close in this regard. Why is that? If these languages are so good, why is no one making any software with them that ordinary people and not programmers can actually use?
Even assuming that this is true (which its not, but we'll get to that later on) How does this matter? And, particularly, how is "sold as a service" an issue?
> You don't need to be a programmer to use Wordpress, Drupal, Joomla, phpBB and the endless list of customer facing, customer usable PHP apps. ou don't need to be a programmer to configure their environments and get them running. You don't need to be a programmer to extend them, you just need to find the right plugin/module to suit your needs.
How is this different from Plone or any of the other CMS, blogging, and discussion platforms built in Python, Ruby, and other non-PHP languages, that likewise are designed to be installed and configured by non-programmers and which are extensible via plugin/module systems?
> I cannot think of any other web based language that even comes close in this regard.
What is a "web based language"? But I suspect the reason you can't think of any other language has nothing to do with what is actually true of other languages, and more about you.
> If these languages are so good, why is no one making any software with them that ordinary people and not programmers can actually use?
Software that is successfully sold as a service to ordinary people is software that ordinary people and not programmers can actually use. Otherwise, it wouldn't make any sales.
As are a lot of other things you seem unaware of built with non-PHP languages.
dageshi made some valid comments about the role PHP fills and you dismissed them and instead focused on calling him/her out for being a bad/poor programmer.
It isn't inherently broken, if it were inherently broken nobody would be using it, which is quite obviously not the case.
The language is broken. JavaScript, too. Both are used because there are no alternatives. There are obviously alternatives for PHP but these seem to fall so far behind in ease of use that they don't gain enough traction. Therefore I argue we need a new language - easy to use as PHP but without all the flaws of it.
From my point of view, ruby, python all the rest are inherently broken because nobody makes any damned products from them which aren't used by other programmers or sold as a service.
I am no web developer and my knowledge of commonly used web frameworks and who uses what is really limited but it seems reasonable to assume this statement is wrong.
I did a quick search and the first hit was Django build on top of Python used by Instagram and Pinterest. [1] There may be more PHP based apps out there because it is so easy to use but it is definitely not true that no one uses alternatives.
You don't need to be a programmer to use Wordpress, Drupal, Joomla, phpBB and the endless list of customer facing, customer usable PHP apps. You don't need to be a programmer to configure their environments and get them running. You don't need to be a programmer to extend them, you just need to find the right plugin/module to suit your needs.
When you use a product that only requires setup, configuration and throwing in some plug-ins it does not matter at all which language has been used to build that product. This statement is completely irrelevant to this discussion.
I cannot think of any other web based language that even comes close in this regard. Why is that? If these languages are so good, why is no one making any software with them that ordinary people and not programmers can actually use?
Again, my personal guess is that the ease of (ab)use of PHP outweighs - or at least seems to do so - the advantages of »better« languages.
[1] http://www.fiveq.com/blog/programming/building-django-good-c...
I am asking serious questions. If that seems condescending to you, well, I'm not going to lose sleep over it.
> You should not be trying to infer from the parent comment that dageshi is some kind of naive newby programmer who doesn't understand.
I was neither inferring nor "try to infer" that. I was questioning specific comments and pointing to specific examples of why I thought the generalizations being made were incorrect.
> dageshi made some valid comments about the role PHP fills
What were made were sweeping generalities about the superiority of PHP being evidenced by it being used in areas that Python and other languages are not, that evidenced unclear and apparently inconsistent standards as well as failure to consider Python and other non-PHP products that do, in fact, exist in the roles in which it was asserted that PHP was the only language actually being used.
> you dismissed them and instead focused on calling him/her out for being a bad/poor programmer.
Nowhere in my comment did I call anyone a bad/poor programmer. I don't mind reasonable criticism of things that I write, but I'd prefer if you didn't invent things that I never wrote and then criticize me for writing them.
Is there some field of human endeavor where you've observed this statement to always hold true?
edit: clarity
I definitely don't want to imply dynamically typed languages are of little use - I am absolutely fine with using them for quick prototyping are non-critical code.
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).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.
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.
Recently, a third half of it was based on Java. :-)
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...
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.
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.
Sorry if that's cliche, but your justification sounds more like it is rooted in your experience with badly developed programs, not so much a bad language.
I've been working with PHP for a long time. I've worked with other languages as well, but for the last 10 years career-wise PHP has been my bread and butter. And I've seen plenty of bad PHP as well, I absolutely don't deny that. As one of the most popular and most accessible languages out there, it's inevitable that lots of beginners will produce low quality code.
But I've also seen plenty of very good PHP code.
I've worked on quite a few large-scale PHP projects that were delivered on time and on budget, have maintained good performance under extremely high loads, and have had no security issues over years of time in production environments (including banking and automotive).
Want to know why? Because we wrote the applications properly, we tested them well, and we knew what we were doing.
I'm sure equivalent teams can do just as well with Java or .NET (or whatever else), but our stack expertise is with PHP, so that's what we choose because that's what we are best with.
Any tool in the hands of a bad craftsman will produce shoddy results. And as I said before, PHP's popularity is certainly a dual-edged sword, but I believe the good outweighs the bad...
So unless you can name some magical framework or language that can prevent mediocre or inexperienced developers from making mistakes or producing bad code, I think you're being narrow-minded and unfair in your criticisms..
Hating the players seems like a reasonable reason to avoid the game.
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 realize it's annoying for you, someone who enjoys writing PHP, to keep hearing people complain about PHP, but it's always going to happen. And although it won't convince you to stop using it, it will surely convince others to think about trying something else.
Simply put, they don't suffer from the many inherent problems that PHP suffers from. That means they won't catch anywhere near as much flak.
And your description of anyone pointing out PHP's flaws as being a "hipster" or doing it because it's a "new cool hip thing to do" is absurd. Many of us who speak out the loudest against PHP have been doing so since the late 1990s, and many of us are now well over 50 years old. We're about as far from "hipsters" as you can get, in just about every respect.
http://www.cvedetails.com/vulnerability-list/vendor_id-7252/...
Nope, no vulnerabilities in Ruby or Python, just PHP. Because PHP sucks, Ruby and Python and Erlang and Go and Java and C++ and blah blah blah blah blah are superior languages to PHP, blah blah blah.
Insert beating a dead horse image here.
Python 15 in 5 years
Ruby 36 in 7 years
PHP 341 in 14 years
No one claimed that other languages are flawless. Besides that the biggest problem are not vulnerabilities in the languages; the biggest problem are vulnerabilities in products build using the languages and PHP makes it especially hard to write correct code because of its many quirks making it (almost) impossible to be aware of all edge and corner cases.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);