Zend Taking PHP In the Wrong Direction?
dvanatta writes "Is Zend taking PHP in the wrong direction? Ian Felton asks 'Why is PHP become more like Java, when the PHP developer community seems to
want anything but that to happen? What is Zend thinking?'" From the article: "Data from a Zend survey completed in June 2003 (when PHP5 was still in major development) showed that the characteristics of the PHP community didn't necessarily match up with what was developed in PHP5. For example, with the ability to list three primary programming languages, only 18% of respondents named Java."
I use PHP across a whole bunch of websites, including version 5 - how is it anything like java? Maybe I'm missing the obvious, but all the 'old' scripts I have still work pretty good - without stopping any browser for 15 seconds (java) while it does its thing.
(I did read the article too)
The future isn't here yet. It might not be all gloomy.
Come on.. ...):
FTFLOTFA (From the first line of the
"Why is PHP become more like Java..."
Give me a break. When this site links to articles as badly written as this one, it makes lots of people feel bad. Why can't devshed and other sites (including this one) do any damn proofreading or editing?
Thanks!
Andrew
In the Zend survey, 93% of respondents listed PHP as a primary language and 69% listed HTML.
People who think HTML is a programming language really have no business setting the direction of PHP.
It's simple: I demand prosecution for torture.
This article was a bit vague on the survey used to justify the entire article. Who were the people surveyed? Are they just people throwing up private websites, or are they people designing applications and featureful sites in PHP? I have written and currently maintain a fairly large project that uses PHP5's OO features quite extensively. The object oriented features are what makes PHP5 so great. It is easy to design and reuse code. I look forward to it being extended and expanded, assuming it maintains compatibility.
Beware, Nugget is watching... See?
I'm always puzzled by technology "insiders" writing about groups that are "destroying products" that "mainstream developers" want to use.
Reality check: "Mainstream developers" are people who a) pay nothing to use the software and b) have no product alliegiance whatsoever.
People are using PHP because it's useful and it's free. But being free doesn't help Zend in any way. They're changing the direction of the product slowly so that they'll eventually make some profit off of either PHP itself or PHP-addons using their server language / server engine.
My Philosophy: Unless you're paying for a product, or actively developing for the product, don't bitch when the people who *do* need money because they're the ones making the product decide they want to change it.
By the way, I use PHP quite a bit, and haven't really noticed that much of a difference from PHP4 to PHP5. Some small things, but nothing earth shattering.
Since when is HTML a programming language?
I haven't written anything in PHP5 yet, but from what I've seen, I wouldn't call it "complex". If they find it "complex", they should just stick to HTML.
Yeah, they may run Windows as their desktop OS, but that doesn't stand for anything. Sure, they might usually check out their newest scripts in their desktop, but they all pretty much end up in their server, which is probably running some *NIX.
So? As long as the engine doesn't become slow or very resource hungry, more features are always welcome; the new OO model might help someone write better (e.g. cleaner) PHP code. If you don't like the new OO model, then just don't use it.
What does Linus have to do with PHP? Why would be care what Linus would do, seriously? Also, about that section mentioning all Zend people driving fancy cars and stuff, and the company trying to profit. Of course it's trying to profit; it's a company! I don't know of any companies that don't have profit in mind. They make a good engine, so PHP is based on it. Are you telling me that that shouldn't have happened because Zend is a company? Think again..
My $0.02
People hate OOP, but complain about organization of code.
People hate writing the same things over an dover again themselves, but java has APIs for lots of things, so you don't have to do so.
So php is being pushed into an OOP direction, not a clean implementation, the APIs are being provided, ugly as they may be, and things were never unverbose/cryptic... so what's the problem again?
-
ping -f 255.255.255.255 # if only
Why is PHP become more like Java, when the PHP developer community seems to want anything but that to happen?
;-)
That's because most of the PHP programmers are uneducated writers of throw-away code. They are people who use PHP because they can make dynamic pages without needing to really learn anything; people who mix HTML and SQL; people who never bother to check for errors; people who think register_globals was a great idea, because they didn't have to type "complicated statements" like echo $_POST['somevar']; and the list goes on and on.
The most common argument I hear against PHP becoming more like Java is that now there are so many new things you need to learn. But this is not due to changes in the language making it harder to write crappy code - that's just as easy as it was before. The main reason for needing to learn new stuff seems to be the increasing number of competent programers in the PHP community who put pressure on the incompetent ones, who in turn pound their little fists on the table and cry that PHP is acquiring too many features from other languages. I'm sorry, but knowing the difference between "if" and "for" statements does not make you a programmer.
Ripping off Java is probbably the only real chance for PHP to be taken more seriously in the business world. After all, it worked for C#.
When we upgraded to the latest version of PHP, which also required a Zend upgrade, several of our applications wouldn't work. I have reason to believe there's a serious bug in the Zend engine which has crippled some functionality of PHP. We're still waiting for a fix so we can upgrade to a more secure version of PHP.
Which fruits do you like?
Apples
Oranges
Bananas
You can choose all three, or two, or one or none.
People hate java 'cause it's overly verbose, but complain that languages like perl look like line noise.
People hate Java because it's a language that was born of an advertising campaign and not a specific need in the technology field.
People hate Java because the technology has been caught in the middle of several commercial interests and platform wars, which has crippled the promise of Java's stability and reliability.
People hate Java because it's a lie. Java promised a new generation language that was to be cross-platform compatible, but it's actually less cross-platform compatible than C/C++.
People hate Java because it's slow as molasses. Need an example? Take a look at Puzzle Pirates, a very clever multiplayer online game, that because the developers were foolish enough to use Java, runs ten times slower than it should and is painful to use as a result.
People hate Java because it sucks. I'm sorry to those of you who are Java programmers and are finding less jobs, but no sane company wants to use this technology when there are other systems available that offer better performance, reliability and longevity.
If a piece of shit flies west at 60 miles per hour, is it going in the wrong direction?
-Laxitive
If such a small number of PHP users were involved with Java, what was the motivation to mimic Java's object model and move toward making PHP coupled to Java?
/. article. I'd be lying if I said it's been easy to learn. It hasn't. I'm not used to object oriented programming, and Ruby is pure OO. But even I can see at this stage of the game that Rails apps will be far easier to develop, maintain and make changes than similar code in Java or PHP. Rails still has performance hurdles to get over, but it's developing so fast that I'm sure it will match Java & PHP's speed (the framework's only been around for less than a year). Because Rails takes full advantage of the Ruby language, it's not something that will be ported to PHP or Java.
The Answer: MONEY.
PHP has become popular because it's easy to get started. Just cut and paste some scrap code in your HTML and you're in business. However, that same approach to building the language has led to a rat's nest of functions, without a whole lot of consistency. Although PHP's got one of the best documentations free on the web, in the long run if you scale your applications up you're going to need to put in a lot more elbow grease to make changes and maintain your code. Zend will be creating a market where maturing web applications will need the performance gains of their products.
So what's the alternative? I've been learning Ruby and the webframe work Ruby on Rails after reading a recent
"Give 'em the razor, then sell 'em the blades" That's PHP and Java. Magically remove facial hair so you never have to shave again, that's Ruby and Ruby on Rails.
Ruby on Rails Screencast
Is there really that much of a chance that Zend will offend enough PHP'ers that this could be a big boost for Ruby on Rails or any other open source alternative to PHP?
Also, would it be accurate to presume that ASP.NET on MONO is not something of interest to PHP developers, but more of an alternative to J2EE folks?
i used to be big into php4, i used it as my primary programming language for over 4 years. i don't like where zend is taking the language and have never used nor am i interested in 5. instead of making the language better they're just adding more junk onto it.
This article is FUD, pure and simple.
Everything added in PHP 5 has no effect at all on the casual or professional PHP programmer. They can go about writing their code exactly as they did with PHP 4, and PHP 3. That's because the PHP Group (the folks that develop the PHP product, not Zend) work very diligently (to some peoples' dismay) on ensuring as much backwards compatibility as possible.
All of the (very useful) OOP technology added in PHP 5 will help to push PHP into the enterprise market and allow business to build large apps using PHP. It's certainly not everything the enterprise will need, but it's a start. NONE of these additions make it any more complex for a PHP 4 user. ALL of the additions help make it possible to create well-designed web applications, though.
I used to have some respect for devshed.com because they always had interesting articles. The articles were a useful resource and quite helpful. I just don't understand why they're posting whining rants like this which do not help anyone in any way. Let this guy post it on his blog and be ignored like he should be.
Sadly, this is not the first time Mr. Felton has written an article like this.
Gabriel Ricard
I write PHP for a living, and started out as a basically 100% incompetent scripter who just knew HTML. I took a couple of programming classes at a community college (including a Java class) and then leveraged my minimal programming training to use PHP to do useful things with my weblog.
I went from being able to hardly even be able to put together a minimal Java program, to being able to do a huge amount in PHP. It was great, I got to write little referrer aggregators and blog quizzes, I even used register_globals! Ahhhh, those were the days.
Now I write some fairly robust applications in PHP, and sometimes it's useful for me to take a portion of the most complex business logic and have a more feature-rich object model to create it in. No options have been taken away from me, however, and there's not a single thing I can't do in PHP5 that I used to be able to do in PHP4.
Only now I have some things I always wanted: a better XML handling library, file and directory iterators, try/catch if I want it...
In a way, PHP was ALWAYS modeled after a C/Java-like syntax, and for me it felt very natural for it to move a little more in this direction. I can't understand what direction people would be hoping it went in? Perl?
Slices, dices, eats your lunch.
The one thing that I think PHP needs is optional typing and type checking (like Visual Basic on Objective C) and a consistent exception model (right now only PHP5 classes throw exceptions (the rest just make errors or return false), and there is no way to automatically turn all of the old PHP error situations into handlable exceptions (heck, even a single PHPException type would work!).
PHP is at a crossroads, and the best way to go is to an optional strict typing and exception handling approach such as the one used by Objc and VB. It would retain backward compatability while allowing for significant optimization. It would also prevent a ton of dumb errors that result from variable scope related semantic errors and other semantic errors that should be syntax errors.
Amazing magic tricks
I have to say it: This guy makes some valid points. There, I feel better now. Seriously, while I don't agree entirely with his article (not by a long shot), I also don't agree with any of the posts so far either (which could all be summed up as "he disagrees with us, don't listen to him!").
He makes very valid points about PHP's current weak points, which no one actually responded to in their comments, especially his mention of Unicode support. Proper date support is another biggie. A unified DB abstraction layer should have been added a long time ago. These are basics I had years ago when I used to write in Perl. Not only are they still outstanding issues in PHP, the core of PHP is too busy adding nifty little OOP features, ignorant of the real needs of the community. This is a VALID complaint! (The fact that these could all be solved by looking more closely at Java is a point I find slightly ironic, given the pro-Java/anti-Java polarity around here)
PHP finally getting a real OO system is dandy and all, but PHP's API has started to stink like an old dog. Function naming and parameter ordering inconsistencies could have been fixed for PHP5, with the backwards-compatible functions being marked "deprecated" so that by PHP6 they could be retired for good. PDO or something similar (just give us the basics -- add the gravy later!) should have been a much bigger priority. PHP's Unicode support is shameful. SimpleXML is a good start, but it still only puts PHP at runner-up (maybe we'd be a leader if it came 2-3 years ago).
I hate to say it, but there's a jealousy that rises in me when I look to languages like Ruby and projects like Rails, and I'm unable to join due to my coding activities being tied to 100,000's of lines of PHP code. I'm even more jealous of them after seeing the reaction of the community at a legitimate complaint.
Now to defend Zend for a moment: Of course a business has their profitability to consider when steering the software they rely on. That's not unethical, and as a user you should be aware that that's the case. However, it's not Zend's responsibility to single-handedly create PHP -- we all do it together. And doing it together means that we, the community, dropped the ball.
PHP has not been innovative for a number of years now. Projects like Ruby on Rails and Perl's Maypole, they are.
putfwd.com - 1GB Free file storage with a twist
Your response implies that Java is somehow a superior language. Well, some of us disagree. Here are some talking points:
* OOP has not been proven objectively better, and Java does not make non-OOP programming very easy.
* Java is staticaly-typed, and some feel that dynamic typing, or even type-free, makes one more productive and the code more readable. Even many OO fans will agree that OO is not always the right paradigm for some cases.
You might like Java personally, that is fine. But please don't imply that it is scientifically better.
Table-ized A.I.
I accidently put some of the OO issue in the wrong bullet point (dynamic typing). These are generally orthogonal issues. Sorry about that.
Table-ized A.I.
1. You only have to look at PHP code repositories to see that people very often use OO programming, even when it is not helpful to do so.
2. PHP4's object model was poor - lacking encapsulation, for example. It needed improvement.
What should PHP's developers have done? Invent their own object model, or copy a successful one from elsewhere? Thankfully, they did the latter. PHP5 objects will be familiar to those who work on JSPs; and most PHP4 code will run with few, if any, changes. Best of all, those of us who do most of our PHP without ever using an object can continue in that mode.
What more does the author want?
If Zend really did ignore PHP users, as the author suggests, the users would fork PHP - that's the beauty of open-source.
If you consider yourself 'good', be glad there are bad programmers or you would be mediocre.
Cleaning up code is a pain, but at least when word gets out that a 'real' programmer is in the midst, you have job security.
My experience, at least.
I keep hoping that PHP would add named parameters, and also provide optional parameters without warning messages popping up. (You can disable the warning messages, but it affects other things also in unwanted ways.)
I would rather PHP focus on adding named parameters rather than twinking its OO model.
Table-ized A.I.