Slashdot Mirror


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."

39 of 155 comments (clear)

  1. I don't get it by digitalchinky · · Score: 2, Insightful

    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.

    1. Re:I don't get it by drdink · · Score: 2, Informative

      I believe the article is talking about the zoo of new OO features in PHP5. Unless you have or would like to have OO code, you really don't notice it other than some of the PHP internal functions being moved into classes. Take a look at the object oriented parts of the PHP Manual.

      --
      Beware, Nugget is watching... See?
    2. Re:I don't get it by hey! · · Score: 3, Interesting

      Unless you have or would like to have OO code, you really don't notice it other than some of the PHP internal functions being moved into classes.

      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.

      --
      Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
    3. Re:I don't get it by ERJ · · Score: 3, Insightful

      without stopping any browser for 15 seconds (java) while it does its thing.

      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.

    4. Re:I don't get it by eyeye · · Score: 2, Insightful

      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.


      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?
      --
      Bush and Blair ate my sig!
    5. Re:I don't get it by 'The+'.$L3mm1ng · · Score: 3, Insightful

      Once compiled, a JSP may actually respond faster than PHP without a compiler cache. A delay should only occur when the file is accessed for the first time. Which is usually done by the developer, though that surely makes me favour PHP over JSP. Having to wait a couple of seconds everytime you make a change sucks.

    6. Re:I don't get it by caseih · · Score: 2, Insightful

      No you don't get it. When people say "java" they mean programming the web sites in java on the server, not using java in the browser. You probably have used many java-driven web sites without knowing it, since the java runs entirely on the server and simply serves up web pages. The arguement is over whether php's feature set is becoming too much like java and thus pushing us into java-style techniques and frameworks for app design.

    7. Re:I don't get it by snorklewacker · · Score: 3, Informative

      > Having to wait a couple of seconds everytime you make a change sucks.

      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.

      --
      I am no longer wasting my time with slashdot
    8. Re:I don't get it by CoolCat · · Score: 2, Insightful

      How the hell does serverside java make your browser load for 15 seconds??

    9. Re:I don't get it by angel'o'sphere · · Score: 2, Insightful

      I don't get it either ....
      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 .... Java on the client and PHP on the server? Thats not the same league, granted .... but IMHO its not even the same game.

      angel'o'sphere

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    10. Re:I don't get it by Tet · · Score: 2
      Having to wait a couple of seconds everytime you make a change sucks.

      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...

      --
      "The invisible and the non-existent look very much alike." -- Delos B. McKown
    11. Re:I don't get it by chaves · · Score: 2, Insightful
      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

      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 logic and doing database transactions). Java has got a lot of momentum in the last 5-6 years. Making PHP more easily integrated with Java will enable it to fit into that picture, probably being a better choice than using Java itself for generating web pages. Not mentioning the huge number of Java libraries (for every application you can think of) - if PHP could call Java code without compromising performance, all those libraries would be readily available for use in PHP scripts.

      --
      Lose your sig in two weeks - ask me how!
  2. Bad writing by musselm · · Score: 5, Informative

    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

    1. Re:Bad writing by drakethegreat · · Score: 3, Insightful

      Exactly. For a good example, take spreadfirefox.com for instance. Currently there is an article about cnet's take on IE 7 and Firefox and Asa asks people to state their opinions for the media or others who might be reading this to get an idea about what the Mozilla Community is like. Well I was reading most the comments and every single one had a HUGE grammatical mistake. Now in most situations I don't proof read my comments such as a case like this but when someone tells me my comments will be read by a great number of people and influence the way Firefox looks to others then I would be a little bit more serious.

      Neways ya PHP is nothing like Java. I've been using it for 7 years and if they mean by OOP that its more like java then they aren't too clever because PHP isn't making OOP the required way of programming or anything. They are simply providing people with more options to program and they still allow people to choose what they want. People still find OOP scary it would seem and although there are arguments for an against it, I think its up to the individual if they want to use it and that seems to be the way the PHP development is taking it.

    2. Re:Bad writing by 0x461FAB0BD7D2 · · Score: 3, Insightful

      Because content is far more important than grammar.

      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.

    3. Re:Bad writing by musselm · · Score: 3, Funny

      Clippy is an editor for Devshed and Slashdot!
      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?"

      :)

  3. Popular direction != right direction by sfjoe · · Score: 5, Insightful

    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.
    1. Re:Popular direction != right direction by drakethegreat · · Score: 2, Insightful

      My guess is that a lot of them are people who got into PHP because they ran a simple static site so they went to PHP to make it dynamic and they don't know what programming is. 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.

    2. Re:Popular direction != right direction by Nos. · · 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 incredibly complex and bug free programs in PHP and/or other languages. I could make a statement that C programmers don't program with security in mind since we've seen so many buffer overflows. It doesn't make it accurate or even remotely true.

    3. Re:Popular direction != right direction by JimDabell · · Score: 2, Insightful

      Well, it's writing code to invoke a responce.

      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".

    4. Re:Popular direction != right direction by Anonymous Coward · · Score: 2, Insightful

      Pointing out the different between a program and a document is hardly pedantry.

    5. Re:Popular direction != right direction by Fletch · · Score: 2, Insightful

      "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.


      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?

    6. Re:Popular direction != right direction by aled · · Score: 2, Interesting

      I guess I'm going to flamed/modded down but...

      Isn't PHP the Visual Basic of this age? it's easy, it's dirty, it's quick to do simple apps.

      --

      "I think this line is mostly filler"
  4. I *like* the OO. by drdink · · Score: 4, Interesting

    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?
    1. Re:I *like* the OO. by ignatzMouse · · Score: 2, Insightful

      Exactly... and just as importantly it's easy to not use them if you don't want to. PHP used to have a pretty clunky object model. They improved it. So?

      --
      No artist tolerates reality. -- Nietzsche
    2. Re:I *like* the OO. by kawika · · Score: 2, Interesting

      PHP is seductive because it does let relatively inexperienced users generate dynamic content without too much of a learning curve. But from the description you give I think you are part of a very small minority of PHP developers at the other end of the spectrum.

      My own PHP experience is more like this. Perhaps that's because I had come from Perl, and as this comparison 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 higher-level problems. It is merely reinventing functions, object models, and syntax. Zend's focus on things that real users don't care about may reflect that as well.

      For example, PHP makes it trivially easy to insert dynamic content here and there into a page. If you want to separate business logic from presentation, which is almost manditory on a large site, you will want some sort of templating package. You will have to write your own. This is a common need, why shouldn't the core language address it? Because they are too busy reinventing object oriented programming?

    3. Re:I *like* the OO. by lphuberdeau · · Score: 2, 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, the key features of PHP 5 are:

      • New XML library, fully DOM compliant
      • New SOAP extension
      • New XML-RPC extension
      • Unified database API (PDO)

      An extension to use Java object has been available for quite some time but it seems they are improving it and .NET extension is experimental too.

      These features sure don't aim the average PHP user who simply uses include and a few conditions. I don't think it means it's bad to have em. They simply bring PHP at a higher level and offer a more complete solution to the developpers.

      --
      Qui ne va pas à la chasse n'a pas de gibier
      PHP Queb
  5. Zend wants to make money? by Ieshan · · Score: 4, Insightful

    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.

  6. Some points... by cmad_x · · Score: 5, Insightful
    In the Zend survey, 93% of respondents listed PHP as a primary language and 69% listed HTML.

    Since when is HTML a programming language?

    why would they put so much effort into making PHP a complex, object-modeled 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.

    As a matter of fact, 85% of PHP users were running Windows as their desktop operating system.

    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.

    A hypertext preprocessor doesn't require an object model as complex as Java, especially when hardly any members of the community use Java

    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 would Linus do?

    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
    1. Re:Some points... by T-Ranger · · Score: 3, Insightful

      HTML == Hypertext Markup Language
      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.

  7. What's with the hate.. by sporty · · Score: 3, Insightful
    People hate java 'cause it's overly verbose, but complain that languages like perl look like line noise.


    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

    1. Re:What's with the hate.. by afd8856 · · Score: 3, Interesting

      I nice choice is python. Really easy to learn, really powerfull, runs on jvm (jython), has extremely powerfull web development tools (zope & plone, that's what I'm using, but there are more), is a general purpose language, meaning you won't get stuck to just webdevelopment, and is "mainstream" enough to have bindings to any major library.

      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 most other cases. So I've switched to python & zope and now I'm already on my 3d contract (I work for myself) using these tools. I didn't knew about drupal or xoop back then and I was dizgusted with postnuke and phpnuke (I don't remember which one is supposed to be GPL but you're not allowed to remove the credits at the bottom. Haha!)

      So, if you're doing webdevelopment, do yourself a favor and visit plone.org . It might be tough learning it the first 2-3 months, but from there life is easy :)

      Sorry for my "Engrish", I'm not native speaker.

      --
      I'll do the stupid thing first and then you shy people follow...
    2. Re:What's with the hate.. by JimDabell · · Score: 2, Insightful

      So php is being pushed into an OOP direction

      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.

  8. PHP programmers by InsaneCreator · · Score: 4, Insightful

    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#. ;-)

  9. Zend broke latest version of PHP by mabu · · Score: 2, Interesting

    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.

  10. Something to consider by Laxitive · · Score: 4, Funny


    If a piece of shit flies west at 60 miles per hour, is it going in the wrong direction?

    -Laxitive

  11. The Driving Force by Ridgelift · · Score: 2, Interesting

    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?

    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 /. 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.

    "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.

    1. Re:The Driving Force by sribe · · Score: 2, Funny

      "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.

      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.)

  12. FUD by gabe · · Score: 4, Interesting

    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