Seeking some advice and/or pointers as to getting into web-based java application dev using Struts

N

NickName

Hi java gurus,

I've fairly new to java but have had considerable experience in
developing web-based, database-driven applications. Now, I'd like to
get into web-based, database-driven java application development using
Struts. Did some googling on the topic for a high level (conceptual)
description/writing on this particular topic, did not find exactly
what I'm looking for, but
found the following info is of interest:

"
0) OS
1) Java 2 Software Development Kit, version 1.4.1 or later
(downloadable from http://java.sun.com/j2se/downloads.html)
2) Tomcat 5.0.16 or later (from http://jakarta.apache.org/tomcat/)
3)Struts 1.1 or later, as obtained from
http://jakarta.apache.org/struts/
4) A powerful Java and JSP development tool such as JBuilder, WebSphere
Studio, or Eclipse (a free IDE downloadable from
http://www.eclipse.org/downloads/)
5) SQL Server, Oracle, or another relational database accessible via
JDBC (database can be running locally or remotely)
"
I took the liberty to add numbering for easy reference. The first take
for me is figure out how the above 5 "things" work together, then,
start to learn more about them. I need your seasoned opinioin on my
understanding of them, here goes:
0) OS: my OS is Windows XP
1) This is the development language and its supporting tools (very CORE
:)
2) This is the hosting server (web server) for application(s) developed
using num 1
3) This is the development framework, that would help to develop better
quality software
4) This is the tool, e.g. JBuilder, that is used to develop app using
num 1 language within num 3 framework. Once an app is developed,
deploy it to num 2
5) This is the backbone of any modern app (data, data, data stored in a
relational environment)

A bit further,
0)
1) What core java language elements/classes that I must get familar
with for my goal, understand, the java tutorial of HelloWorld etc. but
that does not really fit into what I intend to go after, for instance,
I don't care about how to creat a frame or like, for web app it would
be HTML form ...
2)
3) How to learn about Struts not by its own docs (I don't like its
layout / how information is presented)?
4) Any other idea other than its online help doc?
5) How to get to more "meat" part of JDBC other than some simple query?

Any other thoughts along the line would be appreciated as well.

Many thanks.
 
O

Oliver Wong

Disclaimer: I primarily do desktop apps in Java, not web pages, so I'm not
qualified to answer your question on Struts.

NickName said:
"
0) OS
1) Java 2 Software Development Kit, version 1.4.1 or later
(downloadable from http://java.sun.com/j2se/downloads.html)
2) Tomcat 5.0.16 or later (from http://jakarta.apache.org/tomcat/)
3)Struts 1.1 or later, as obtained from
http://jakarta.apache.org/struts/
4) A powerful Java and JSP development tool such as JBuilder, WebSphere
Studio, or Eclipse (a free IDE downloadable from
http://www.eclipse.org/downloads/)
5) SQL Server, Oracle, or another relational database accessible via
JDBC (database can be running locally or remotely)
" [...]
2) This is the hosting server (web server) for application(s) developed
using num 1

Yes, but the fact that Tomcat was written in Java isn't very
significant. You could have had a webserver developped in C++ which might
have done the job just as well, or a different server written in Java which
doesn't support JSP or servlets at all.

[...]
4) This is the tool, e.g. JBuilder, that is used to develop app using
num 1 language within num 3 framework. Once an app is developed,
deploy it to num 2

Right. They're called IDEs, or Integrated Development Environments, and
most programmers will use one at some point in their career, if not during
the majority of their careers. You said you had a lot of experience in web
development. Can you elaborate on that? If you done ASP.NET, you must have
certainly ran across Visual Studio at some point. If you did mainly PHP,
then you might have got by with only notepad or textpad or some other simple
text editor. Basically, an IDE is a very, very, very fancy text-editor,
designed specifically for programming.
5) This is the backbone of any modern app (data, data, data stored in a
relational environment)

Most web-apps will use a database, yes, but most desktop apps won't. A
good hanful of them do, but I think the majority just use custom built data
structures.

[...]
1) What core java language elements/classes that I must get familar
with for my goal, understand, the java tutorial of HelloWorld etc. but
that does not really fit into what I intend to go after, for instance,
I don't care about how to creat a frame or like, for web app it would
be HTML form ...

