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.
If a piece of shit flies west at 60 miles per hour, is it going in the wrong direction?
-Laxitive
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.
It's a language similar to cobol in purpose, w/o a lot of the features of cobol that make it harder to work with. One of the main purposes of java is to provide a more OOP like language, though it does fail in some resepects in comparisons to true OOP languages like python and ruby. It's very clear to read vs something like perl due to the simple language rules.
Over the years, the 10 or so years, the language has become quite stable and what not. Scalability is an issue due to the garbage collector, but just like any language, you learn not to do things in an odd/bad way, you can work with it well.
It's cross platform on the largely used platforms. Not as an excuse for sun. It's just so. It does suck. Uh.. the end
Don't go looking at the graphics aspect. It's an anomoly of slowness among the things it does fast. It's also slow in object creation. But it is fast on execution of code. Stuff like the HotSpot feature in JVM can optimize on the fly..
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.
-
ping -f 255.255.255.255 # if only
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?
People who hate Java generally don't understand much of Java. You're an excellent example. You hate Java for the wrong reasons. That's dumb.
There are actually quite a number of valid reasons to dislike Java and to prefer php. You don't list a single one. At least hate it for the right reasons. As to explaining why you are wrong is a waste of my time. Sorry, I'm not in the idiot reducation business.
Jilles
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
Wow...you know nothing about Java, do you? I'd be willing to bet that you've never done any significant development in Java. As others have said, there's plenty of valid critiques of Java to be made, and you've made none of them.
.NET may emerge as a worthy competitor, but all the scripting languages are poor substitutes that perform significantly slower than Java.
People hate Java because it's a language that was born of an advertising campaign and not a specific need in the technology field.
This couldn't be more wrong. Java was created as a means for allowing platform-independant application development. Sun was doing fine in the server arena, but wasn't able to break into the desktop market because of the inertia that Microsoft had when it came to developers. We (developers) built software that ran on their (users) computers, and that was DOS/Windows. When it launched, Sun marketed it like crazy for obvious reasons, but that doesn't in any way mean that it wasn't addressing a specific technical need.
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.
No, people hate applets because of Microsoft's successful resonse to Sun's attempt to position its product between developers and MSIE. Microsoft's non-compliant JVM and the resultant incompatabilities essentially killed applets (which weren't the greatest idea to begin with), but they did nothing to kill Java's prospects as a whole.
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++.
Really? I find that I rarely have to make *any* modifications to the wars I develop for them to be deployed on whatever platform I'm switching to. Far more often, the modifications I have to make are due to deploying on a different AppServer. When I develop desktop applications, it's trivial to make them work on any platform supported by Java. Oh, and I don't have a single #ifdef in my code. Since I can't think of a single type of program that would be difficult to program in way that the jar file would run unedited on any of Java's supported platforms, would you mind providing an example?
People hate Java because it's slow as molasses.
Umm...1999 called, they'd like their argument back. Seriously though, for most of the desktop apps I write, users have no idea that its written in Java. Swing is a bit slower than native widget calls since it renders each component itself. But Java GUI != Swing. SWT apps are almost indistinguishable from native apps speed wise. People who judge SWT by Eclipse's performance ignore the fact that Eclipse is a huge application which introduces a ton of bloat above the SWT level.
In the server arena, there's just nothing better suited for building large, enterprise-scale web applications.
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.
Ooh...a single example of a (probably) badly-coded java game. That really shows that Java is slow. I've got Azureus running right now and it doesn't seem slow. I must have just proved that Java is fast, right?
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.
Ok, name one. Make the argument that it is better suited for a certain purpose than Java. Aside from game programming and perhaps AI or number crunching type applications, I can't see how you'd be all that successful. And if you want to believe th
"Don't blame me, I voted for Kodos!"
People hate Java because it's a language that was born of an advertising campaign and not a specific need in the technology field.
Wrong. It was born to a specific need (to be used in settop boxes) but it overgrown it quickly.
Actually it fits very nicely in my work for a good language, safe, portable, binary compatible, with lots of libraries and high level.
If you have other requeriments good for you. Lots of people find it useful.
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.
Lots of people use it without stability problems. Do you have any actual, real problem?
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++.
Do you use a platform that doesn't have a Java implementation or are you just trolling?
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.
While some Java applications, usually desktop, may be slower than native ones, server applications don't. In my P4 PC I don't really see any difference between native and Java.
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.
"suck" is not an argument. Most probably means that you are a troll.
"I think this line is mostly filler"
It's a language similar to cobol in purpose, w/o a lot of the features of cobol that make it harder to work with.
What?? do you have any idea of Cobol and Java or you just trolling?
Let me ask:
a) What features of Cobol does suposedly Java has?
b) why do you say they are similar in purpose?
c) harder to work than what?
"I think this line is mostly filler"
2. They are more business like languages than practical languages for other purposes.. i.e. C for OSs and embeded systems, glue/expressive languages like perl, ruby and what not. This is not to say that languages like ruby and perl can't be used for other reasons, they can work well for other things.
3. OO has its strengths, and its the way the world is headed for business like function. It's not the end all of everything, but people like OO. Java also has a huge backer, Sun. c++ came in between somehow, but people are moving away from c++. due to the pointer stuff you can do? due to writing more hybrid stuff? the lack of standards for c, the underlying language? who knows. But it's great to be able to blame someone when something goes wrong. Sun is a good company to blame and have support contracts with.. at least it used to be...
-
ping -f 255.255.255.255 # if only
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
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. I programmed a little cobol a couple of years and I can assure you there isn't the least similarity about the two. In fact Cobol (and RPG) programmers usually choke on Java, is very alien to them. Take a look at the syntax, it's based on C.
2. Java is a general language that found it's way into enterprise systems because of its features (platform independence, standard database api, binary compatibility, etc). It was originally developed for embedded systems and is based on C/C++. It was supossed to be a better C++ than C++, without all the clutter, no pointers, no templates (at least until 1.5), etc.
There are imaging system, databases, compilers, interpreters (like a python interpreter), games, editors all made in Java.
It fullfiled it original purpose somewhat because of its common use in cellphone, mainly for little games.
Exercise for home: Try to do a game in Cobol.
3. I don't really understand your point. You don't like business, OO, Sun?
Java is used to replace C/C++ in apps than don't require low level access. For example: why do I need to manipulate pointers to make a webpage? clearly java, php, even vb are better suited to the task. Is personal taste what one is more productive with. That doesn't meant that other options are bad.
"I think this line is mostly filler"
I don't hate sun, java or oo. m'thinks you are preaching to the choir :)
-
ping -f 255.255.255.255 # if only
as I sayed may be I really didn't understand your point ;-)
"I think this line is mostly filler"
all the large scale high priced developer jobs are for J2EE
See: basic rule of supply and demand.
...you might as well have been studying Old English.
.NET is still unproven, but might eventually prove to be a viable alternative on Windows servers (which I still just don't feel comfortable using in a production environment.) Like it or not, J2EE works really well in this context. There are so many frameworks and tools that are easy to integrate that building complex application logic becomes quite easy. For example, I just don't see how you'd easily emulate the functionality of something like the Spring Framework as an add-on library to C++. Don't get me wrong, it could be done, but it wouldn't be nearly as easy as it is in J2EE.
Linguistics, but I'll give you points for being close.
The problem I have with Java is that it really IMO, doesn't have any specialty.
Ok, so what would you suggest for a large-scale, server-side programming environment. PHP/Perl just aren't able to allow you to tackle the complexity that Java allows.
And before you pigeon-hole me as being a Java-only kind of programmer, I should tell you that I did plenty of programming in C while in college and I've had jobs where I programmed primarily in C++ and I'm fluent in Perl and PHP since I use them to program sites at hosting providers (Java and J2EE just don't work in a shared context like the one provided by most webhosting providers.) I like Java because I enjoy programming in it more than any other environment. It takes care of all the mundane details well leaving me to only have to worry about the logic I'm implementing. The only other language that comes close is Python, but it's really hard to find work as a Python programmer.
"Don't blame me, I voted for Kodos!"
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.
Given the context, PEAR.
Media that can be recorded and distributed can be recorded and distributed.
-kfg