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

Discussion in 'Java' started by NickName, Dec 15, 2006.

  1. NickName

    NickName Guest

    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.
    NickName, Dec 15, 2006
    #1
    1. Advertising

  2. NickName

    Oliver Wong Guest

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

    "NickName" <> wrote in message

    > "
    > 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
    Oliver Wong, Dec 15, 2006
    #2
    1. Advertising

  3. NickName

    Wesley Hall Guest

    Re: Seeking some advice and/or pointers as to getting into web-basedjava application dev using Struts


    > 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.
    Wesley Hall, Dec 15, 2006
    #3
  4. NickName

    NickName Guest

    Thanks, see below.

    Oliver Wong wrote:
    > Disclaimer: I primarily do desktop apps in Java, not web pages, so I'm not
    > qualified to answer your question on Struts.
    >
    > "NickName" <> wrote in message
    >
    > [...]
    > > 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.

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


    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?

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


    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.

    >
    > - Oliver
    NickName, Dec 17, 2006
    #4
  5. NickName

    NickName Guest

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

    Wesley Hall wrote:
    > > 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.


    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.

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


    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
    ?

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


    I'll try to remember it. Once again I appreciate your valuable advice.
    NickName, Dec 17, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. yuyazhang
    Replies:
    14
    Views:
    703
    yuyazhang
    Apr 29, 2006
  2. Rachuru
    Replies:
    1
    Views:
    283
  3. MR
    Replies:
    2
    Views:
    166
  4. Guest
    Replies:
    2
    Views:
    138
    Bob Barrows [MVP]
    Sep 18, 2005
  5. Gavin Sinclair

    Seeking advice on some method names

    Gavin Sinclair, Nov 29, 2004, in forum: Ruby
    Replies:
    25
    Views:
    260
    trans. (T. Onoma)
    Nov 30, 2004
Loading...

Share This Page