To do web stuff with Java, you basically need to learn J2EE (Java 2
Enterprise Edition). Usually, we recommend people to get very comfortable
with J2SE (Java 2 Standard Edition) first, as it's easier to learn, and once
they become comfortable with J2SE, they can move on to J2EE. J2SE is mainly
for desktop apps though. If you want to somehow "skip" the J2SE stuff and
jump straight into J2EE, I'm not sure what the best path is for doing this.

[...]
4) Any other idea other than its online help doc?

If you're willing to spend the time to learn J2SE, you might want to use
the IDE known as BlueJ. BlueJ was designed for students learning Java, so it
should be fairly easy to use, but it's not very suitable for web
development. Once you learn how to use an IDE via BlueJ, you'll probably
have no problem figuring out Eclipse or any of the other IDEs.
5) How to get to more "meat" part of JDBC other than some simple query?

I don't think there is much more to JDBC than that. JDBC is basically a
standard so that you can write queries in a standardized way, and different
databases should all react the same way, as opposed to dealing with the
specific quirks of each DB individually. Assuming you know SQL, I don't
think you really need to know what's going under the hood to use it, anymore
than you'd need to know how NTFS works when you try to save a file to disk.

Note that JDBC is not itself the database. It's merely an adapter or
connector to a database. You'd still need to download and install, for
example, MySQL to actually host the data, and then use JDBC so that your
Java code can talk to the MySQL server.

- Oliver
 
W

Wesley Hall

A bit further,
0)
1) What core java language elements/classes that I must get familar
with for my goal, understand, the java tutorial of HelloWorld etc. but
that does not really fit into what I intend to go after, for instance,
I don't care about how to creat a frame or like, for web app it would
be HTML form ...

Firstly, you should be familiar with OOP. A good understanding of the
various Java concepts is required to be able to understand Java library
API docs and this is pretty much an essential skill if you want to learn
new Java based technologies (such as struts). I would strongly recommend
spending a reasonable amount of time writing pure J2SE code before
attempting J2EE.

You will want to be familiar with the classes in the java.lang and
java.util packages as an absolute minimum as you will encounter these
frequently.

2)
3) How to learn about Struts not by its own docs (I don't like its
layout / how information is presented)?

There are many many books on struts. An Amazon search should prove fruitful.

It would be a good idea to create some simple Java web applications
using simple JSP pages etc first. Struts is a framework that helps to
solve common problems with pure JSP applications, if you have
experienced those problems first hand, you will have a much better
appreciation for what struts is actually giving you. Plus, once you can
do this, you can be sure you have the basic skills required to become
competent with struts.
5) How to get to more "meat" part of JDBC other than some simple query?

Once you have the OOP and basic Java skills then you will be able to use
the API docs to understand what you can do with JDBC. You may also
decide that using an ORM tool (like hibernate) would suit you. In the
same way that struts helps solve common problems with pure JSP
application, tools like hibernate help solve common problems with JDBC.
 
N

NickName

Thanks, see below.

Oliver said:
Disclaimer: I primarily do desktop apps in Java, not web pages, so I'm not
qualified to answer your question on Struts.


[...]
2) This is the hosting server (web server) for application(s) developed
using num 1

Yes, but the fact that Tomcat was written in Java isn't very
significant. You could have had a webserver developped in C++ which might
have done the job just as well, or a different server written in Java which
doesn't support JSP or servlets at all.

Well, if the web server does not support JSP application then it won't
fit in this setting.
[...]
4) This is the tool, e.g. JBuilder, that is used to develop app using
num 1 language within num 3 framework. Once an app is developed,
deploy it to num 2

Right. They're called IDEs, or Integrated Development Environments, and
most programmers will use one at some point in their career, if not during
the majority of their careers. You said you had a lot of experience in web
development. Can you elaborate on that? If you done ASP.NET, you must have
certainly ran across Visual Studio at some point. If you did mainly PHP,
then you might have got by with only notepad or textpad or some other simple
text editor. Basically, an IDE is a very, very, very fancy text-editor,
designed specifically for programming.

