[thelist] From PHP to...?

Candace Maynard candace_maynard at yahoo.com
Wed Feb 21 16:31:57 CST 2001


Hi!

I have to admit that my PHP experience is pretty 
limited, BUT I do have some good Java experience.
(There's this rumor going around that some people
will pay me lots of money to program in Java, but
it hasn't happened yet.)  :)

Anyway: you can almost think of Java as C++ for
Dummies.  It's good OO programming: encapsulation,
polymorphism, all kinds of big words I know. :)
Seriously, though, it is a good OO language.  PHP
isn't really OO, as I understand it.  I've worked 
with VBScript/VB in ASP, and I've been disappointed
with how poorly VBScript compares to Java in terms
of object behavior.  Java is also really secure,
so if you're worred about the security of your
server (theoretically, server-side scripts have
access to your entire server and could be made to
serve the Emperor), Java is a good way to improve
this problem.

Also: Java does a lot of things for you that C++
doesn't.  This means that a decent amount of 
flexibility was almost built right out of the
language.
Fortunately, you can get around these things.  You
just
need to know how.  If your background is in C++,
you'll know it when you see it.

One thing to be cautious of is the way Java actually
runs.  Here's what happens: Java code is written.
You compile it into bytecode.  When an application
is requested from the server, Java's virtual machine
interprets the bytecode line by line.  This makes it
slooooooooooower than C++ by a full Georgia luncheon.
When you stack class on top of class on top of class,
each parent class has to be called to reference the
child class.  This can get slow as well, since each
class' loader must also be loaded.

I don't mean to bog you down with detail, sorry. :)

Java is a great language.  Just remember that you
still
have to keep optimization in mind.  Therefore, you
will want to pay attention to how Java actually gets
compiled and read.

Books: hmm..."The Java Programming Language" is really
good.  Has a red brick on the front cover.. I'll send
you more info on it when I go home and look at the
author.

:)
Candace

--- Hendrik Mans <hendrik at mans.de> wrote:
> Hey list,
> 
> me again. :)
> 
> For the last four years or so, I've been building
> websites using PHP (before
> that, I was using good old lite and mSQL -- pain!),
> and I'm beginning to
> feel that I've reached a point where I should look
> at alternative web
> development platforms/systems/languages.
> 
> For example Java servlets, or whatever people call
> them nowadays. I admit I
> my Java knowledge is *very* limited (I haven't
> really had the time to look
> at it so far), but I'm pretty confident I'll be able
> to pick it up in a
> relatively short time.
> 
> So, to anyone on this list who knows both
> languages/platforms and possibly
> even made this jump him/herself before: can you tell
> me what changes (in
> terms of development paradigm) I can expect when I
> move from PHP to Java?
> Are there any "must have" books/HOWTOs/websites I
> should buy/read/know
> about? And, most importantly, is this jump actually
> worth it?
> 
> Thanks,
> Hendrik
> 
> "Madre de dios! Es el planeta de la mierda!"
> http://www.planetcrap.com
> 
> 
> ---------------------------------------
> For unsubscribe and other options, including
> the Tip Harvester and archive of TheList go to:
> http://lists.evolt.org Workers of the Web, evolt ! 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/




More information about the thelist mailing list