Page 1 of 2

Java? C?

Posted: Mon Nov 21, 2005 1:54 pm
by Ree
I was wondering if it would be worth for me spending time learning Java. I guess Java might be an advantage to learn over C++, since you could use JSP even though JSP isn't that common compared to ASP .NET or PHP. I often see 'Java/C++ experience would be an advantage' in job ads, so I guess, knowing at least one of them would be an advantage. Java looks more geared towards web compared to C. What are the advantages Java has over C? Which one would you recommend learning? Any comments are welcome.

Posted: Mon Nov 21, 2005 4:31 pm
by Weirdan
Today C/C++ development are leaned towards the resource-intensive and hardware dependent tasks such as games, drivers, OSes etc while Java programming is more about implementing complicated (business) logic. Both are general purpose languages though, both share a lot of principles, both have very similar syntax.

Posted: Mon Nov 21, 2005 4:50 pm
by timvw
As Weirdan already said, it all comes down to your needs..

C is much more low level than Java. With Java you don't have to care about memory allocation, garbage collection, ... On the other hand, that might be experienced as too limiting.

JSP is not really Java. It is a meta language that is compiled to Java code. And then that Java code is compiled and executed by the Java Virtual Machine.

If you choose to explore the Java world i suggest you try out EJB3/Hibernate (ORM) and the Oracle Java ServerFaces. I'm pretty sure you'll be stunned by it's power :)

Posted: Tue Nov 22, 2005 3:50 pm
by Ree
I guess I'm going to spend some time on it. Which IDE do you recommend?

Posted: Tue Nov 22, 2005 5:22 pm
by Deemo
Eclipse. Hands down the greatest IDE for everything ever

It also has a C++ plugin and hundreds of others, so you can use that too

Posted: Wed Nov 23, 2005 6:54 am
by foobar
If you ever decide to use JSP, think twice.

I've used it extensively, and it's a pain in the ass with all its different tag-types:

Code: Select all

<% %> and <%= %> for general purpose
 <%! %> for snipets of Java code, such as function or variable definitions
<%@ %> for config settings and imports
Do yourself a favor and user servlets coupled with a template system (there are a few, but most of the one's I've come across are commercial). :?

Servlets can be extremely powerful if coupled with the cumbersome EJBs, which I wouldn't recommend anyhow. If you need modularity, just use regular Java Beans or classes. EJBs, at least the specification I used, were a pain in the buttocks.

Posted: Wed Nov 23, 2005 7:51 am
by Jenk
For Java, the netBeans IDE is the best.

I happened to start on Java, I would like to get into C++ as well, but that is purely a curiosity I wish to explore, I don't actually "need" to. :)

Posted: Wed Nov 23, 2005 11:06 am
by Ree
I was going to give Eclipse a go, but hey I'm not sure what I exactly need from the download list. What I know for sure is that I need JRE and Eclipse SDK. For now, my needs would be being able to write/compile regular Java programs and applets. Later I hope to try some server-side stuff. Do I have to download both JDT and J2EE Standard tools for that?

Btw, I somehow didn't find any system requirements for all this. :? I fear my system might be a problem here...

Posted: Wed Nov 23, 2005 11:34 am
by Weirdan
Btw, I somehow didn't find any system requirements for all this. I fear my system might be a problem here...
Eclipse worked well for me on Athlon1700/384MB RAM.

Posted: Thu Nov 24, 2005 9:16 am
by fastfingertips
As i know also Borland is providing a free tool to develop in Java. I also believe that beeing a experienced PHP programmer try to get first the basics of the OO technology, in this way i also think that you will learn faster working in PHP5 and after start to learn Java.

It will be easier for you to understand and play with since you may use Java to develop some web applications or to enhance your applications with
applets etc.

Posted: Thu Nov 24, 2005 9:45 am
by Deemo
Ree wrote:I was going to give Eclipse a go, but hey I'm not sure what I exactly need from the download list. What I know for sure is that I need JRE and Eclipse SDK. For now, my needs would be being able to write/compile regular Java programs and applets. Later I hope to try some server-side stuff. Do I have to download both JDT and J2EE Standard tools for that?

Btw, I somehow didn't find any system requirements for all this. :? I fear my system might be a problem here...
if you already have java installed, just download Eclipse 3.1, extract the zip file into a folder and run! no installation needed. Depending on your system it may take a bit longer to load (Java is a system hog in general) but you should be fine, i wouldnt be worried about it. Here is a JDT plugin for eclipse, so you can install that later. If you ever need anything else, you just google <plugin> eclipse plugin and you have a very high chance of finding it

and Jenk, have you ever tried Eclipse? Netbeans is very primitive and just downright bad compared to Eclipse :P

Posted: Thu Nov 24, 2005 10:06 am
by Jenk
I'll take a look tonight, if it's as good as you say I'll happily drop netBeans like a stone, I just really like the on-the-fly reference it has (ala VS)

Is Eclipse free? (I can't look now.. gay corporate firewall..)

Posted: Thu Nov 24, 2005 10:08 am
by neophyte
Elicpse is free.

Posted: Thu Nov 24, 2005 10:14 am
by Ree
Deemo: Thanks for the info.
fastfingertips wrote:I also believe that beeing a experienced PHP programmer try to get first the basics of the OO technology, in this way i also think that you will learn faster working in PHP5 and after start to learn Java.

It will be easier for you to understand and play with since you may use Java to develop some web applications or to enhance your applications with
applets etc.
I've been writing applets as well as regular Java/C++ progs before, I also use OOP with PHP as well, so OOP is not something I'm scared of, no worries about that. :wink:

Posted: Fri Nov 25, 2005 9:26 am
by Ree
I installed Eclipse and my first impression was 'Pretty cool stuff' :D. BUT... I ran it twice and both times it resulted in crashes: I was following the 'Hello world' tut and the first time I got 'blue screen of death' when simply navigating the class with cursor keys, the next time I got a nice 'Illegal operation' when closing the class file... WTF I say.