Zend Taking PHP In the Wrong Direction? 155
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."
Comment removed (Score:3, Insightful)
Re:I don't get it (Score:3, Informative)
Re:I don't get it (Score:4, Interesting)
Yes, this article struck me as a relgious rant. For example:
Zend has maneuvered PHP so that other companies who are in the enterprise software business consider it a legitimate language...
Surely, this is a good thing for PHP users, at least for their employment prospects. In any case, it sounds to me like they're following the "make simple things simple, make complicated things possible" philosophy.
WRT to Java, I'm not sure at all what the author's dislike of Java has to do with anything at all. It seems to me that having PHP as a presentation layer choice for hypertext processing in a Java system would also be a good thing.
Re:I don't get it (Score:4, Insightful)
Just to clear up what seems to be a more common misconception then it should.
The author of the article is not referring to client side java (applets) but instead to server side java (jsp, servlets, j2ee). Server side java returns html just like php, perl, asp it just uses java as the processing language.
Re:I don't get it (Score:3, Insightful)
Re:I don't get it (Score:4, Informative)
Solution: use jikes instead of javac to recompile your JSPs. It's blazing fast. I know resin makes this dead simple, but it should be doable on tomcat. Heck, resin will even automatically recompile your servlets and EJBs, deployment descriptors and all (if you use xdoclet for them). You hardly ever have to manually rebuild. It's almost as nice as using ASP.NET.
Re:I don't get it (Score:3)
Just having a compiler installed on your public facing production machine is a huge faux pas in the first place. Yes, it's possible to procompile everything before you deploy it, but it's a pain in the ass...
Re:I don't get it (Score:3, Insightful)
Java is not only something that runs as an applet in your browser - its a programming language that can run server side too, ever heard of JSPs or tomcat?
Re:I don't get it (Score:1)
Re:I don't get it (Score:1)
Re:I don't get it (Score:2)
I've never seen a PHP page or ASP.NET performing as well as JSP in identically pages.
And I bet, we both are right, each of the named languages can be very fast, if using in a right way and very slow if used a wrong way.
Most things tend be complex these days, you know...
Re:I don't get it (Score:3, Insightful)
Re:I don't get it (Score:2, Insightful)
Re:I don't get it (Score:3, Insightful)
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.
How can a browser be stopped for 15 seconds when you use Java on the server, like PHP?
Ah, you probably mean Java as Applet on a client?
But
angel'o'sphere
Re: (Score:2)
Re:I don't get it (Score:2, Insightful)
Are you talking about Java applets (and the time the VM takes to be loaded by the browser)? Java applets play a *very* minor role in today's Java picture. Java is used much more often on the server side, running in the web server (generating web pages as PHP does), or in application servers (implementing business l
Bad writing (Score:5, Informative)
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
Re:Bad writing (Score:2)
Re:Bad writing (Score:3, Insightful)
Re:Bad writing (Score:3, Insightful)
In any case, for those mistakes that have been corrected, you wouldn't know about them. It's only the mistakes that stand out, which skews the viewpoint.
Humans are imperfect. Even Clippy can't help sometimes.
Re:Bad writing (Score:1)
But good content with excellent grammar is far superior to so-so content with lame writing.
In any case, for those mistakes that have been corrected, you wouldn't know about them. It's only the mistakes that stand out, which skews the viewpoint.
But when mistakes stand out so boldly, it would stand to reason that more proofing/editing could have helped.
Humans are imperfect. Even Clippy can't help sometimes.
Aha! That explains it: Clippy is an e
Re:Bad writing (Score:1)
I suppose it has to do with getting the stories out asap.
Clippy is an editor for Devshed and Slashdot!
If that were true, all news articles would be in the form of letters.
Re:Bad writing (Score:3, Funny)
If that were true, all news articles would be in the form of letters.
"It looks like you're trying to bitch about grammar on slashdot again! Do you want some help?"
Re:Bad writing (Score:2)
Popular direction != right direction (Score:5, Insightful)
People who think HTML is a programming language really have no business setting the direction of PHP.
Re:Popular direction != right direction (Score:2, Insightful)
Re:Popular direction != right direction (Score:3, Insightful)
Thats my take but I wouldn't expect the php community (at least not the development part of it) to know what true programming is like. Well at least not a majority of it for sure.
I don't think categorizing a group of people's knowledge of programming based on a language they use is fair or in any way accurate. I know a lot of people who use a lot of different languages, including PHP. Just because someone uses PHP to create a dynamic webpage does not imply that they are not capable of writing incredibl
Re:Popular direction != right direction (Score:2)
I don't think categorizing a group of people's knowledge of programming based on a language they use is fair or in any way accurate.
Yo are right, but I dont think the post you refer to wanted that to imply. (The rest of your comment is quite fine as well)
IMHO the poster ment: typical first step programmers (some guy with a computer and basic HTML knowledge) probably chooses PHP because he has heared it is dead simple.
So, now consider one is writing a software to sell tickets for a collage sports stadiu
Re:Popular direction != right direction (Score:2)
Are you trying to sell PHP? I'd label the first program "Ticketseller basic". If you want "Ticketseller Advanced" you'll have to pay me a lot more money. And with the experence I've gotten from writing the first program, the second one should be a snap.
So, it looks like PHP is the gateway to riches, using your example.
Re:Popular direction != right direction (Score:2)
Was that a mistake or an insult?
Re:Popular direction != right direction (Score:2)
Was that a mistake or an insult?
Neither nor.
Should I read up the thread to see wether you allready said something and I probably missinterpreted you?
Or is you question a more general one?
Or do you think I insulted the imaginary guy who has chosen PHP?
Or did you want to say *I* made a mistake? If so which?
I don't get you I think
angel'o'sphere
Re:Popular direction != right direction (Score:2)
I referring to this... thought you might be having a laugh at the expense of the guy who chose PHP and considered HTML a programming language.
Re:Popular direction != right direction (Score:2)
I picked up a book on PHP and had functional website in 3 days. Took me a year to make it look good though...
Re:Popular direction != right direction (Score:1)
Re:Popular direction != right direction (Score:3, Insightful)
No it isn't. It's marking up text to describe the document structurally and semantically.
An HTML tag is merely the start of a structure, it isn't an instruction to a browser. Think "this is a paragraph", not "leave a vertical space"; think "this is a heading", not "increase the size of the text".
Re:Popular direction != right direction (Score:1, Troll)
Pronunciation: pi-'dan-tik
Function: adjective
1
2
3
Re:Popular direction != right direction (Score:2, Insightful)
Re:Popular direction != right direction (Score:1)
Essentially markup tells the browse what type of thing some text is - it says nothing as to what should be done with the text.
Of course, you can call this some form of instruction, but that would muddy the definitions.
Precision is nice
Re:Popular direction != right direction (Score:1)
Verbing weirds language!
Re:Popular direction != right direction (Score:1)
Sorry for the nitpick
Re:Popular direction != right direction (Score:2)
Simple enough...
Re:Popular direction != right direction (Score:1)
Re:Popular direction != right direction (Score:2)
Re:Popular direction != right direction (Score:2)
Re:Popular direction != right direction (Score:2)
Re:Popular direction != right direction (Score:3, Interesting)
Isn't PHP the Visual Basic of this age? it's easy, it's dirty, it's quick to do simple apps.
Re:Popular direction != right direction (Score:2)
That may be isn't a fault of PHP per se and can happen with any language but I think is common.
Re:Popular direction != right direction (Score:2)
That's dirty
Re:Popular direction != right direction (Score:3, Insightful)
People who think HTML is a programming language really have no business setting the direction of PHP.
The article says 93% listed it as a "primary language." Not, as a "primary programming language." You do know what the L in HTML stands for, don't you?
Re:Popular direction != right direction (Score:2)
The article is addmittedly poorly written, however, they do use the phrase, "primary programming language". From the 4th paragraph:
"For example, with the ability to list three primary programming languages, only 18% of respondents named Java. It was named a primary programming language, on average, 18 times out of 300 possible chances. "
No, I don't know what the 'L' stands for. Please tell me.
Re:Popular direction != right direction (Score:1)
Re:Popular direction != right direction (Score:1)
I *like* the OO. (Score:5, Interesting)
Re:I *like* the OO. (Score:3, Insightful)
Re:I *like* the OO. (Score:3, Interesting)
My own PHP experience is more like this [ukuug.org]. Perhaps that's because I had come from Perl, and as this comparison [tnx.nl] makes clear the two certainly don't have the same ideas about how builtin functions should be designed.
As it evolves, PHP isn't solving the
Re:I *like* the OO. (Score:2)
Not really. It's perfectly acceptable to put business logic in included classes and simply use simple PHP embedded in the page to do nothing more than output the results of that business logic.
You're kidding, right? That is flat-out wrong. There are loads of template engines freely available to everybody. Nobody h
Re:I *like* the OO. (Score:2)
Re:I *like* the OO. (Score:2)
There isn't really anything you need to know except what objects are available and what their interfaces are. The documentation [php.net] is good enough for that.
Re:I *like* the OO. (Score:2)
PHP has done everything within their power to make it easy for anyone to build their own templating engine; They've made it so prints can be inlined, they've made it so it has great database access including support for a core database (SQLite), they've made it so error reporting can be customized and everything can be sugar coated as deeply as you want.
Th
Re:I *like* the OO. (Score:1)
Because PHP is a templating package. You just have to have the discipline to use it as such instead o
Re:I *like* the OO. (Score:2)
I've never read the "PHP in Contrast to Perl" document before. Holy cow, I knew I hated PHP, but I couldn't quite put my finger on it. Thank you for this.
Re:I *like* the OO. (Score:1)
However, scandir() is only in PHP5, so in older versions I must do this:
And to ensure backwards-compatibility I would have to check if scandir is a function and use the right method. Or I could
Re:I *like* the OO. (Score:2)
Re:I *like* the OO. (Score:3, Interesting)
They survey was open to public a few months ago. There were no requirements to participate. I guess anyone seeking around the PHP world at that time could have participated. Are the results representative? Maybe.
With a better object model, PHP 5 does not only bring the capacity to do OOP, but also to have better interactions with other OO libraries and languages. Interoperability really is the keyword to remember for PHP's future and Zend is putting a lot of efforts that way. Other than the object model
Zend wants to make money? (Score:5, Insightful)
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.
Some points... (Score:5, Insightful)
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
Re:Some points... (Score:4, Insightful)
The question diddnt ask for "primary programming language" it asked for "primary language". There are (apparently, from the survey) pleanty of web designers whose primary langage is HTML who use PHP. Or, there are pleanty of PHP users whose primary system is HTML. The point is that a large chunk of the userbase of PHP are not "programmers", but web developers. Making PHP more like Java makes PHP easier to pick up and use for Java developers. Which is great, if you a Java developer, but most of the PHP users are first HTML hackers.
Re:Some points... (Score:2)
Actually, it is a non-touring complete declarative language [liv.ac.uk]. Not all languages need imperative style execution of the code from start to finish.
What's with the hate.. (Score:4, Insightful)
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?
Re:What's with the hate.. (Score:3, Interesting)
I love it, so I fully recommend it. Actually, I was programming PHP for my websites until I've realized that my knowledge and experience of PHP will not be usefull in
Re:What's with the hate.. (Score:2)
osCommerce has some ugly code if you are hunting.
Ruby all the way. Or perl. Or java.
Re:What's with the hate.. (Score:3, Insightful)
That's just it - it isn't. PHP has made significant improvements to their object model in the 4.x and 5.x versions for those people that choose to use it. Everybody who doesn't like object-oriented programming can simply carry on using their own style and it doesn't affect them at all.
Re:People Hate Java (Score:2)
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, t
Re:People Hate Java (Score:2)
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?
Re:People Hate Java (Score:2)
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
Re:People Hate Java (Score:2)
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
Re:People Hate Java (Score:2)
Re:People Hate Java (Score:2)
Re:People Hate Java (Score:2, Informative)
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.
Re:People Hate Java (Score:2)
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 ser
Re:People Hate Java (Score:2)
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.
Re:People Hate Java (Score:2)
See: basic rule of supply and demand.
Re:People Hate Java (Score:2)
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 se
PHP programmers (Score:5, Insightful)
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#.
Zend broke latest version of PHP (Score:3, Interesting)
Re:Zend broke latest version of PHP (Score:2)
Re:Zend broke latest version of PHP (Score:2)
I have an application that requires a function to access globals as if it were not local. I wish there was some easy way to do that, but I have not found any.
Something to consider (Score:5, Funny)
If a piece of shit flies west at 60 miles per hour, is it going in the wrong direction?
-Laxitive
The Driving Force (Score:3, Interesting)
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 (Score:2)
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?
Re:The Driving Force (Score:3, Funny)
I for one do not want to program in a language that feels like having my beard waxed
(I am about to take a look at ROR myself, but your analogy made me cringe and cover my face with my hands.)
Re:The Driving Force (Score:2)
Quite the contrary with me! I was like "Thought so, now I know I'm switching". And I believe you missed the point. It is not about a waxing procedure (that would be nothing but an advanced PHP solution).
Ruby is a genetherapy, that makes sure, you will never have to shave again, by removing the folicals from the facial area. The best, you can even choose, if you want to keep the h
Re:The Driving Force (Score:2)
You could not be closer to the truth.
Recently, our proffesionally paid VB programmer turned PHP wannabe copied and pasted the XML parser samples from php.net into our supposedly proffesional product. Needless to say, it got past QA, clients started using it. When they added additional XML entities not tested by QA, the Web Server crashed (this is an embedded Linux Box).
When I
Re:The Driving Force (Score:2)
Except there are free [php.net] alterantives [eaccelerator.net] to Zend's products.
Of course Zend is trying to make money. They're a company. Companies exist to create products and make money. Do you get on MySQL AB's case for selling commercial licenses?
i think so (Score:2)
FUD (Score:5, Interesting)
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 [devshed.com] Mr. Felton has written an article like this.
Re:FUD (Score:2)
Explain how adding a 'replace' parameter to the header() function from one version to another and making it default TRUE (when it used to be implicitly FALSE) is *not* going to break scripts that depend on consistent behaviour?
Well, hopefully they learned since then, but for me each PHP upgrade remains a little scary...
It's also not really pleasant to have your scripts dependent on the correct settings of php.ini.
PHP: Now with room to Grow. (Score:1)
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 registe
Funny this should come up (Score:2)
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
Some valid points (Score:2)
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 abstrac