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

Re: Java database application development





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?

All languages have pro's and con's. You should choose a language based on how comfortable you feel with it and how appropriate it is for the type of projects you are working on. IMHO you wont find anything 'significantly' better than java for cross-platform development where databases and networking (web & XML) are involved. (Unless you have a really old computer with less than 64MB RAM).

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?

If it is a 'WebApplication' there is a good book from JavaSoft specifically covering this. Otherwise there are style guidelines and rules of thumb for specific aspects of Java which can guide you in the right direction. Ultimately though, it is for you the designer to made decisions on the design.

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?

I would recommend that you try and get an applicaton working first and not worry too much about creating a good design. Designing a good system is mainly down to experience (yours or other peoples that you reuse). Build something and then refactor it (change things) untill you are happy with the results. Then figure out what you learnt from it all. Next time you will get to a good design quicker... and so on.

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


There are many sources of free information about developing database driven java applications. The main places I would recommend for you are:

1) JavaSoft: http://java.sun.com/ , look under the Tutorials section for JDBC tutorials and J2EE Blueprints. 2) Jakarta Apache: http://jakarta.apache.org/ , a whole range of java projects, look at Torque for Object-Relational mapping. 3) Hibernate: http://hibernate.bluemars.net/ , Relational persistence for Java

You should probably have a look on amazon (or some other book emporium) for books on Java Design Patterns, there are several good ones out there.

Other useful references:

O'Reilly - OnJava: http://www.onjava.com/
JavaWorld: http://www.javaworld.com/
Netbeans (IDE): http://www.netbeans.org/
VSj JavaZone: http://www.vsj.co.uk/java/
The Server Side: http://www.theserverside.com/

Johnny.





Reply to: