9 ms·
Google App Engine finally supports PHP
Two days ago, Google announced it would finally support the most popular computing language on the planet, PHP, in its platform-as-a-service offering, Google App Engine.
- flixic 13y agoThey seem to twist the facts ever so slightly. 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.
- gngeal 13y agoI'd say that Java is the most popular one, but C does all the hard work!
- flixic 13y agoOh, yes, you are totally right. For some reason I mixed these rankings in my mind.
- voidlogic 13y agoWhen people say C is the most popular, this is the metric they are often referring too: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
- gngeal 13y agoYeah, I know TIOBE - when I said "popular", I mostly meant "what most companies make the most fuss about". (As in "we must move out ERP system to Java! Quick!" :-)) C kind of seems to evade this kind of popularity nowadays, it seems to be forgotten by many, almost like a second level of machine code.
- markdown 13y agoI like this just for the fact that it means GAE is here to stay. They're going hard on App Engine, and I'll take that as a win even for python-heads like me.
- obviouslygreen 13y agoI definitely wouldn't take this for granted. All it means is that, right now, there are internal resources dedicated to improving the platform's language support. Those that make this largely unsupported assumption will be the most irate and in the worst position if Google drops the platform at some point (not to mention this platform is horrible in terms of proprietary lock in).
- markdown 13y ago> if Google drops the platform at some point 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.
- bink-lynch 13y agoI too was concerned about lock in; however, it is really not that bad. I have been on AppEngine from the moment they supported Java. I created an abstraction layer between my program logic and whatever services it uses. This has allowed me to take the exact same compiled jars and run them on AppEngine using the datastore for persistence or in some other servlet container using SQL Server for persistence. 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.
- RyanZAG 13y agoI don't see this getting that much traction. Most existing PHP code is heavily dedicated to the use of SQL, and if you don't use the key-value datastore you give up a lot of the scaling advantages of appengine. 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/google-appengine/Nz4Yt8V6PB0 https://groups.google.com/forum/?hl=en&fromgroups#!topic...
- salimmadjd 13y agoAgreed with targeting bloggers to enterprise! I had similar comments as yours when the news first came out, https://news.ycombinator.com/item?id=5714729 https://news.ycombinator.com/item?id=5714729
- jrockway 13y agoif you don't use the key-value datastore you give up a lot of the scaling advantages of appengine I'm not sure what you mean by the key-value datastore. Do you mean memcache, or do you mean the HR datastore?
- ceejayoz 13y ago> Most existing PHP code is heavily dedicated to the use of SQL, and if you don't use the key-value datastore you give up a lot of the scaling advantages of appengine. I find a lot of folks aren't aware of https://developers.google.com/cloud-sql/ https://developers.google.com/cloud-sql/
- danbruc 13y agoMore potential for one of the worst languages to spread - let's have one minute of silence. And after that someone please start building an alternative keeping the good parts that made PHP successful and getting rid of the insane stuff.
- Joeri 13y agoBut, what if it were the insane parts that made PHP successful? PHP is basically a shell script hooked up to a web server, with '$_REQUEST' flowing in one way, and 'echo' flowing out the other way. Its over-simplified architecture is exactly why beginners like it so much.
- wmil 13y agoThe simple architecture is actually what PHP got right. For comparison, if you were using mod_python with the default settings, you needed to restart apache whenever you changed a file. 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.
- jasonlotito 13y agoI don't know. Other languages have become successful following that same path. See objective-c as a perfect example, though in obj-c's case, it only became popular because of the platform it was used on. 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.
- gngeal 13y agoHalf 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. :-)
- jrockway 13y agoGoogle App Engine was almost a science project for the first few years, only supporting languages that Google used internally. Python?
- sambe 13y agoGoogle uses a lot of Python, I thought. They started unladen-swallow.
- jrockway 13y agoMy point is that Python is not some crazy language only used by Google. It's Python.
- velodrome 13y agoPython, Java
- voidlogic 13y agoMy understanding is Google uses: Python, Java, C++ and Go and language choice is at the discretion of team involved.
- joeblau 13y agoGuido van Rossum (Python Inventor) worked at Google--That's why they went Python.
- tnuc 13y agoThey went Python long before Guido started working there.
- hugorodgerbrown 13y agoI'm pretty sure that the original scraping scripts that Larry Page and Sergey Brin worked on (before Google was called Google) were written in Python. (Although I can't find the reference I read about that, so could be mistaken.) [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).
- aviraldg 13y agoIn the words of Koushik Dutta (aka Koush): "With Google App Engine now supporting PHP, we can all host our Wordpress vulnerabilities at Google scale."
- ppradhan 13y agoah... good old HN snobs tripping over each other in the comments section to give old PHP a much needed lashing.
- PommeDeTerre 13y agoThere's nothing "snobbish" about pointing out serious technological flaws in a given programming language or application. This is especially true when those flaws have no justifiable reason for existing in the first place, or when they can compromise the security of data and other systems.
- shocks 13y agoRight, but it doesn't need to be pointed out by 100 people every single time the language comes up in conversation. PHP has its place. HNs typical "PHP LOL OMFG WTF SHIT" reaction is childish.
- PommeDeTerre 13y agoSuch flaws should be pointed out whenever possible by however many people feel like pointing them out. 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.
- sbarre 13y agoHey this is like your 4th reply on this thread justifying the PHP hate, except I'm not sure you realize that you are backing up junk posts that have no substance beyond "PHP sucks!". 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.
- joeblau 13y agoThis move doesn't make much sense to me. Most of the websites built in PHP are huge CMS services like Weebly, Wordpress, Joomla, or old social networks like Facebook. I don't see any of these large services switching over to get hosted on Google. Plus PHP in general is disorganized and slow compared to more contemporary languages with well defined frameworks.
- mscarborough 13y agoIn addition to those hosted services, is all of the self-hosted Wordpress, Joomla, Zencart, etc. Plus all of the business and personal sites built on Zend, Symfony, Cake.
- duskwuff 13y agoAnd most of those Wordpress/etc installs are going to be of applications which assume they're in a normal hosting environment, where they're running on Apache with a filesystem they can write to, connecting to a MySQL server, etc. How well will this translate to GAE? I'm not sure.
- 6ren 13y agochar* a = "PHP"; while (*a) putchar(*a+++7);
- Kiro 13y agoI am no hardcore programmer and PHP is perfect for me. Tbh I haven't encountered one single bad thing about it during my 5 years programming, although I understand there are major flaws in it. What I'm saying is that for most people PHP works completely fine and is as good as anything.
- danbruc 13y agoOf course, you can build working stuff with PHP. It is good enough for weekend projects and prototyping stuff. Companies like Facebook have even proved that you can build huge things with it. 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.
- Kiro 13y agoI would still say that for most people these flaws are no game-changer. We simply don't code stuff advanced enough for it to matter.
- pornel 13y agoMost PHP flaws that people moan about are shallow. Inconsistent naming of functions and parameter order, syntax warts — those are annoying, but ultimately don't matter. 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.
- sbarre 13y ago> 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? 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.
- kami8845 13y agoIsn't GAE like ... long dead? Who would still trust them with a new project at this point in time?
- daw___ 13y agoI am not excited for the PHP support per se, but for its side effects: I think now it's time for cheap hostings around the world to roll up the sleeves and finally start offering something new.
- Nux 13y agoSurprised it took them this long! Ignoring the most popular language for webdev must have left many scratching their heads.