Java? C?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Java? C?

Post 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.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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 :)
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post by Ree »

I guess I'm going to spend some time on it. Which IDE do you recommend?
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post 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
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post 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.
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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. :)
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post 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...
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Post 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.
fastfingertips
Forum Contributor
Posts: 242
Joined: Sun Dec 28, 2003 1:40 am
Contact:

Post 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.
Deemo
Forum Contributor
Posts: 418
Joined: Sun Jan 18, 2004 11:48 am
Location: Washington DC

Post 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
User avatar
Jenk
DevNet Master
Posts: 3587
Joined: Mon Sep 19, 2005 6:24 am
Location: London

Post 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..)
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

Elicpse is free.
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

Post 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:
Ree
Forum Regular
Posts: 592
Joined: Fri Jun 10, 2005 1:43 am
Location: LT

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