Re: What does everyone else do for graphically displaying data?
- From: mdR <mrafn@xxxxxxxxxxx>
- Date: Wed, 12 Dec 2007 16:53:03 -0800 (PST)
On Dec 11, 9:46 am, RedGrittyBrick <RedGrittyBr...@xxxxxxxxxxxxx>
wrote:
mdR wrote:view that Hibernate looked complex and therefore it was worth
~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
learning
how to use JDBC first.
any thoughts on Spring? or Cayenne?
I guess I'm a little gun shy on committing to one or the other. After
buying into Borland's hype on JBuilder (pre-2007) and then them
bailing on their DataExpress in the latest release... i'm just trying
to setup a successful future. yeah-yeah--nothing is ever for sure,
but with so much out there, just want to make a somewhat intelligent
decision :)
Pure JDBC and TableModels seems incredibly cumbersome, at least to me,
coming from such a rich library in past ide's. I am starting to grasp
the abstracttablemodel concept, but putting it all together with swing
components is still confusing (all that "magic" was hidden before).
And especially with one-to-many (master-detail) relational data. How
to update from the Swing component edits to the underlying data....
A simple table is one thing, but a multi-table relational database is
another. I like what I've read about Cayenne. It seems this is what
I need to do, but I'm not sure. Anyone have any experience with this?
-mark
.
- Follow-Ups:
- References:
- What does everyone else do for graphically displaying data?
- From: mdR
- Re: What does everyone else do for graphically displaying data?
- From: RedGrittyBrick
- What does everyone else do for graphically displaying data?
- Prev by Date: Re: What does everyone else do for graphically displaying data?
- Next by Date: Re: MySQL ResultSet - count rows?
- Previous by thread: Re: What does everyone else do for graphically displaying data?
- Next by thread: Re: What does everyone else do for graphically displaying data?
- Index(es):