12 ms·
Introducing the new PHP on Heroku
- craigkerstiens 12y agoHere's another post as well in relation to our support where we look back at where PHP comes from, but also where it's heading - https://blog.heroku.com/archives/2014/4/29/php_a_look_back_a_look_forward https://blog.heroku.com/archives/2014/4/29/php_a_look_back_a...
- aram 12y agoSpeaking about where PHP is heading, I think it's pretty important to mention the funding Fabien Potencier managed to get for SensioLabs (company behind Symfony): http://fabien.potencier.org/article/71/sensiolabs-raises-5-million-euros-to-boost-the-symfony-ecosystem http://fabien.potencier.org/article/71/sensiolabs-raises-5-m... I haven't seen any mention of that on HN. Symfony components are used in Laravel and upcoming Drupal 8. The funding above means that SensioLabs will continue to work on solid platform(s) that will bring higher quality development and standards to PHP. Honestly, I'm pretty happy for that.
- SomeCollegeBro 12y agoSymfony and the related components are awesome. I've used Silex at work a few times and it's honestly fun. When done right, PHP can be almost as good as any other Object Oriented language. Unfortunately, when done wrong, it can be much worse.
- adamors 12y agoSymfony is the best thing to happen to PHP in a long time and the guys at SensioLabs are doing a lot of great things. It wasn't on HN because HN still thinks PHP equals Wordpress/Drupal and those codebases are horrible.
- martin_ 12y agoThis isn't "the new PHP", and I hope it is amended. Facebook making their own runtime by no means makes it newer than the official version produced by the PHP contributors/zend team until (if ever) it makes it into the core.
- alttab 12y agoIs this a strategy to increase the market potential of Heroku? It was mainly meant for "super fast rails" development and deployment, so I'm wondering why Heroku is targeting PHP. Some would say its part of their "all platforms" deal, but then I'd argue its not much different than AWS. I'm wondering if they can bring some of the large portion of PHP websites that still run today onto their platform as a way to increase active and paying users.
- thinkbohemian 12y agoHeroku employee here. I'm curious about this statement: > I'd argue its not much different than AWS. Could you expand here? What about the platform do you find similar and different? Which of that is good and bad? What were you using each to accomplish? I'm happy to answer questions about Heroku. But I do like hearing unfiltered impressions and experiences before I taint them with my own world views.
- alttab 12y agoThe value proposition on the front page is "Build, run, and scale apps." Arguably, AWS does this and much more. AWS doesn't really make decisions on what technology you use, so if you wanted to run PHP on AWS it wouldn't take additional effort on Amazon's part. Heroku probably does some nice workflow things, which is a feature, not a product. Whatever "timesavings" the tooling provides is an AWS feature release away from having parity. Personally, I've only tested Heroku a couple of years ago out of curiosity. So here is Heroku, working closely with facebook to bring the PHP platform to Heroku, while all along other hosting and infrastructure companies don't even have to worry about supporting PHP because they sell you scaled box-space, not application stacks. I guess my whole point is "if you're building your apps with PHP these days, you are probably the type of shop that would benefit from the value-add of Heroku." That is, small to medium businesses with 1-2 web guys running a PHP app who don't know shit about hosting, deployment, or scaling. Does that make sense?
- thinkbohemian 12y agoWe've had huge buy-in from Ruby as it's pretty difficult to set up and deploy a Ruby stack. Where as with PHP it's basically supported out of the box by pretty much everyone. It's hard to sell Heroku which is why we have the free trial dynos. I find most people either love us see us as a huge value add, or don't understand why anyone would use us. We're not simply a small abstraction layer, instead we support deployment at the application layer. Which again basically sounds like meaningless fluff unless you've already bought into the product. If I had to sum it up, i would say we're a company that provides a collection of small, sharp, extremely well integrated tools that seek to make your production development experience more pleasant. For Ruby you get the app setup which is huge, but then you also get process monitoring out of the box so if your app goes down due to hardware failure we get paged at 3am instead of you. It's extremely easy to do things like have multiple staging servers, and I really like our CLI. Instead of trying Heroku, I would recommend starting off trying out Heroku Postgres and using it through whatever server you deploy to right now. Get the credentials from the CLI. On a production DB you get forks, and followers. We also have point in time recovery which is pretty fancy. Hacker destroy your DB? Forgot to schedule a backup? Rollback to 1 second before the deletions, and done. If you like Heroku Postgres, then I would recommend trying the dynos, and if not: agree to disagree. For PHP the sell is management, stability, and consistency. If you're on a shared host your performance is very inconsistent as well as your uptime. If you're on a VPS you have pretty decent performance but now you have to manage everything manually, and even then there's that uptime thing we're not 5 nine's but hopefully above most: https://status.heroku.com/uptime https://status.heroku.com/uptime. I honestly don't think we're right for every application, every developer, and every scenario. When we are though I hope to provide the best experience possible.
- programminggeek 12y agoI think it's cool to have great PHP support on Heroku. PHP doesn't always get much love from a lot of the developer community, but it has its place and if nothing else, Heroku support means you can migrate your app there from a shared Dreamhost account if it ever blows up. It's good to have options.
- at-fates-hands 12y ago>> PHP doesn't always get much love from a lot of the developer community. This is odd since most people don't think of equating WordPress with PHP, but WP gets a TON of love from the development community.
- leeoniya 12y agothe irony is that WP source and plugin architecture is written in textbook shit PHP from the 90s. (last i worked with it a couple years ago). i would not wish WP development onto my worst enemies. i really hope it gets displaced by something managable written in proper PSR-0 and >=PHP 5.5 in many ways, WP exemplifies PHP core devs' philosophy of "dont ever break existing ecosystem compat". PHP has some major WTF that lingers on because of this. i'm very surprised that it has been progressing at all considering how stubborn they are on even fixing completely obvious shit like "unexpected comma" errors written in Hebrew. wordpress takes this attitude to a whole new level :( there is great, maintainable software written in clean* PHP; the only thing i've learned from WP is how not to write software.
- ianhawes 12y agoIronically, the old WordPress motto was "code is poetry".
- juddlyon 12y agoPoetry is often about pain and torment. :)
- jrochkind1 12y ago
- angersock 12y agoFor anyone looking to get into PHP development now, check out Laravel: http://laravel.com/ http://laravel.com/ It's a Rails-like framework for PHP, and seems to be pretty well designed. I wouldn't start a new PHP project without it.
- aram 12y agoPair this with Jeffrey Way's generators and you will end up with something close to what Rails has: https://github.com/JeffreyWay/Laravel-4-Generators https://github.com/JeffreyWay/Laravel-4-Generators
- prottmann 12y agohttp://phalconphp.com/ http://phalconphp.com/ Fast and a really good documentation.
- krapp 12y agoLaravel is pretty awesome, but in my opinion, I think it borrows too much from Rails, and it does too much. Just knowing how to use Composer, PSR and a url router will take care of, like, 80% of PHP's headaches (even though, yes, none of this is even necessary, it's still better.) The bare metal lack of abstraction in PHP that other languages have to have but PHP doesn't can be one of its strengths.
- sergiotapia 12y agoUgh the same thing can be said (and has been said - and will be said!) about Rails, "Use Sinatra", ASP.NET MVC, "Use nancy", Python, "Use flask". The idea is that Laravel gives you a huge solid launching pad and takes the busy work out of making a website run.
- krapp 12y agoI've got nothing against Laravel (other than Blade, and my own personal prejudice against ORMs and html generators), I use it and I like it a lot. I'm just saying a lot of what people seem to hate about PHP can be avoided without dependencies on much besides Symfony by way of Composer or even a framework at all - although this depends on how you define "framework." Which is an interesting question in and of itself - what's the minimum viable feature set for a modern PHP framework? I would say a PSR autoloader, Composer and a url router, and everything else is superfluous. Most people wouldn't even count that as a microframework, and I understand that. And it probably wouldn't scale for crap either. Although one thing I really like about laravel, which technically has nothing to do with laravel, is Artisan. Using .phar files as command line applications doesn't get as much attention as it should, maybe.
- aram 12y agoCan't get over the way first sentence sounds: > PHP developers are makers at heart. What is the difference between a PHP developer and any other developer? If they tried to stick this in the middle, I could swallow it but opening sentence is just ridiculous.
- _zen 12y agoWhy are you getting your jimmies rustled for no reason? Stop getting offended over nothing. They didn't say "PHP developers are makers at heart. No one else is."
- aram 12y agoI'm not getting offended; actually I'm mainly a PHP dev. The sentence just sounds as if you paid $5 someone to write you an intro to a technical matter because you didn't know what to to use. The sentence is general and without point. Because it is coming from a technical company and is aimed towards technical people, yes, I find it ridiculous.
- _zen 12y agoPassionate language like that is used all over the industry, especially from start ups. So why is it a big deal if it's used to describe PHP? If the Ruby on Rails blog made a post saying "Rubyists are makers at heart." would you complain?
- aram 12y agoHa! Actually that would go on my nerves even more. I don't like that type of sugarcoating in general. There is a big difference between passionate language and fake passionate language. IMHO this is the latter case. Last: Heroku != blog of a random startup Lead sentence != middle of post I won't continue as this leads nowhere.
- chc 12y agoWell, for instance, Haskell programmers are much more likely to be researchers than PHP programmers are.
- vinhboy 12y agoCool. Just in time for the end of free AppFog.
- JoshGlazebrook 12y agoYou mean the "free forever" AppFog tier that still had that "forever" promise a year ago? They sure have gone downhill since being bought by CenturyLink.
- eli 12y agoNothing is forever, just ask the suckers who still had stuff hosted at Textdrive (like me)
- mixedbit 12y agoPHP will be a tough market to enter for Heroku. It will be especially hard to attract owners of small PHP based sites. Almost every traditional, shared hosting provider supports PHP, prices are really low and setup is trivial (just dump PHP files in your public_html folder, set DB connection string and you're done). For larger sites, when scalability and availability become a significant issue, Heroku platform may be appealing.
- camus2 12y agoWell, I dont know. It will all come down to cost,and the ability to manage CMSs on Heroku, I think. Something like Wordpress is in my opinion not built for readonly paas,more for classic/upload with FTP workflow. And Heroku IS expensive while being very easy to use when one think his app as readonly backed up by cdns and databases. I deployed a few Symfony projects on Heroku,it works well. But why choose PHP when I can choose my entire stack since not limited by host restrictions? It's an interesting experiment nevertheless.
- waxzce 12y agoIn fact it's exactly why we create FS bucket in the Clever Cloud product : http://doc.clever-cloud.com/databases-and-services/fs-buckets/ http://doc.clever-cloud.com/databases-and-services/fs-bucket...
- wambotron 12y agoI used Heroku for hosting my php site (http://sea-hag.net http://sea-hag.net) for a while on the free tier. It was OK, but the DB add-ons were all pretty terrible (even on the lower pay tiers). In the end, I ended up getting a VPS and hosting it on that. Now it's lightning fast and I can't complain. Heroku held its own for a while. I'd recommend it if you need to do some quick testing and get people on it to start, but I wouldn't pay for it.
- franklaemmer 12y agoplug: i'm co-founder of PHP-only-PaaS fortrabbit — seeing Heroku move in our direction shows me that we are doing something right. We see a lot of momentum in the PHP community — some call it a PHP renaissance. Laravel, Composer and lately Facebooks input with HHVM (& Hack) are the cornerstones. Of course PHP is not everyones cup of tea, but something to be taken seriously.
- jacobbijani 12y agoIt's great for quickly hosting a static site on Heroku. Just name your HTML file index.php!