Tuesday, March 1, 2011

What is required for building Java Windows Application to access Online MySQL Database

Hello

Can anyone list the requirements (i.e. any books, tutorials, libraries etc) to build an application in Java, which could communicate with my MySQL Database which is running on web.

I am running an online webstore built in PHP and MySQL. I would like to build a Java Application through which I can (CRUD) Products, Categories, Orders etc.

My Database is already built in MySQL and all the data is present in my online site. So i only need to work on a GUI App which can access my Store's data.

Here is an example application built in Delphi which acts as a Front End (Store Manager) for oscommerce shopping cart.
alt text

What technologies do I need for creating Windows GUI in java and Database Application to communicate with my Online Store's Database. ?

I have found some tutorials:

hXXp://www.netbeans.org/kb/docs/java/gui-db.html

hXXp://www.netbeans.org/kb/docs/java/gui-db-custom.html

hXXp://www.netbeans.org/kb/articles/mysql-client.html

hXXp://www.netbeans.org/kb/docs/java/gui-db.html

Are the above tutorials enough ?

UPDATE:

How about the following books :

1). JDBC Practical Guide for Java Programmers
2). JDBC API Tutorial and Reference, 3rd Edition

Would these be enough for a beginner ?

From stackoverflow
  • also Java Swing tutorial or check out SWT if you prefer faster and more native looking UI

  • For the database communication you're going to need a JDBC driver for MySql.

    Check out the official Sun JDBC tutorial for details on how to use this to access your database.

    Ibn Saeed : Can you recommend any good book on this topic ?
    Brian Agnew : I'd look at the tutorial (I've just edited my original answer). Otherwise, I think there's an OReilly book on this
    Ibn Saeed : Just read the following at the first link you posted: ------ Although JDBC is useful by itself, we would hope that if you are not familiar with JDBC that after reading the first few sections of this manual, that you would avoid using naked JDBC for all but the most trivial problems and consider using one of the popular persistence frameworks such as Hibernate, Spring's JDBC templates or Ibatis SQL Maps to do the majority of repetitive work and heavier lifting that is sometimes required with JDBC. -------- Do I need to learn Hibernate or Spring as well ? or would JDBC suffice ?
    Brian Agnew : I don't think so for this. If you have an existing db schema, and are familiar with it, and presumably you have stored procs/queries etc. already fashioned for your existing application, then translating those into JDBC is relatively straightforward. Depending on the complexity of the objects you want to retrieve, you may want some automated solution to perform that mapping, but I would suggest trying it first, getting something working (with JDBC) and then see how much effort it is
    Ibn Saeed : What GUI technology should I use ? Swing or SWT with JDBC
    Brian Agnew : Shouldn't make a difference. That decision should be orthogonal to the database work
    Thorbjørn Ravn Andersen : For starters JDBC works find. Remember to have anything SQL related outside the GUI code.
  • Why don't you just use the MySQL tools directly or any Javabased database viewer? If it is only for you you will save quite a bit of time.

    DBvisualizer has worked well for me.

    http://www.minq.se/products/dbvis/

    Ibn Saeed : I did not understand your post. Can you elaborate please. How would DBVisualizer help me in building a Windows Application interacting with my Online MySQL Database.
    Thorbjørn Ravn Andersen : I was suggesting that if you were the only person working with your database and the database is small , it might be much easier and faster to do the work in a database interaction program than to hand code an application. If not, Netbeans has a tutorial on creating a CRUD application against MySQL - http://platform.netbeans.org/tutorials/nbm-crud.html

0 comments:

Post a Comment