once you know PHP5, all the Java examples make sense

by Derek Sivers

Related link: http://www.zend.com/php5/andi-book-excerpt.php



I've been prejudiced against Java ever since the early days on the web on my Mac, where any web page that included a Java applet would crash my browser. Years later, any web page with a Java applet makes my hard drive churn for 8 seconds, freezing the computer until it loads Java into memory I guess, just to run a stupid mouse-hovering menu on a website. So of course this experience made me think of Java as some ridiculous stupid bloated language.

(Plus Java was often mentioned with that word "enterprise" that always makes me run the other direction, because you know the suits are near.)

Being a guy that just makes websites, I always ignored (or scoffed-at) Java. But as I was learning the object-oriented style of programming, most of the examples were in Java.

PHP5 comes out, and I get to know it and love it. Then I realized as I'm reading Java examples in articles and books - they all make sense now! PHP5 is just similar enough to Java that if you know PHP5, you can at least understand Java.

Reading Robert Kaye's language musings, I'm feeling that PHP5 also fits the praise he's giving Python : the power of Java but much faster to type. I'm very very impressed with PHP5.

8 Comments

kalim1998
2004-11-17 10:21:19
Servlets != applets
Wow! At least show that you know something about J2EE. Applets are NOT servelts (which reside on the server and thus cannot be in your web browser).
dereksivers
2004-11-17 10:53:21
Servlets != applets
>> At least show that you know something about J2EE


I don't know a damn thing about Java and don't claim to. My post was just saying that at least I can start to understand Java examples in OOP books, even though I only know PHP5.

vikdavid
2004-11-17 11:25:07
java perceptions
Wow, that's a long time to hold a grudge against Java. Applets on Macs crashing? :-) I'm sure you realize, but you've unknowingly enjoyed the benefits of Java (er "enterprise" Java) countless times without realizing it. It's just everywhere.
yogimind
2004-11-17 14:04:53
servlets or applets?
A servlet wouldn't be any different than a cgi, or php page in its response . . . do you maybe mean an applet? curious
yogimind
2004-11-17 14:06:35
servlets or applets?
woops . . . I just logged in and now there are comments under the posting. There were none before. Sorry for the redundant post :-).
kalim1998
2004-11-17 21:08:07
Servlets != applets
Unfortunately, you blamed "servlets", which are a very robust, really cool way of generating serverside stuff for the "sins" of earlier "applets".


I don't know much about PHP (other than all the code of it i've seen so far look like spaghetti ;-), but its comparison would be more like JSPs (Java Server Pages), or perhaps the Java frameworks like Struts, an open source implementation.

dereksivers
2004-11-17 21:11:45
Servlets != applets
Yes I wrote Servlets by mistake, but corrected it to Applets within 1 hour of posting.


Take a new look at PHP5. It's not just for inserting into HTML anymore.


See my link, up top, for a good example.

rick73
2004-11-30 15:35:11
Servlets != applets
There is a sentence in your article which really made me shout "what the hell is he talking about???!!!! How can he call him self "a guy that just makes websites"??!!! Does this guy know what web developing is all about??


That sentence says: "Plus Java was often mentioned with that word "enterprise" that always makes me run the other direction, because you know the suits are near.
Being a guy that just makes websites, I always ignored (or scoffed-at) Java"...


Brrrrr...!!!!!!


I think you should stop and take a good time to think about the meaning of "programming languages (aka Java, C/C++, Delphi, Assembler, ecc..)" and "scripting languages (aka PHP, ASP, Python, ecc..)"