8 ms·
Why PHP continues to thrive in the age of the PaaS
- mscottmcbee 13y agoI don't do much web development, just a product once every year or so to play around with an idea. Always in PHP. A few months ago I was asked by a close friend to help them with a not-so-serious site. I decided that I'd use Rails, because, hey, I've heard nothing but good about it from HN and the like. I was absolutely blown away by how much work it required to get started. That, and how painful it was to explain to a non technical person how to make visual changes. I was told by a few friends I vented to that what I was doing was "too small" of a project, or "Rails is meant for web apps" which confused me because I assumed a site where you could upload images via a form and then browse and view them was right up its alley. Edit: A lot of comments are talking about wrapping my head around the framework, MVC, ect. I had no problem building the initial application. My sore points are more about deployments and updating smaller things, like the image of a link. non-technical people don't often remember "oh, and if you want your change to show up, go to this folder, open 'restart.txt' and change it in some way. doesn't matter what, just add a space to the end".
- fleitz 13y agoYes, that's because PHP operates at thermodynamic equilibrium and creating order from those states requires the expenditure of energy. Rails is great for creating a site with a form where people can upload images, it's a 20 to 30 minute project in rails, pretty much just take any rails blog tutorial and add paperclip. (Note, it's not a 20 minute project for anyone who doesn't already know rails) Rails is not for non-technical people. Rails is like a great jig, if you're a master craftsman it's going to save you a lot of time, if you're not don't bother, just tweak things until they fit together. If you're someone who has spent the last 5 years building furniture by tweaking things then you will love a jig.
- tokenizer 13y agoFunny, but not necessarily true. With PHP, I do as you say and spend, if I know the language, 1 hour max setting up a CRUD list/view/admin. With Ruby, I have to spend, at least 3 months learning the concepts behind the Rails framework and what the article OP mentions just to get to that 20 to 30 minute mark. If anything it's all meaningless, and what everyone should understand is that while the closer you are to the web server itself (CGI+PHP, Node.js, Classic ASP), you can quickly create any type of code, at the loss of organization and order. In frameworks (criticism of Rails can also be attributed to Wordpress IMO) you have a much larger ramp up time learning the concepts and conventions, and once familiar, are able to LEVERAGE those patterns. But don't bother me with PHP vs Ruby. I run SSI on nginx. It's not even in the same league as those two. BUT it's even easier to spin a basic 5 page website. All tools have their specialties.
- sanswork 13y agoI think your first two lines are a bit unfair. In the first line you say it takes you an hour while mentioning in passing already knowing the language. In the second you say it takes 3 months because you have to learn the framework. Honestly if it takes you 3 months to understand rails well enough to do a CRUD app there is no way you're learning PHP well enough to do the same CRUD app in less time.
- fleitz 13y agoThe problem is learning PHP actually makes you worse at PHP. The only possible way to program PHP is to be pretty much ignorant of everything in which case PHP will actually do kinda what you wanted. If you learned PHP then either it's not actually doing what you think it's doing, or some config variable changed and would have done what you thought except it didn't, but don't worry just add some code to change that config variable for a while, and then change it back. PHP is zen. There is a story of a young, but earnest PHP student who approached his teacher, and asked the Master, "If I work very hard and diligently, how long will it take for me to learn PHP?" The Master thought about this, then replied, "Ten years." The student then said, "But what if I work very, very hard and really apply myself to learn fast. How long then?" Replied the Master, "Well, twenty years." "But, if I really, really work at it, how long then?" asked the student. "Thirty years," replied the Master. "But, I do not understand," said the disappointed student, "at each time that I say I will work harder, you say it will take me longer. Why do you say that?" Replied the Master, "When you have one eye on the goal, you only have one eye on the path."
- bcoates 13y agohttp://en.wikipedia.org/wiki/Automated_external_defibrillator http://en.wikipedia.org/wiki/Automated_external_defibrillato... -- the AED is worse in every way than a properly trained professional with the right tools, except for one way: its there, it sort-of works, and you can't beat something with nothing. Requiring a professional is a flaw, not a virtue. It's particularly problematic in our industry, where the end-user and most of the people involved in the production are not professional programmers.
- dpritchett 13y agoThere's nothing wrong with professionals building tools for other professionals. PHP surely requires less activation energy for a tiny project or a new developer, but that doesn't mean Rails et al aren't providing useful options for full-timers.
- fleitz 13y agoYup, often PHP is the right tool for the job, however, in professional settings it is invariably the wrong tool for the job. Just as you'd never want to use an AED at a hospital (unless every medical professional was unavailable)
- nthj 13y ago> Requiring a professional is a flaw, not a virtue. Your statement depends entirely on the context. I agree that requiring a professional to assemble my IKEA furniture would be a flaw. Requiring a professional to assemble my custom marble kitchen countertop totally makes sense and I'd hardly slam IKEA for not having such a package in Aisle 12.
- ArbitraryLimits 13y ago> Requiring a professional is a flaw, not a virtue. Don't you think that depends mostly on whether there are professionals available?
- scott_karana 13y agoNo. If a professional is available, better paths will be taken. If not, there is no requirement.
- danielweber 13y agoRuby is my favorite language but I had kept out of Rails for years besides hello-world stuff. The amount of layers upon layers upon layers makes one's head spin. And if something goes wrong, you better hope you are using the exact same toolchain as the audience on StackOverflow is using, because that's what they'll be expecting you to have as well.
- mikeryan 13y agoYou're making the mistake of conflating PHP the language with Rails the Framework. I can do your app in Rails pretty damn quickly at this point (with one of my current skeleton frameworks I can add authentication administration and other nice features pretty much "for free" as well) But tell me I have to do it CodeIgniter or Laravel and I'd be completely lost for days.
- mscottmcbee 13y agoTrue, it's not exactly fair to compare getting started with a language and getting started with a framework, especially one as opinionated as Rails.
- gngeal 13y ago> You're making the mistake of conflating PHP the language with Rails the Framework. I've heard someone call PHP "the C web framework". I thought it was fitting, and in addition, it seemed that even as a C web framework, it was a failure.
- Jormundir 13y agoPHP the C web framework? PHP a failure? Lol!
- gngeal 13y ago"Lol!" I think you're in the wrong place. Reddit is this way.
- theg2 13y agoPHP may have some rather serious flaws but it is far from a failure and runs on a huge majority of the web.
- cafard 13y agoAgree that it has flaws, agree that it not a failure, but what do you mean "runs on a large majority of the web"?
- pallandt 13y agoIf you were to start with a nearly blank slate in regards to your PHP knowledge + Laravel as a framework for example, throw in Composer, learning about Eloquent ORM and so on, you'd likely be facing the same reaction. I'd like to also point out that if you want to do software dev by the book applying various sofware engineering principles and not just stringing something together that works, you're pretty much forced to use a framework. (either due to lack of time or lack of skills for building one the right way). Sure, sometimes the most important thing is rolling something up quickly, but other times your project will be used by more than a handful of people, and/or you'll have expectations of producing monetizable value and anticipate regular maintenance/upgrades for which a different strategy is required.
- Shorel 13y agoDeploying small changes with Laravel is very, very easy, and that's the parent post main complaint about RoR.
- trekky1700 13y agoI was in the same boat, I had spent years creating PHP websites and then was faced with the Rails framework. When you're first getting used to MVC, it seems very counter intuitive. I ended up using Symfony to get used to MVC while sticking with PHP, and now have switched to Rails and wouldn't dream of going back. When you're first starting with it, especially moving from creating PHP files, it seems very counter intuitive and over complicated. But once you get used to the layout, you understand why it really is far superior for creating websites.
- Edmond 13y agoshameless plug but next time you want to do a web-app/site consider our product (crudzilla.com)...it is basically a web-dev-to-deployment solution in one package.
- Edmond 13y agodown voted?...internet forums just get new names but the character remains the same:)
- thatthatis 13y ago3rd generation full stack web frameworks (django, rails, etc) are optimized for 6 month happiness, not 6 hour happiness They take longer to get set up, but as your project grows the incremental work to "change one small thing" stays relatively constant, whereas coded from scratch php or lightweight frameworks tend to have complexity of a change that is exponential with the number of lines of code. It's a question whether the investment is worth it for what you're trying to do. Sometimes, quite reasonably, the answer is no. I've got my django routine to the point where it takes me about 30-45 minutes to spin up a new stack that I'd be happy to code on for years -- to me that's a relatively minor investment for huge rewards.
- film42 13y agoI don't know about you, but when I decide to do a project, I'll often use a new technology that I'll struggle with, because I want to learn and grow as a developer. Giving up because something is hard is a poor excuse. Period.
- mscottmcbee 13y agoWho said anything about giving up?
- film42 13y agoYou're right, you didn't. But, would you use rails again for your next project? The tone of your comment sounds like you'd like nothing to do with it next time around. I didn't mean for my comment to come off as snobby, I just hope you don't discard rails/ruby (or branching out from php) because you feel it's not the easiest to work with out of the box (even if only for non-technical people).
- mscottmcbee 13y agoNo, I'm not out right discrediting it, but given how little I do in web and how small most of my experiments are, I probably won't use it for a long time just because I don't need what it provides.
- joebeetee 13y agoI know the author emphasizing a point, but the steps that he's described end with two vastly different results: 1 - A php script on a server with a script with some code on it. vs 2 - A full featured MVC framework, complete with version control, database integration, easy deployment, which is easy for other developer to jump into, etc etc How can these two options be equated?
- mscottmcbee 13y agoA lot (a majority?) of websites aren't made by people that need those things. A lot of people just want to get their ideas up on a page so they can show their friends. The thing I walked away with from the article was that PHP is still active in part because it has such a low entry point for those people, where as Rails does not. Like you said, they're very different entities, but a lot of people can't tell or don't care about the difference.
- AdrianRossouw 13y agoi'm personally learning to love static html again. the longer i can get away without a users database the better.
- sanderjd 13y ago> ...I assumed a site where you could upload images via a form and then browse and view them was right up its alley Ah, your assumption was correct but incomplete. Doing that and a bunch more is right up its alley, but if you're doing only that, there are much easier ways.
- vlucas 13y agoIt's funny too that upload functionality is mentioned here in your base requirements, because that alone is a whole bunch more steps when deploying to a PaaS like Heroku. You don't have a local filesystem, so you have to find and use gems like carrierwave, signup for Amazon S3, create a bucket, configure it in your Rails app, etc. etc.
- Shorel 13y agoLaravel seems a much better investment for you.
- vcherubini 13y agoPHP has also become a much more vibrant language to develop in. It doesn't have the coolness factor of Haskell, Go, or Scala, but it has become a lot better in the recent years. Combined with a better overall language (that still has it's warts, lets be clear here) and an ever expanding amazing ecosystem of great libraries and you have something that is easy to deploy _and_ fun to work with.
- ErikAugust 13y agoStuff like composer, Silex/Symfony2, the addition of closures, the speed of new versions + OpCode caching make PHP pretty usable. Thinking LAMP as a whole - the speed of new versions of MySQL (5.6, 5.7) and the Percona branch are also pretty sweet.
- textminer 13y agoHow much has Facebook's open-source contributions to PHP (say, the HHVM) helped the development and adoption of the language?
- ErikAugust 13y agoNot sure how many every day PHP deployments are using HipHop. Probably nice option to have when you get to a certain point. But Memcached, APC, and wrappers for Redis probably have done the language much more of a service in ways...
- rll 13y agoHe kind of lost me on his opening CGI argument. Most PaaS I am familiar with don't run PHP through CGI at all. Either Apache mod_php or nginx php-fpm. I guess the author means a CGI-like model or something?
- justincormack 13y agoMost dirt cheap hosts do. PHP via a PaaS is just as hard as Ruby is his argument.
- mmahemoff 13y agoOP here. That's what I meant. We often compare PHP to e.g. Ruby/Rails, Python/Django...but what we're really thinking of when we think of PHP is CGI. Most of the same things we say about PHP deployment (it's easy, can be done in one file, etc) could equally be applied to writing CGI scripts in Ruby or Python. PHP is just a more extreme example of CGI, and arguably easier, because there's so much support for PHP-based CGI compared to Python/Ruby/Node CGI.
- oinksoft 13y agoI'm afraid you're misinformed. When we think of PHP, most of us are thinking of PHP embedded in the Apache web server using the mod_php extension. This is what almost everybody was using until very recently when FastCGI gained some popularity and people started using PHP-FPM with nginx. Pretty much any PHP host will be running a LAMP stack with mod_php.
- mmahemoff 13y agoOK most hosts will be running mod_php or fcgi and not pure CGI. I just mean CGI as a shorthand for this approach. It doesn't make a difference from the developer's perspective on a shared host. It's still just "here's a file I created, now point your browser at it".
- ojbyrne 13y agoFPM is a CGI like model. The F stands for FastCGI. Also many cheap-ass virtual servers do run php-cgi.
- drakaal 13y agoPHP continues to thrive because of WordPress and PHPBB. There are so many sites running these two pieces of software that PHP will be a top language for years. PHP is also one of the easiest languages for Designers to learn. If you know HTML, adding a few bits of PHP is easy. Even if you dislike PHP, (I certainly do) you end up getting good at it because enough projects touch it that you kind of have to be good at it. It is like JavaScript, I don't like JavaScript as a language, but it is essential because you can't not know it.
- srisa 13y agoAnd Drupal, Joomla, Magento, SugarCRM, CiviCRM, WebERP .....
- gotofritz 13y agoDrupal, Joomla and Magento are horrible, and the others are certainly not widespread enough to keep PHP alive by themselves
- mmahemoff 13y agoYou're right, and it's kind of ironic that Node doesn't get to be the server-side language of choice for designers already dabbling in JavaScript. But in the absence of a one-click deployment for Node, we have HTML > CSS > client-side JS > PHP as the standard technology path for a designer who wants to Get Stuff Done.
- dpcan 13y agoI think you're right mostly because of WordPress. In 10+ years of professional web development, I've had, I think, 1 client ever who had PHPBB on their site, but I work on at least 1-5 sites a month that are running a variation of WordPress (or just PHP in general). And every new site we setup is running WordPress on the back-end now. I've also never had a client come to me who was running a Ruby, Python, etc, system. The strangest it has gotten was a Cold Fusion site here and there, and maybe once a year a .Net / ASP site crawls through the door..... and we have pretty religiously completely converted the sites to PHP in these cases before we start to manage them.
- 7Figures2Commas 13y ago> Why PHP continues to thrive in the age of the PaaS Most companies/clients, particularly outside of the SV/SF bubble, value a working solution over technical elegance. They're not irrationally ideological about programming languages, and they don't want to pay $120,000/year or $125/hour to a developer with two years of experience. Given the supply of developers of various skill levels who can build working solutions using PHP, and the number of existing commercial and open-source applications based on PHP, it's no surprise that PHP is thriving. > But the question is, why should PHP still be easier to deploy than Ruby/Rails, Python/Django, Node/Express (or Metro)? It's interesting that the author grouped Ruby, Python and Node with frameworks for his comparison to PHP sans framework. Incidentally, I think one of the advantages of PHP is that a lot of PHP developers, especially those who have been working with PHP for some time, didn't get started with a framework. Heck, before there were mature frameworks, many PHP developers rolled their own frameworks and micro-frameworks, a valuable exercise. Third party frameworks are great, but they can easily become a crutch, and when you don't know anything but the framework, they can be downright dangerous. What percentage of Ruby on Rails developers who started their careers with Ruby on Rails are capable of building a moderately complex Ruby application without Rails?
- mmahemoff 13y ago"It's interesting that the author grouped Ruby, Python and Node with frameworks for his comparison to PHP sans framework." Mainly because people rarely talk about pure Ruby/Python/Node CGI development. They're almost always run through an app server. I realise there are indeed some excellent PHP frameworks nowadays, but to my knowledge, most can still be run in a basic CGI environment. And more to the point, probably the majority of quick hacks in PHP are still done without any framework. [BTW I meant Meteor, not Metro.]
- Iftheshoefits 13y agoI agree that there is an absurd, nearly worshipful view of certain technologies in the "SV/SF bubble." That, however, is irrelevant. Your final comment regarding frameworks is also something I'd tend to agree with; frameworks are great for solving problems within the domain they're built for, but their applicability outside those domains is limited. This, however, is going to be an unpopular opinion amongst the PHP crowd, but I can distill the rest of your comment into the following statement: "PHP is thriving because companies are cheap, don't care about quality as much as cost, and there is an over-abundant labor supply of poorly skilled, mainly self-taught PHP 'developers' who are willing to work for peanuts and get the job done to an adequate level." There's nothing inherently wrong with that, but trying to turn it on its head by implying developers skilled with, e.g. Ruby/Rails frameworks (see note below), are essentially overpaid and narrow-minded is just absurd. Note: I especially am not a fan of Ruby, so don't take this as a defense of the language or its developer-adherents. I'm actually fairly language agnostic; "right tool for the right job" and all that.
- al2o3cr 13y ago"And yes you get the benefit of version control and not editing the live version, but my point is most projects don't even need that." Lolz.
- webjprgm 13y agoFrom knowing nothing to building a simple web app, PHP is faster. If you already know RoR and have your dev machine and deployment environment all set up, then it's not hard to get a Rails app working. Rails has a significant advantage with the use of gems (and bundler, etc.) for easily adding complex features. I still use PHP for my home projects most of the time because I haven't bothered to set up Rails on my VPS, so the effort it would take to do so just isn't worth it compared to how easily I can drop a PHP app in place. (I am using a framework in PHP too.) But then, the author was talking about PaaS not setting up Ruby on a VPS. So in that case it's probably just about how comfortable the developer is with each language. I'm a bit more comfortable with PHP because I don't like debugging Ruby GEMs that use instance_eval black magic for DSLs and/or have to be inserted as Rack middleware. Not unless the project is large enough to make Ruby gems worth it. (Eg. if I want good unit and integration testing. For home projects I rarely do integration testing. E.g. #2 was rack middle ware for REST API.)
- bdcravens 13y agoI'd say you can get from zero to working app faster in Rails. You can get away with knowing no SQL, and not really grasping concepts like GET v. POST. A few scaffolds, Omniauth, and one of the Bootstrap gems, and you've got a decent app worthy of Show HN karma. In PHP, you need to learn some HTML, some SQL, and general web concepts that Rails hides. No, learning isn't bad. No, I don't think scaffolding is acceptable. I've used PHP since v3, and Rails for a couple of years, and many other languages since 1999, and I'm just trying to get into the beginner's head.
- deleted 13y ago[deleted]
- bdcravens 13y agoSsh into your favorite cheap-ass virtual host This assumes you've setup your keys properly, and have a grasp of this already. If you're assuming prior knowledge and configuration, would the same be true of setting up your Heroku toolchain?
- snowwrestler 13y agoYou don't need keys to ssh.
- scott_karana 13y agoCheap-ass hosts won't need keys. They'll give you a hostname, username, and randomly generated password. Insert into Filezilla, and mission complete.
- gesman 13y agoPHP is popular because of it's simplicity, low cost (like zero) of entry and because of Wordpress. But the pay rate for PHP developers is miniscule because every Pakistani and Indian is a PHP expert for $1/hr. Try to post a $20 professional website job on Elancer - and in 10 minutes you'll get 20 lancers eating each other for your "business". So "thriving" is to be taken with a grain of salt.
- bdcravens 13y agoI don't think that's a fair evaluation of any language. I also don't see how Ruby or Node or Python don't have a zero cost of entry.
- saraid216 13y agoYou're forgetting Drupal.
- jmgtan 13y agoWell you want to avoid those freelance sites anyway regardless if you're doing projects using php or not. Making a good living building stuff is not even about what language you use, it's all about networking and how good you're talking with clients.
- efa 13y agoSo CGI means you hack directly in production? You don't need to set up a database? Don't have to test it? Don't version control your code?
- trekky1700 13y agoOne of the main reasons it continues to thrive is that any person with an idea looking to "make a website" will almost always first find PHP when searching. That's how I started with PHP. I had something I wanted to build, looked up how to make websites, and found PHP.
- endergen 13y agoThe workflow he lists for CGI/PHP is one where people work right off of the live server. This is no way to work when working on complex software. Typical PHP oriented hosting services are basically PaaS with MySQL and PHP good to go. Deployment, Staging, Package Management, etc are worth their weight in steps over the long run. Like a few people have mentioned, Boiler-Plate/Template projects are how many of us work around quickly bootstrapping a new project.
- lampe3 13y agomy thoughts too... working on the live server... Never do that!
- localuser 13y agoFor me no other framework or language can be compared the speed of deployment on php. If an idea I've got is simple and don't want to take weeks deving, LAMP is there to the rescue. For example I built (http://vinetuber.com http://vinetuber.com) in 3 hrs. But for bigger projects, I django.
- icedchai 13y agoPHP thrives because it is easy to deploy: upload your files and click refresh. When working with less technical people (designers who only know HTML, etc.) this is a great feature.
- jiggy2011 13y agoPHP also has a lot of very cheap hosting options, I have seen them advertised for as little as $3 per month. Trying to host rails for less than $10-15 is challenging. There's also a ton of complete software solutions available, like phpBB, vBulletin , Wordpress etc. The PHP industry offers more scripts for a one off $x download which can then be deployed via FTP by a non-technical person who doesn't know git. The rails/django ways seems to be to sell everything as SaaS. The upshot of this is that a non technical person can get something started with a PHP based system, so by the time they call a serious developer in to help there is already inertia.
- bingofuel 13y agoIf you include cheap-o VPS like DigitalOcean into the Rails hosting, then yes you can get it for $5. But then the money you're saving will go into setting up the instance.
- gedrap 13y agotl;dr; PHP is not that shitty nowadays thanks to the community, just Web Dev is too fad driven those days. I am writing something a bit against the current fad therefore I expect to find this post at the bottom when come back after dinner. When it comes to PHP, I always remember that when it comes to the tools, you can do almost anything with almost any other tool. And the flamewars are just waste of time. Many people say PHP is not elegant. Yeah, it's far from perfect. But have you written any PHP app recently? The answer is almost always no. The fact is that normally, you heavily use a framework and your interaction with 'naked' language is minimal. I mean, the shitty naming conventions (or lack of) and etc has minimal effect. Just here comes another problem, there are just a LOT of half-assed frameworks. And for some reason many devs like to roll out their own one. Usually not the good devs. But on the other hand, some frameworks are around for many years (well, in Web 5+ is many) so probably 99% of the issues you will have were faced by someone else already, and the solution will be in the first google result. In conclusion, no it's not perfect in some ways (nothing is perfect, anyway), but it lets you get the shit done very easily. I am just not one of the people who get religious about the languages. You use PHP? Cool. You prefer Ruby? No worries, that's fine for me!
- joewalnes 13y agoOP nailed it. PHP has similarities to Bash scripting. Language sucks. Syntax is awful. You wouldn't want to build anything big with it. You feel dirty and ashamed every time you use it. But... if you just want to get shit done, it's often the path of least resistance. I can live with the shame. By the way, Mike isn't just talking about PHP here. It also applies to CGI, ColdFusion, ASP, JSP and lots of other old technologies that make you want to cry. Basically anything where you have a web server and you can just drop executable scripts in a directory. Even though I rarely use PHP any more, I still write a lot of my Python and Ruby web-apps using classic CGI instead of the popular frameworks because it's just so quick and easy (and dirty). Deployment is a breeze, managing servers is simple and it's ideal for quick mashups. Been meaning to write more about this: http://helpmewrite.co/people/joewalnes/ideas#idea-1978 http://helpmewrite.co/people/joewalnes/ideas#idea-1978
- pessimizer 13y agoBecause the vast majority of PHP programmers began their programming journey by trying to post from a form built with static html, and worked their way down. In my experience (YMMV), they tend to lack the general programming concepts and practices that programmers who come from a CS/general computing (instead of web design) background are more likely to have, making it more difficult for the PHP programmer to move into another language. I think the pervasiveness of modern, complex js techniques in recent years have been eroding that situation, because (especially with the gentle on-ramp of jQuery), PHP programmers are forced to become good js programmers too. Right now that means that a lot of the parochial attitudes of PHP programmers end up in the js community - and you see that in node.js, but ultimately it means that those programmers become familiar with two extremely different programming paradigms, and that will make a third language a lot easier to learn. When not trapped, they will leave. I never understand the argument that PHP is an easy language (which this post doesn't suggest), though. PHP is hard because it is awful, and it's awful because it's hard. Consistency and lack of hidden state make things easier, at least for me. PHP is an easy language to put into production. Ruby is an awful language to put into production. I'm not even sure why the two get compared other than that Rails is supposed to be "easy" and PHP is supposed to be "easy." A better feature to use to compare Ruby and PHP is that both of them fall to shit pretty immediately at load unless you are so good at enough layers of the entire stack that you're running on that any ease of learning or using PHP and Rails will make a minimal difference to you.
- swalkergibson 13y agoI have a bone to pick with your last contention. At what load does the PHP runtime begin to become the performance bottleneck, particularly with APC enabled? As far as I know, Facebook is about the only application with enough load to test the limits of the PHP interpreter itself. I was under the impression that PHP itself is actually quite performant...
- pjmlp 13y agoFacebook runs compiled/JITted PHP code.
- wting 13y agoIs it faster to write a report in notepad or Word? Depends on your level of expertise. If you have none, then notepad is the faster. However if your job requires writing reports all day then learning to use Word is better in the long run. For a simple pages with no prior coding experience, PHP is the best tool for the job. However if you plan on building complicated web apps as a profession, then perhaps learning a better tool is worth it. For example, you can replace Visual Studio with PHP in this image: http://i.imgur.com/ghAccKb.jpg http://i.imgur.com/ghAccKb.jpg
- dinduks 13y agoYour comparison is invalid and irrelevant. You're comparing writing a simple PHP script on a remote server to deploying a full Rails app. Please do the same comparison with Rails vs Symfony/ZF and then we'll talk about it. When I used to be a Ruby developer, every time I heard that "PHP is easy to deploy", I made a less-than-one-minute demo showing how to create a Sinatra app from scratch and deploy it on Heroku is just few commands (any Sinatra dev here can do it).
- e-tron 13y ago"You're comparing writing a simple PHP script on a remote server to deploying a full Rails app" <-- the point is, Can you do that in rails?
- SeoxyS 13y agoI think this is a fallacy. Easy deployment has nothing to do with why PHP is still this popular; I think it has a lot more to do with PHP being beginner-friendly, in that when things break, they always semi-work as opposed to leaving the wannabe developer completely lost. For the sake of comparing, here's how I make a throwaway app super quickly in Ruby, almost equivalently to a PHP deploy: $ ssh server $ kenji init project # [1] $ cd project $ tmux # launch a background session, edit some code $ bundle exec rackup # in a pane next to my code Boom, brand new web-app is running on my server in less than a minute's work. [1]: This is a Ruby web-app microframework. https://github.com/kballenegger/kenji https://github.com/kballenegger/kenji
- jmgtan 13y agoI'm sold on php because of symfony, composer, and really good documentation of the language as well as the third party libraries. Been using NodeJS for quite some time, although I like it, I still have trouble looking for good documentation very no and then.
- wink 13y agoI think it boils down a little that for PHP you get php-fpm with the distro package and with Flask/Sinatra for example you have to * decide which *(c|s)gi package you want to use (thin, webrick, gunicorn, unicorn, puma, tornado, 100 more) * write your own supervisord/circus/god/whatever wrapper to make it restart automatically * fight rvm/virtualenv/chruby/whatever Notice a pattern? I can deploy a sensible, non-minimal php web app with "apt-get install nginx php5-fpm && scp" whereas I need already a decent amount of decisions for the other 2. With PHP deployment only gets complicated at a larger scale. With Python and Ruby web apps it's complicated from the start.