Yeap, IDE, the term slipped away from me.
Most web-apps will use a database, yes, but most desktop apps won't. A
good hanful of them do, but I think the majority just use custom built data
structures.

Desktop app is not my business.
[...]
1) What core java language elements/classes that I must get familar
with for my goal, understand, the java tutorial of HelloWorld etc. but
that does not really fit into what I intend to go after, for instance,
I don't care about how to creat a frame or like, for web app it would
be HTML form ...

To do web stuff with Java, you basically need to learn J2EE (Java 2
Enterprise Edition). Usually, we recommend people to get very comfortable
with J2SE (Java 2 Standard Edition) first, as it's easier to learn, and once
they become comfortable with J2SE, they can move on to J2EE. J2SE is mainly
for desktop apps though. If you want to somehow "skip" the J2SE stuff and
jump straight into J2EE, I'm not sure what the best path is for doing this.

Interesting to know "J2SE is mainly for desktop apps though." and too
bad I still would have to invest in it in order to get to J2EE, hmm ...
[...]
4) Any other idea other than its online help doc?

If you're willing to spend the time to learn J2SE, you might want to use
the IDE known as BlueJ. BlueJ was designed for students learning Java, so it
should be fairly easy to use, but it's not very suitable for web
development. Once you learn how to use an IDE via BlueJ, you'll probably
have no problem figuring out Eclipse or any of the other IDEs.

Well, in my current work environment we use JBuilder, any sort
feature/function change/addition of current application/utility
"requires" using JBuilder. Does it still make sense in investing BlueJ
as well?
I don't think there is much more to JDBC than that. JDBC is basically a
standard so that you can write queries in a standardized way, and different
databases should all react the same way, as opposed to dealing with the
specific quirks of each DB individually. Assuming you know SQL, I don't
think you really need to know what's going under the hood to use it, anymore
than you'd need to know how NTFS works when you try to save a file to disk.

I know what JDBC is.
Note that JDBC is not itself the database. It's merely an adapter or
connector to a database. You'd still need to download and install, for
example, MySQL to actually host the data, and then use JDBC so that your
Java code can talk to the MySQL server.

You missed the part in my OP that says I've done quite a lot of
database-driven web application dev in the past, which would imply my
knowledge of relational db and SQL.
 
N

NickName

Great advice, many thanks, see below for further questions if I may.

Wesley said:
Firstly, you should be familiar with OOP. A good understanding of the
various Java concepts is required to be able to understand Java library
API docs and this is pretty much an essential skill if you want to learn
new Java based technologies (such as struts). I would strongly recommend
spending a reasonable amount of time writing pure J2SE code before
attempting J2EE.

I can google for OOP concepts. On "writing pure J2SE code", for web
app or desktop app or it does not really matter? Any pointer on this?
You will want to be familiar with the classes in the java.lang and
java.util packages as an absolute minimum as you will encounter these
frequently.

Great. Will dig.
There are many many books on struts. An Amazon search should prove fruitful.

As suggested, will deal with it later in the process.
It would be a good idea to create some simple Java web applications
using simple JSP pages etc first.

Have sort of tried this, successfully connected to a SQL Server 2000
-based database via JDBC, had a form field for query/search input,
processed the request (ran a SQL query) and presented the query result
set. And actually all in one JSP page vs. the usual totorial's two
page process.
Struts is a framework that helps to
solve common problems with pure JSP applications, if you have
experienced those problems first hand, you will have a much better
appreciation for what struts is actually giving you. Plus, once you can
do this, you can be sure you have the basic skills required to become
competent with struts.
Forgive me for being lazy (I thought I read about Structs quite a while
ago), if memory serves, the key value of it is kind of like this,
BETTER in:
*) code re-use
*) future/new application function addition/editing (Maintenance)
*) reliability
*) scalability
?
Once you have the OOP and basic Java skills then you will be able to use
the API docs to understand what you can do with JDBC. You may also
decide that using an ORM tool (like hibernate) would suit you. In the
same way that struts helps solve common problems with pure JSP
application, tools like hibernate help solve common problems with JDBC.

I'll try to remember it. Once again I appreciate your valuable advice.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top