Online Java application - confused!?

Associate
Joined
23 Aug 2004
Posts
1,493
A couple of years ago I created a pretty crude Java app built on a MySQL backend. I had a pretty poor user interface that allowed the user to search the database.

I was looking through the project the other day and it does have some merit, for a challenge I was planning on revisiting the requirements and programming a second iteration.

This time I would like the program to be web-based and accessible online. I do not have experience of creating an online application so some of the territory is unfamiliar and I'm looking for some advice.

My understanding is as follows :

Database is server side.

java app is downloaded by the client (how?), provides connection to the database.

GUI programmed in Javascript, allows user to enter search term and display results.(search and results handled by Java app)

Does this seem reasonable? The area where I'm most confused is the Java app. I've not created any online before, is there anything that would need to be done to the code for it to run in a browser rather than through an IDE such as eclipse when the client logs on to the website?

Thanks
 
I think you've mixed a few concepts up.

You'd have the database, and then provide an API in Java (so a few classes that actually 'do' the thing you want - so in your case, connect to the DB, parse/query results etc etc), and then you'd provide a Java applet in which you could build a GUI much in the way you would a traditional swing app. But you'd be better off looking at Glassfish and JSP. So you'd write your HTML/CSS website, and then within that you could make calls to your Java API using JSP. Applets are pretty much becoming obsolete apart from where they're truly necessary.

So a few things to Google:
+ JSP How-to
+ Glassfish simple web app how-to
+ Java API fundamentals

That should get you on your way :)
 
Last edited:
Netbeans is the best IDE (imo) for this sort of project - you can build web apps and deploy them to a local Glassfish server in no time at all.

Spend some time really learning about how to develop APIs, what they're for etc (if indeed you're not already 'au fait' with them).
 
Back
Top Bottom