Re: What does everyone else do for graphically displaying data?



On Dec 11, 9:46 am, RedGrittyBrick <RedGrittyBr...@xxxxxxxxxxxxx>
wrote:
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.

thanks for reply!

started looking at Hibernate... looks at first blush a little
daunting, but i'll see how it progresses thru the tutorial. It
appears to actually be part of the JBuilder 2007 package; at least
heavily referenced--along with Spring. At first look, it appears
Spring is more of an enterprise solution to database apps(?), at least
reading the intro. they mention Hibernate being more light-weight.
we'll see.

curious--do you still view Hibernate as being complex? i've a ways to
go...

tia
-mark
.



Relevant Pages

  • Re: JDBC vs Hibernate
    ... fast and simple and very close to JDBC. ... >> My application is fairly simple, its using one database only that will ... >> don't need complex SQL logics) ... In your case Hibernate would be oversized. ...
    (comp.lang.java.databases)
  • Re: mySQL
    ... Hibernate lets you store and retrieve Java objects in a database in a ... It doesn't accomplish anything more than JDBC ... As for whether Hibernate is "better" than JDBC, ...
    (comp.lang.java.help)
  • Re: Mixing P/R philosophy with OO (within J2EE).
    ... I have observed the work of literally hundreds of Java developers. ... Treating a database like a mere "persistence storage mechanisms" is on ... JDBC - Never before in history were so many database API's ... Topmind, if you're reading this, isn't this a good example of OOP? ...
    (comp.object)
  • Re: Database Backend?
    ... and a decent database ... As best as I can tell, Hibernate is the current best of breed. ... java code on the page, and that is a big pain to maintain. ... Tapestry is a very clean framework, but it takes a while to figure out. ...
    (comp.lang.java.programmer)
  • Re: how to practice JDBC programming?
    ... I am reading a book to learn JDBC. ... I do have a Oracle expression version installed in my Window XP. ... Oracle is one of the top database systems out there, and Oracle XE is supposed to be very, very easy to use. ... If I'm not mistaken, a sample schema is also installed, (maybe it's an install-option), and for practicing purposes, like jdbc training, it'd be very convenient. ...
    (comp.lang.java.programmer)