[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Java database application development



Hello !

Le Lundi 11 Août 2003 22:15, Mirko Scurk a écrit :
> My goal is to use Debian linux as development platform for (classical 
> two tier) database (MySQL) applications. I thought that Java would be
> ideal for that purpose. Am I right? Is there better free tool (language)
> for development of such application that can run on both Linux and
> Windows? Are there any issues regarding Java's speed, printing or anything
> else that I should be aware of?

Well now, with modern machines and JVM (1.4+) you can easily create your 
application in Java. The only thing if there is some speed problem, you 
should use native threads intead of green one.

> I googled and ran through couple of books and sites to see how to start
> and now I'm facing problem: how to structure application?

What do you mean by structure ? You can use UML or any method else used for 
all object oriented programmation...

> I created a class named DataConn that reads connection parameters from XML
> file and than successfully connects to database. It's constructed as
> Singleton. I created object from that class on beginning of application.
> But now I don't know how to call that object (use created connection) from
> each new window (form) I open. My intention was to open connection to
> database at beginning of application and close it when application
> finishes. Is it good idea?

You just have to put some public methods in that class, and you create a 
global DataConn (final and public in a class used for your application global 
datas). Another solution is to used static methods so that there is no object 
but I don't recommand this solution.

> I appreciate any help or recommendation for site or book that will help me
> solve this problem!

That's kind of you ;) and I hope this mail had helped

Olivier



Reply to: