PHP is the core web language because PHP devs (for the most part) are cheap, replaceable parts. You need to be smarter than that for mobile development, and anyone smart enough for mobile dev won't use PHP if they don't have to.
PHP is the core web language because PHP devs (for the most part) are cheap, replaceable parts. You need to be smarter than that for mobile development, and anyone smart enough for mobile dev won't use PHP if they don't have to.
I personally use PHP all the time, I love it. I can code large, maintainable and secure applications with far more speed than any other language I've ever used ( and trust me I've used a lot ). It's my language of choice when I'm building web applications.
Not only is it available everywhere! but it's been established for long enough that there are a wide range of top quality frameworks and libraries written for it. Oh and these have been written by developers who I'm certain are much smarter than us both.
And why the hell is mobile development any harder than web development. It's just code, not arcane magic. Trust me I've seen, and will continue to see, just as much badly written/badly performing code for mobile applications as I do for web based ones. Just because you're using Objective C / Java as the tool of choice doesn't make you any better or smarter a developer.
If there is a mobile offering coming up based around PHP, I'm looking forward to trying it. If it allows me the same benefits as the language does on the web then I'll be using it, regardless of how many people think that makes me "not smart".
I too am looking forward to what this new mobile PHP project will entail.
As such, you're basically wasting your own time trying to prove PHP haters are worse off.
It doesn't help that PHP's ubiquity has attracted its fair share of bad programmers. Maybe not more than other languages, but the human mind, when lacking available data, will make judgments based on absolute count (I.e. I know more terrible PhP programmers than I know terrible Go coders) rather than by ratio.
I started with PHP and did not enjoy the syntax, though I doubt I would be in web dev had PHP's stack on Dreamhost made it easy to make my first interactive apps. But I could never say that its conventions are conducive to good coding habits...but I have no place to judge, as I was a bad coder when I learned PhP and I may have been just as bad were I to start out with Python.
It is still immensely satisfying to write in any text editor <?php echo (2 + 2); ?> and then see 4 on your screen. And then to wrap that in HTML and really get going. No compiling, no libraries to include, that's it. After writing code in Java and C (12 years ago), that is a breath of fresh air, and that's what got developers of my generation interested in PHP.
Do you have more options today? Absolutely. Python and Ruby were extremely obscure back then. No longer. You have Node.JS and of course, good templating libraries for all of the above.
But PHP is a templating language at heart and it's still the easiest to embed into HTML and see immediate results. That's pure joy.
Funny part? None of my production PHP code touches HTML or any client side stuff in any way. It just pumps data from the database to the client-side JavaScript.
And it's still immensely enjoyable. Why? Because PHP is aimed at the lowest common denominator. It has to work for that dude in India and it has to work for the 50 year old guy who just decided to switch careers. Which means the base language has to be dead simple. And it is. It's pretty much C with a few web-centric functions thrown in. That simplicity is enjoyable.
That was part of the OP's point. "PHP's killer app is the LAMP stack and $5 hosting."
That option makes PHP useful in many cases where arguably better languages would not be smart choice.
But, without that same value in the mobile space, what's the case for using PHP over, say, Objective C or JavaScript or Ruby or Lua, other than not knowing Objective C or JavaScript or Ruby or Lua?
- Objective C: not a competitor as it doesn't do multi-platform, which I assume will be PHP's main angle.
- Javascript: weird OO model (compared to PHP's traditional OO), much smaller set of API's, typically tied to a web UI (PHP would probably wrap around native UI API's). Along with C# I consider this the strongest contender, but I can see why people would prefer PHP.
- Ruby, lua: does anyone actually use those on mobile? I'm sure they have their qualities, but those are really niche languages (on mobile). To me these are not serious competitors.
There's RubyMotion for iOS, and some JRuby->Android thing I haven't looked at in a while.
BTW, what about PHP's OO is traditional? Certainly not traditional like Smalltalk. JavaScript s probably better thought of as prototype-based, not OOP.
Exactly. It makes it a great first language too, since it's interpreted right off the bat for a LAMP stack.
I use PHP to develop for the web every day. Thus far, the friction of PHP being a bad language hasn't outweighed the utility of it being easy, though as time goes on that utility is worth less and less.
I'm sure you're perfectly capable of writing marvelous code in PHP or any other language.
I think you've perhaps gotten into the trap of assuming that if a programmer doesn't use the latest cool language (Ruby, Coffeescript, etc.) they are dumb.
And that's okay. But I'd strongly assert that "PHP is quick, easy and gets the job done" does not support the assertion "PHP is a well-designed language." From what I've seen, Laravel is as high-quality an MVC framework as anything you could find in another language. But if it's a truism that terrific coders can produce terrific code in any programming language -- and I think it is -- then "there is terrific code in PHP" is not a defense of PHP's language design.
No, it's not. You should maybe replace Laravel with Symfony 2.
I also touched ruby and python but I don't consider them part of my knowledge since I didn't really use them professionally and thats why I don't want to include them in my statement above.
But he uses it only because it's easy? Sounds like the very kind of developer he's trying to mock.
See, I can make ridiculous statements about things I don't know anything about too!
(note: I no next to nothing about NodeJS - I enjoy javascript as a language but haven't had a chance to actually use NodeJS beyond a couple tutorials)
That's not what I got from the comment (though, as an aside, I do think that there is a correlation between programming smarts and language/framework choice, adjusted for circumstances.)
It sounded to me that people pick PHP for assorted reasons, one being the surrounding support environment (cheap hosting, ease of slapping together a works-ok-right-now site, ease of finding replacement devs when needed). Another reason for choosing PHP, though, is because you don't have to have serious coding chops to make practical use of it.
OTOH, mobile dev requires at least some serious coding chops, and does not have the equivalent support environment for PHP. And if you have some decent coding chops you are likely to want to use a better-designed language than PHP.
Please, explain this in further detail. List out which languages are "smarter" and why. Please provide empirical evidence to back up this thesis and explain the methodology followed to gather and interpret the data.
Otherwise, stop saying ridiculous things that you can't back up.
In addition, please explain what about PHP makes it unsuitable for the mobile platform when clearly Java does just fine there. I'll need more then a link to the "fractal of bad design" blog post. I'm honestly curious why people continue to talk about PHP's bad design without really explaining what makes their chosen replacement better.
Please, get over yourself. I expressed an opinion. I wrote "I do think that ..." It's obviously anecdotal, based on personal and professional experience. YMMV and all that. Stop with the pretentious "back up this thesis" crap.
I'm honestly curious why people continue to talk about PHP's bad design without really explaining what makes their chosen replacement better.
I guess it's like porn. You know it when you see it.
I'd choose Ruby over PHP for Web dev any chance I could. I doubt I have the resources to prove to you why this makes sense. Such is life.
I did a few years of PHP work, then learned Ruby, and never looked back. What can I say. As far as a can tell the range of available libraries for each language is about equivalent. I can use JRuby and use any Java lib as well. Deploying and hosting Ruby or JRuby is quite easy for me. While Ruby is not flawless I am personally convinced is less sucky than PHP. Opinions may differ; it matters not to me.
If your experience is the the contrary, go forth and be happy in your choices.
I have a feeling I should link to some pg essay at this point, but I'm too tired to go find one. Besides, those who care will likely have already read it, and those who don't, won't.
Mobile is hard, but good (PHP) server side devs are not cheap or somewhat less valuable either.
$5? Try $0, how many ISPs provided 20~100MB of hosting with PHP and a MySQL instance to any of their client for no additional charge? Around here, pretty much all of them did.
Hell, just look at things like that: http://www.000webhost.com/ PHP, MySQL, 1.5GB space and 100GB/months bandwidth for $0. Want Ruby? Python? Perl? It'll be $5.
Examples include spawn true threads, truly use multiple cores with no "global interpreter locks" of any sort other than those explicitly coded in the native app, get at hardware accelerators on a platform, etc.
Unless Zend's idea is "bring localhost to your mobile phone," there are going to be a lot of hurdles to adoption.