Re: What does everyone else do for graphically displaying data?
- From: RedGrittyBrick <RedGrittyBrick@xxxxxxxxxxxxx>
- Date: Tue, 11 Dec 2007 15:46:53 +0000
mdR wrote:
~hey
ok--i need to quit researching and testing, and get on with
applications. one way or another, make a decision and get back to
work.
what does the majority of programmers do for displaying data in a one-
to-many relational database?
brief history: i come from using Borland Delphi (object-pascal) where
it was pretty brainless in setting up editable table/grid displays.
moved from there to Java, recognizing the whole platform independant
thing and wanting to move forward. so purchased Borland JBuilder...
same thing: basically drag and drop components in the ide, set
properties and presto, you had an application where you can edit data
from a gui. Then came the bomb (for me)--borland removed all such
libraries/components from their latest release and dropped all support
for there data-aware components. hey-whatever...fortunately their
dbms is fully JDBC compliant, so at least i can move forward.
so after much research, i find that there really is not much for data-
aware component libraries for use in ide's out there! i have read the
JDBC API reference cover to cover a couple of times, researched these
newsgroups quite a bit and just would like to confirm a direction i
should be going. you know it's funny--all the examples for jdbc do
not have graphical displays (ie: windows)! it is all just console
output. hey-even i can do that!
it appears that i should just forget looking for component libraries
and do all the data stuff / graphical stuff in code. for example--can
you bind a data grid to a database table so that when you edit the
grid cell it updates the table data? how do you do that? is this
easily done or does it involve a lot of additional coding?
1) Use MVC pattern, put all JDBC code in the Model classes. Make use of the models that are part of the API for many Swing components. E.g. extend AbstractTableModel and put JDBC code there. Use SwingWorker in the View classes when invoking lengthy Model methods so that database access doesn't block the EDT.
2) Use something like Hibernate.
3) I vaguely recall that SwingX had some data-aware components.
4) DAO?
I suspect that 2 is the canonical answer. When learning Java, I took the view that Hibernate looked complex and therefore it was worth learning how to use JDBC first.
.
- Follow-Ups:
- References:
- Prev by Date: Re: MySQL ResultSet - count rows?
- Next by Date: [Announce] Stylus Studio 2008 Now Available
- Previous by thread: What does everyone else do for graphically displaying data?
- Next by thread: Re: What does everyone else do for graphically displaying data?
- Index(es):
Relevant Pages
|