4 Replies - 16912 Views - Last Post: 05 July 2009 - 05:00 PM Rate Topic: -----

#1 Ibn Saeed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-July 09

Requirements for building Java GUI to access MySQL Database

Post icon  Posted 04 July 2009 - 02:23 PM

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

I am running an online store 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. So i only need to work on a GUI App which can access my Store's data.

Also, is it possible to build a small Windows Popup Ballon , which could appera and inform me whenever a new order has been placed on my shopping cart.

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

Posted Image

Posted Image

Posted Image


Posted Image


I only need a direction/path(i.e. any books, tutorials, libraries etc) to take in order to build an application like the one posted above.

This post has been edited by Ibn Saeed: 04 July 2009 - 02:23 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Requirements for building Java GUI to access MySQL Database

#2 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Requirements for building Java GUI to access MySQL Database

Posted 04 July 2009 - 06:41 PM

Google JDBC MySQL
would be a good start even
Google JDBC MySQL tutorial
returns 190,000 results
Was This Post Helpful? 0
  • +
  • -

#3 Ibn Saeed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-July 09

Re: Requirements for building Java GUI to access MySQL Database

Posted 05 July 2009 - 12:28 AM

View Postpbl, on 4 Jul, 2009 - 05:41 PM, said:

Google JDBC MySQL
would be a good start even
Google JDBC MySQL tutorial
returns 190,000 results



So I only need to learn JDBC to build a GUI Desktop Application in Java ?

I have no experience with building a GUI App in java or building a Database App in Java ? Where do I start ?

I searched Google and I found the following tutorials, please let me know if i am on the right track:

Step-by-step tutorial on how-to develop the Java Desktop Graphical User Interface (GUI) applications using NetBeans IDE with database

Quote

In this series of three parts, we will learn how to build Java desktop GUI application that connected to MySQL database. This tutorial is quite long containing a lot of screen snapshots to make it as details as possible. The original tutorial can be found at netbeans.org. All credits must go to the original authors.

http://www.netbeans....ava/gui-db.html





Creating a Custom Java Desktop Database Application

Quote

This tutorial guides you through the creation of a complete desktop database application that enables its user to browse and edit customer records and purchase history. The resulting application includes the following main features:

* A main view that enables users to browse customer records and customer purchases.
* A search field for the customer records.
* Separate dialog boxes for entering new records or modifying existing records.
* Code to interact with multiple related database tables.

http://www.netbeans....-db-custom.html




Making a simple MySQL client in NetBeans

Quote

NetBeans has a nice interface to connect DB, but many SQL commands are to be input as a whole sentence I made Swing application for inserting and viewing data to a table of MySQL database. The sample is very simple, available for one specific table and without deleting or updating operation

http://www.netbeans....sql-client.html





Using Hibernate in a Java Swing Application

Quote

In this tutorial, you use the NetBeans IDE to create and deploy a Java Swing application that displays data from a database. The application uses the Hibernate framework as the persistence layer to retrieve POJOs (plain old Java objects) from a relational database.

The application that you build in this tutorial is a companion administration application for the DVD Store web application. This tutorial covers how to create an application that allows you to query an actor's profile based on the match with first name or last name. If you wish you can extend the application to query film details and to add/update/delete items. This tutorial uses MySQL and the Sakila database, but you can use any supported database server with Hibernate applications.

http://www.netbeans....te-java-se.html






Building a Java Desktop Database Application

Quote

This tutorial shows how to create a desktop Java application through which you can access and update a database. The tutorial takes advantage of support in NetBeans IDE for the following technologies:

* The Java Persistence API (JPA), which helps you use Java code to interact with databases.
* Beans Binding (JSR-295), which provides a way for different JavaBeans components to have property values that are synchronized with each other. For example, you can use beans binding to keep the values of cells in a JTable visual component in synch with the values of fields in an entity class. (In turn, the entity class represents the database table.)
* The Swing Application Framework (JSR-296), which provides some useful building blocks for quickly creating desktop applications.

We will create a database CRUD (create, read, update, delete) application with a custom component used for visualizing the data (car design preview).

http://www.netbeans....ava/gui-db.html



Are there any Books I should read ? Do I need to learn Hibernate or Beans or JPA etc.
Was This Post Helpful? 0
  • +
  • -

#5 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8332
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: Requirements for building Java GUI to access MySQL Database

Posted 05 July 2009 - 04:44 PM

View PostIbn Saeed, on 4 Jul, 2009 - 11:28 PM, said:

So I only need to learn JDBC to build a GUI Desktop Application in Java ?

Not true... you need to know how to build a Java GUI... you can look for Swing tutorial
But you are kind of heading to a wrong direction

There are 3 components in a Java, actually in any application:
- the data
- the GUI (or might be a console application)
- the business rules (jow you manage the data)

These 3 elements should be separated as much as possible

The part that handle the database (or the flat files) where the data is kept should be as independant as possible from the 2 others
The part that handle the business rules and the GUI should have the same independance

That means that the business rules part shouldn't know if the GUI is a GUI or a simple console mode application
the business rules part shouldn't know if the data is kept in a database or in flat files

You shuld be able to build your application using:
- console mode UI
- flat files for data
- business rules

the day you change your flat files for a Database... you shouldn't have to change anything in the 2 other parts
same thing applies if later you switch from MySQL to Oracle

same thing applies in your user interface. If you change it from console mod application to a full blown Swing GUI, you shouldn't have to change the part of your application that handled the business rules stuff

So your question about GUI accessing MySQL is fundamentaly wrong :D
You should build a part that access MySQL (not knowing if behind it is a console mode application or a GUI)
You should build a part that is a GUI (not knowing how the data is handled)

and then build a bruidge to link the data part with the UI part
Was This Post Helpful? 2
  • +
  • -

#6 Ibn Saeed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 04-July 09

Re: Requirements for building Java GUI to access MySQL Database

Posted 05 July 2009 - 05:00 PM

View Postpbl, on 5 Jul, 2009 - 03:44 PM, said:

You should build a part that access MySQL (not knowing if behind it is a console mode application or a GUI)
You should build a part that is a GUI (not knowing how the data is handled)

and then build a bruidge to link the data part with the UI part



This is exactly the kind of information i was looking for. Thanks for clarifying the path for me.

1). So I will learn to build a GUI, without learning any bridging, just building a GUI for Windows, using Swing. I will start the books on Swing

2). Then I will learn to acess MySQL with JDBC.

3). Then merge the above two together.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1