Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Overview Level Java and JavaServer Pages Questions (Newbie)

Status
Not open for further replies.

baycolor

MIS
Mar 23, 2005
148
0
0
US
Hi,

My past development work has entailed a lot of Cobol programming on an ERP system and a lot of SQL coding in a data warehouse environment. Along the way I've had some exposure to HTML, ASP, C and VB but I have not done extensive work in any of those areas.

I've made a decision to become proficient at something new and Java and JavaServer is the choice.

My plan is to first go through Java 2 For Dummies and then I'm going to rewrite a small 3 screen application I developed in VB with an Access database.

I'm then going to go through Bruce Eckel's "Thinking in Java" - outstanding book by the way (
I have two questions as a newbie...

1)
I'm reading about how object oriented is "all about the data". And that describing your data or designing classes that represent your data allows for inheritance and composition etc... A couple terms I've seen so far. This all sounds really good and I see how it is extremely beneficial on the programming side but what I don't understand is at the end of the day your going to store your data in a relational database. So basically if you are doing a ton of stuff in an object oriented program using an object oriented methodology what happens when you have to store this new information? Maybe an example would be better...

If I have a house class which is nothing but a two floor house. And I have a subclass called two-bedroom-class. And I have another class called three-bedroom-class.
And now all of a sudden someone comes along and says I want a 4 bedroom house. Well now I have a new subclass of house with all different kinds of attributes. Now I may have to make a bunch of changes to my database to handle the storage of this new information.

Is the Java benefit purely on the programming side? Are there things that people do on the database side to support object oriented applications?

2)
Last step on my adventure is to learn about JavaServer pages so I can use Java on the web. Anyone have any recommendations for good tutorials, books etc... on this. I'm going to start with JavaServer for Dummies but I'm looking for a really good next book.

Comments are welcomed.
References to really high quality good books and articles (especially at the beginner to intermediate level) are much appreciated.

Thanks in advance
 
For JSP tutorials, see , and read anything by O'Reilly on JSP.

On the point of object-orientated design and databases ...
Basically, OO designed code and relational databases are incompatible from a design process. Databases (well, most) are relational - not object orientated. So if you have a stored procedure which accepts a set number of parameters, no matter how your java code is designed (OO or not), you will still have to pass those parameters in, and change them when your requirements change.

BTW, IMO, do not get sucked too much into the *OO Rules* game. Certainly, OO can have its uses, and is often a good design pattern, but its by no means the *only* way to do things, and can often end up in over-engineered code.

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Ok you obviously have "real world" experience with Java...

so if I take out the fact that Java is platform independent and costs almost nothing to get started with what would you consider to be the big benefit of Java and OO programming?

I know there is the reuse factor but I could create a block of code in VB that can be reused.

Maybe you can give me your quick 2 cents.

Thanks in advance - and that's my last question - I know this isn't a classroom.
 
Humm, that idea of Java costing almost nothing is a bit optimistic. It's not the hardest language to learn, but in my opinion is not immediate.

Of course you can write reusable code in almost every language. The benefits of OO programming use to come when the developments increase their size. Objects are way easier to reuse as they have published interfaces that make them usable without knowing the internal behaviuor, that's encapsulation.

Another advantange is that OO code uses to be easier to maintain, as you can just know of a little part, maintain it and rely on encapsulation of the other code, being maintained by another people or a third party product.

Anyway, in my opinion there's no "best choice at all".

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top