This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes A really beginner question here. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "A really beginner question here." Watch "A really beginner question here." New topic

A really beginner question here.

Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
Ok. Let me start by saying that I am an experienced programmer (14 yrs. mainframe assembler) and for the last 2 years I have been doing web development using Cold Fusion, ASP, JavaScript, HTML, and others. I have recently been drafted into a project at work that entails creating a very large application in JAVA. Needless to say that, although we are finally going to get some training in next week, no one on the current team has any JAVA experience. Being a procedural programmer, I have no earthly idea as to where to find the correct method or class to do anything with. My "intellegence challanged" question is:
:roll: How do you know what class does what?
Even reading the API listing from Sun is just as confusing. I'm only now seeing {from a distance} what classes and methods are, and I just can't seem to grasp what does what. Is there an easier way to learn this? Is this somthing you just pick up as you go or what. I look at examples and such, but I just can't seem to make the connection yet.
Anyway, at least some of you will get a good laugh at this and humor helps the day go by.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Welcome to JavaRanch!
It's always very nice to have an experienced programmer join our community.
Please review The JavaRanch Naming Policy and change your display name accordingly.

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
It would seem to me that your basic question could be: So, just what is this Object Oriented programming thing?
Bruce Eckel has provided his book Thinking In Java as a free download. He assumes an ability to "think in C" (I'll assume your procedural programming experience is more than adequate) though I learned a lot from reading it without any previous programming ability.
Otherwise, a few free on-line tutorials on Java (while very basic) describe the concepts of objects and methods well:
Introduction to Programming Using Java by David J. Eck - Chapter 5, Section 1 - Objects, Instance Methods, and Instance Variables
Introduction to Computer Science using Java by Bradley Kjell - Starting with Chapter 25 in Part 4.
Good Luck.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Originally posted by SGSmoot:
How do you know what class does what?

After writing a few programs and studying Java a bit, one soon appreciates the value of the API documentation and recognizes its organization.
Every now and then, though, someone will come up with a method and not know what class it belongs to. In which case, my preferred method to find the method (alert repetition: time to refactor ) is to use NavigationZone to search the API for the method.

Anyway, at least some of you will get a good laugh at this and humor helps the day go by.

No way! This forum is here to answer beginner questions just like this one.
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
I think this meens that I need to invest in more No-Doze... Tutorials online are great, but I need LOTS of examples (and an easier IDE. My "team" has decided to use Websphere Studio as our development tool. Please pray for me). My head keeps meeting the Keyboard when I'm not coding.
I've already downloaded Eckel's book, as well as the one he has on C++ (thought it would help) and have been looking at that as well. I guess it's just going to take a little (ok, a lot of) time and mis-compilings to get it right. I will also look at the others as well.
(p.s I did change my name. )
[ April 18, 2002: Message edited by: Sam Smoot ]
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
More thoughts:
For help on using WebSphere you might want to mosey on over to The IBM/WebSphere forum (and perhaps the IDE's and other tools forum).
For learning Java, you might want to check out The Cattledrive.
Good Luck.
[ April 18, 2002: Message edited by: Dirk Schreckmann ]
Joel Cochran
Ranch Hand

Joined: Mar 23, 2001
Posts: 301
I too come from an entirely procedural background and I understand your question perfectly. Unfortunately, I don't really have an answer...
To clarify for anyone who may not know where we are coming from: my procedural language is RPG, a very powerful and old business programming language. RPG has approximately 100 "opcodes". These are all the things that the language can do inherently. Of those 100, I would guess about 30 are commonly used. I am oversimplifying, but as far as actions within the code go it is a fairly straightforward language.
Now, compare that to Java. The API lists over 1500 classes and interfaces, most of which have numerous methods, and the actions that can be performed number in the 5-6 digit range. Impossible to know them all, unlikely that you would ever have to!
Enter the API. I know you are getting a lot of advice to read the API but it appears confusing and foreign. Well, it is! But if you are like me, after a lot of grinding and hard work, the light bulb just flipped on one day and now using the API is commonplace.
I whole heartedly recommend the Cattle Drive. Read some books, write some code. Most importantly, keep at it!
Best of luck,
[ April 19, 2002: Message edited by: Joel Cochran ]

Wait a minute, I'm trying to think of something clever to say...<p>Joel
William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 984

Check out "Java Cookbook" by Ian Darwin. Instead of trying to learn the API first - which is painfull, this book gives lots of great examples of how to code real life problems. That way you learn the API by using it.

Please ignore post, I have no idea what I am talking about.
Cindy Glass
"The Hood"

Joined: Sep 29, 2000
Posts: 8521
AH - another mainframe programmer converted to the light. Well, maybe not quite yet . . .
I am an old mainframe programmer from way back . . . well, we don't need to get into that. The conversion from procedural to OO is a MUCH harder leap than from spaghetti code to procedural. It took me the longest time to stop trying to map things back to the way they are on a mainframe.
And to attempt your first project without having at least ONE OO person to help with the design . . . I hate to say it but - this is NOT going to be pretty. You can pretty much could on the result be procedural code wrapped up to look sort of OOish. Which means of course that you will not get all the benefits of OO which are driving you in this direction to begin with.
However, it WILL be a great learning event .
So - do you have any summary of what the project is about? Anything that we can help you with - besides getting familiar with the API (which is intimidating to say the least).

"JavaRanch, where the deer and the Certified play" - David O'Meara
Sam Smoot
Ranch Hand

Joined: Apr 18, 2002
Posts: 238
Basically, get XML from a front end, verify against a business model / rules set from DB2, manipulate options in DB2 table (on Mainframe) through EJB's, and then pass XML/HTML back to the browser...
Piece of cake (or patty, actually).
[ April 22, 2002: Message edited by: Sam Smoot ]
Danish Shaukat
Ranch Hand

Joined: Nov 16, 1999
Posts: 340
Hi !
Here 's your question "How to assign responsibilities to methods and classes ".

For this purpose you need to have knowledge of Object Oriented Analysis and Design. As you wil be starting a project on Java, so UML will certainly be used and its really easy.
Try reading the book "Applying UML and PAtterns" by Craig Larman.
This will help you. It teaches all about OOA and OOD and UML.
It is sorta covered in the JavaRanch Style Guide.
subject: A really beginner question here.
Similar Threads
Which part of java do you know 100%
Wait() and Notify()
incorportating 3rd party libraries
Spring security on file downloads
Where do you go after core Java?