I 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…
shameless 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.
Why PHP continues to thrive in the age of the PaaS
61–70 of 102 posts
Re: Why PHP continues to thrive in the age of the PaaS
#62When 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!
Re: Why PHP continues to thrive in the age of the PaaS
#63PHP 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
Re: Why PHP continues to thrive in the age of the PaaS
#64PHP 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…
And Drupal, Joomla, Magento, SugarCRM, CiviCRM, WebERP .....
Re: Why PHP continues to thrive in the age of the PaaS
#65Earlier quoted context omitted.
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 no…
> Requiring a professional is a flaw, not a virtue. Don't you think that depends mostly on whether there are professionals available?
Re: Why PHP continues to thrive in the age of the PaaS
#66Ssh 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?
Insert into Filezilla, and mission complete.
Re: Why PHP continues to thrive in the age of the PaaS
#67I 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.
Re: Why PHP continues to thrive in the age of the PaaS
#68He 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?
OP 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…
Re: Why PHP continues to thrive in the age of the PaaS
#69For 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:
Re: Why PHP continues to thrive in the age of the PaaS
#70Earlier quoted context omitted.
I 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.
The 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 c…