184 points · by zafirk · 13y ago · 157 comments
I think adding PHP is a strategically smart move by Google to get more people using their cloud platform. Soon there will be new billing relationships signed off by thousands of businesses to host basic apps and WordPress installations. Assuming customers have positive initial experiences with Google's PHP hosting, it will become easier for Google to upsell those businesses to add premium cloud features for more advanced applications over the coming years.
It's about time AWS had some serious competition.
Hah, yeah, okay, sure.
https://code.google.com/p/googleappengine/issues/detail?id=1...
Many hosting providers only support it because it's popular.
At no point in this equation does the relative merits of the language itself factor in.
When using PHP, a lot of the basic data structure transforms are implemented in the core language. You can integrate simple server side functionality into a static HTML page in just a few minutes, and it will work on 99%+ of hosting providers, and requires no fees and no tools.
For pedantic hackers like us, sure, it's garbage, but for the average person that just wants to get things done, it is pure gold.
Also, WordPress, while the biggest POS in almost every possible way, has a vast community of users, designers, plugin makers, and a marketplace for various extensions and themes.
Google just opened up a huge chunk of the web app / CMS market.
I disagree. The developers of Wordpress are not "the average person". There are too many production sites that run on PHP to say it's garbage.
... except for "easy to deploy", which is a merit.
* Cheap to deploy
* Easy to find programmers to help you
* Affordable programmers
* Code is easy to read for non-programmers who understand HTML
* Ton of free code available to reuse
Inconsistency, poorly thought out OO, lack of purity, and disdain by hipsters are a small price to pay for those merits.
Yes PHP has a lot of bad parts. But its good parts are really really good.
Most hosting providers dont allow serious php development anyway , so it makes little difference. You need a vps or a PAAS to do serious PHP development , like any other solution out there.
I love python and ruby. But I really miss type hinting everytime i use one of these.
braces for downvotes (I did try to be fairly balanced, to be fair)
[1]: the wisdom of doing this left to the reader.
Thought: ah, my sibling commenter managed to put it better than me (and less controversially).
They're both awful languages that are popular because amauteur programmers can easily get started and churn apps. There is just as much, if not more, horribly written spaghetti JavaScript out there, even by Rails and Python developers, as there is horrible PHP code.
The only reason people don't belittle JavaScript (as much) is because there are no other options. If there were, I think JavaScript would easily be the next PHP (and for good reason).
I think once people know how to use JavaScript appropriately and uses it's strengths then it's a much better language. Back in the day I found JavaScript weird and messy but that was partly how I used it. The prototype pattern is extremely powerful and JavaScript is a multi-paradigm language, which is great. OOP or Functional, it's your choice.
With the rise of really good front-end frameworks (they're getting better), the quality of JavaScript applications is getting better and better and Node.js has also done a really good job at boosting JavaScripts rep.
I do think the standards body is greatly flawed and all the different browser implementations are increasingly frustrating. The ability to use new features is extremely little, unless you use JavaScript as an embedded language in another application (i.e HTML5 App in a native context).
I don't think JavaScript will be the next PHP.
For example, javascript at its core has a string type that is treated like an array of characters in proper unicode, with a sane extensible method-based string api. PHP at its core by contrast only knows byte arrays and its string handling (global!) functions are basically useless for dealing with unicode (there's mbstring and intl, but too many people don't use those).
JavaScript isn't a great language, but it's OK. Maybe "awful", but lots of languages are.
PHP, on the other hand, is in a class of its own, far worse than JavaScript or any other mainstream language I've experienced.
Wikipedia, Facebook, MailChimp, WordPress, tons more -- they all load fast and are hardly ever down.
You can argue all day about the fine details of programming languages, but PHP is popular for good reasons.
The only thing I would consider using App Engine for at this point would be a school project or something.
Well, except that there is an open-source alternative implementation of App Engine that you can run anywhere you want. [1] Which kind of ruins the whole "no way to failover from App Engine to some other platform" argument, even for apps built the "App Engine Way".
If agility matters, I've not found anything that beats it. You might not want your service running on there as you scale, but it's enough to get a few thousand users onboarded as a proof of concept.
I see PHP as a growing and evolving object-oriented programming language. I see it as a language to which design patterns can be applied, for which structured designs can be applied, and which has improved which each major release.
I also am keenly aware that it has a legacy and a reputation of being something else, a rapid prototyping environment for programmers that don't have exposure to other systems, and take it as a glorified template language for HTML.
But I don't see it that way, I look at projects like http://reactphp.org/ which brings Node.js-style evented programming, native support for ZMQ and websocket, and makes PHP a great language for developing web workers. (Though with some caveats, for instance, I use PHP for my own application because it's dependent on the cpanel xmlapi which is provided in PHP). But that really is my point, you can abstract PHP from it's humble web roots and be a productive programmer in it.
I wonder how the performance is -- will they support common cache plugins? If not, I wonder if stock wordpress on GAE will be able to withstand getting frontpage'd on HN/Reddit
Edit: Unfortunately, as there is no CloudSQL free tier, there's no way to test it out without paying a small amount.
I apologize that I have not closely familiarized myself with Google Cloud SQL. Is it really API compatible with MySQL, or are there limitation that one is bound to run into when one starts adding plugins etc.?
I also don't quite understand (not having tried it out yet, obviously) how you'll handle static files (images, etc.) uploaded via the Wordpress "media" feature. Is GAE able to support that?
Anyhow, congratulations on the launch. I'm not a huge fan of PHP myself but I frequently find myself having to use it (e.g. to host a Wordpress site!) so this is really an interesting avenue for me to explore.
https://developers.google.com/appengine/docs/php/googlestora...
We're working with a couple of Wordpress developers on a plugin to integrate Wordpress media uploads with Google Cloud Storage.
The App Engine has mades some decisions that seem to be contradictory. At one end, they drastically increased their prices and sent a signal the GAE was an enterprise-focused platform. Now, they're releasing PHP so people can host blogs on it. Really? You want to compete with $5-6/month wordpress hosting solutions. Who is running the show there?
It's not something I want, but apparently there are quite a few people who do.
Either case, help me understand why PHP was a better choice vs. Javascript? If the question is barrier to entry. Then javascript should have the lowest. Anyone doing any web development needs to do something in HTML/Javascript/CSS.
Additionally you could have made the case for further integration with your other services like App Scripts. Aren't google team talk to each other?
I personally would have rather seen Google focus on Go and remove "experimental" out of Go so people feel some amount of security developing and investing time building Go applications on GAE. Just my $.02!
Also what people request and what google's vision is are two different things. Who are they targeting with this PHP stuff. Yes sure, for free-tier stuff, I'm sure lots of kids playing around with PHP would love to have a sand-box to play around. But this move seems inconsistent with their prior action that signaled a move toward enterprise sales.
Also, it feels like one side of google is not talking with the other side. They're building a whole application scripting system hosted on google Drive to work with google apps, etc. Why not provide the javascript on GAE to allow further application development and integration.
To be honest, this feels like: Oh shit! Google I/O is coming up and we need to have something to show than a vision of providing cloud-based computing solution that fits within their big vision.
Google's vision is "developers deploying scalable apps on App Engine". Being developer-friendly is good for that.
> Who are they targeting with this PHP stuff.
Existing PHP devs. Which is a lot of devs.
> Yes sure, for free-tier stuff, I'm sure lots of kids playing around with PHP would love to have a sand-box to play around.
Lots of apps that end up making money use PHP.
> But this move seems inconsistent with their prior action that signaled a move toward enterprise sales.
Enterprise is an area that Google would like to get their Cloud Platform, including App Engine, more sales in, but its never been anywhere close to their sole target for it.
> They're building a whole application scripting system hosted on google Drive to work with google apps, etc.
"Building"? Apps Script has been around a long time (longer than Drive itself; maybe longer than App Engine.)
> Why not provide the javascript on GAE to allow further application development and integration.
Javascript on GAE would make a lot of sense, too (especially in light of App Script and Google's work on V8 and the emerging popularity of Node.) So would Dart-on-GAE. I wouldn't be surprised if either (or both) of those happened. But the fact that it makes sense doesn't make PHP make any less sense.
> To be honest, this feels like: Oh shit! Google I/O is coming up and we need to have something to show
App Engine PHP wasn't even the big Cloud Platform announcement tied to I/O; general availability of the Compute Engine IaaS (and the associated new pricing and instance types for Clound Engine) was the big Cloud Platform news.
> than a vision of providing cloud-based computing solution that fits within their big vision.
Google's big vision for cloud-based computing is, well, big. It includes more than one kind of solution, for more than one market segment.
Your attitude is ridiculously arrogant.
PHP powers most non-corporate website on the web. The wast majority of wikis, blogs and forums. You know, things that are used for actual communication and knowledge sharing by millions of people.
Also, anyone who is doing javascript is probably avoiding java and doesn't want to figure out how to put the right files together to deploy such an application.
* Till its gets some traction, whereupon we will either jack up prices by 100% or more, or till some bigshot at Google kills it saying its not 'strategically aligned'.
I tried to address it back at the time, I invite you to read my thoughts again: https://plus.sandbox.google.com/110401818717224273095/posts/... and happy to debate again. But please read it first.
GAE at the time was running as an experimental/beta product. There was no support, there was no SLA, and there was no deprecation policy. When a product is experimental or beta, eventually the time comes around when we need to look at next steps.
We concluded that the pricing was insanely low at the time and did not make for a viable long-term product. And when we talked to customers, they absolutely didn't want us to discontinue the product, but instead they wanted us to invest in it and provide support.
So that's what we decided to do. In working with customers, we determined that (after reasonable optimizations), the vast majority of apps would experience 2-5x increase in bills. Obviously we lost some customers because of this, but much fewer than you think, and mostly (but not always) because they were simply architected in ways that badly matched GAE, or had business models that assumed a cost-of-operations that was unrealistic (either on GAE or anywhere else), and that we had in effect been subsidizing.
GAE targets being the "best" option, including cost - but you need to include the entire cost, and factor in ease of use, SRE operations, durability, scalability, etc. We're happy to duke it out with any apples-to-apples comparison for total cost of ownership.
An excerpt:
> I can’t even say what’s wrong with PHP, because— okay. Imagine you have uh, a toolbox. A set of tools. Looks okay, standard stuff in there.
> You pull out a screwdriver, and you see it’s one of those weird tri-headed things. Okay, well, that’s not very useful to you, but you guess it comes in handy sometimes.
> You pull out the hammer, but to your dismay, it has the claw part on both sides. Still serviceable though, I mean, you can hit nails with the middle of the head holding it sideways.
> You pull out the pliers, but they don’t have those serrated surfaces; it’s flat and smooth. That’s less useful, but it still turns bolts well enough, so whatever.
> And on you go. Everything in the box is kind of weird and quirky, but maybe not enough to make it completely worthless. And there’s no clear problem with the set as a whole; it still has all the tools.
> Now imagine you meet millions of carpenters using this toolbox who tell you “well hey what’s the problem with these tools? They’re all I’ve ever used and they work fine!” And the carpenters show you the houses they’ve built, where every room is a pentagon and the roof is upside-down. And you knock on the front door and it just collapses inwards and they all yell at you for breaking their door.
> That’s what’s wrong with PHP.
I will refer you to an even better quote: 'Software engineers are becoming like "photographers". They spend so much time arguing over the right lens type, focal length, camera body, flash and other sets of tools until they discover they've already missed their opportunity at taking some great shots. Software devs are now doing the same thing, arguing over the tools they use, wasting precious time instead of getting work done.'
Even though it's common, I don't think referring to programming languages as tools is actually accurate. A programming language is more like a building material. And this is an important distinction.
Let's look at scenario.
Say Fred hired Bob to write a program for him. Bob decides to use PHP. After finishing his work, Bob moves on to other projects. A while later, Fred realizes he wants some changes made to his program. So he hires George. George can't make changes to the program in Haskell. He has to modify the PHP source.
The reason I bring this up is that the choice of programming language is important, and is not the same as the choice of tools (e.g. your text editor).
You can build a house out of paper mache, but chances are you'll end up regretting it.
The linked article specifically does explain why PHP is bad, and it does it by providing literally hundreds of specific examples. It's a really impressive essay.
I've spent the last 8 months writing a fairly complex application as a REST API entirely in PHP and I can't say that I've ever run into any weird scenarios where I think to myself, "Damn, this is sure it like have a hammer but with claws on both sides."
My code is very OOP relying heavily on my own classes and not quite as much on the built-in PHP functions. I have also found that when I need to do something odd that there's usually a pre-built function already in PHP for doing it.
So if you're going to bash PHP at least throw out some actual PHP code and explain why it's bad (and make sure to point out that there's no other really good way to do it in PHP using you're own classes/methods).
php > $x = array("a" => 1, "b" => 2);
php > echo $x["a"] . "\n";
1
php > echo array("a" => 1, "b" => 2)["a"] . "\n";
PHP Parse error: syntax error, unexpected '[', expecting ',' or ';' in php shell code on line 1
I don't mean to denigrate everyone who uses PHP. But there's a whole world of great languages out there, and the vast majority of them act in more consistent (not to mention pleasant) ways than PHP.When I got into web dev I spent 2 years developing in PHP before moving on. My programs worked fine, eventually, and some were even well-written. I'm sure yours are too. That doesn't make PHP any less of a mess. But I never understood until I moved on to Ruby and Python and beyond just what a mess it was.
There's lots of example code, inline, but much of the article is about missing/broken features and artifacts of the design that make it unfriendly to wetware.
I'm also slightly alarmed that the PHP examples use htmlspecialchars and nothing else. The Python documentation has a whole section on templating with an example autoescaping setup using Jinja2.
I always liked what Google was getting at with GAE i.e. a simpler, more cohesive AWS. But it just doesn't seem like Google has its heart in it. And we all know what happens to products like that at Google.
Do try to keep up: https://code.google.com/p/googleappengine/wiki/SdkReleaseNot...
So many new "me too" clouds, Azure, Rackspace, HP, even Oracle, and now Google.
Here is the run down on the runtime services available in the Java SDK (I think that it and Python are the most complete, not everything is available for Go last I checked): https://developers.google.com/appengine/docs/java/apis
This is a good supplement: https://developers.google.com/appengine/tools_tips
So queues and email are in, messaging might be served by Google Cloud Messaging or the recently announced Trello partnership. I don't think anything quite like CloudWatch or Route53 is available.
I think of GAE as more like Heroku + add-ons than a straight AWS competitor so I wouldn't expect them to be entirely equivalent. On the other hand more control over the runtime lets them offer things that are entirely out of scope for AWS (channels).
As far as updates, the blog shows the the SDK gets new features fairly frequently: http://googlecloudplatform.blogspot.com/
Yeah, I have no intention of using GAE, they don't support haskell anyways. GCE is the direct equivalent of EC2, they have an EBS and S3 equivalent as well. I that core puts them in a pretty direct competitor position.