
Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
> > What happens when AbstractTableModel is no longer compatible with Swing?
> >
> > I kinda see how to use it, but don't see how XMLEncoder would work in its
> > place.
See <http://java.sun.com/products/jfc/tsc/articles/persistence4/> for
"Using XMLEncoder".

Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
Sabine Dinis Blochberger - 03 Jul 2008 11:40 GMT
> See <http://java.sun.com/products/jfc/tsc/articles/persistence4/> for
> "Using XMLEncoder".
Ok, When clicking the link in my message, I get to a different page then
what I linked to (the URL is the same). :/
See the article I meant by putting "java using xmlencoder" in a serach
engine.

Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
> So, for serializing JavaBeans, you would use XMLEncoder instead of
> AbstractTableModel.
So, if I have a Person bean, or even a Coffee bean, then persistence
would be through XMLEncoder. If beans persist as XML, then there's no
direct database connectivity, it almost seems. Almost a turn away from
RDBMS (and the "quagmire" which it entails).
So, rather than using an TableModel, I would just persist all the data as
XML. Where does the RDBMS come into play? (I'm reading that link which
you provided.)
-Thufir
Sabine Dinis Blochberger - 03 Jul 2008 11:47 GMT
> > So, for serializing JavaBeans, you would use XMLEncoder instead of
> > AbstractTableModel.
[quoted text clipped - 7 lines]
> XML. Where does the RDBMS come into play? (I'm reading that link which
> you provided.)
I'm not versed in Persistance at all. It seems that there are
"delegates", which you can create, so that could be a way to translate
XML to RDBMS.
Or perhaps Hibernate <http://www.hibernate.org/> is of interest to you.
It looks like a very powerful tool - it is very well known and widely
used.
Seems you have a learning curve ahead of you, best of luck. Hopefully,
someone more knowledgeable in this newsgroup will still have some more
ideas.

Signature
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
Lew - 03 Jul 2008 12:25 GMT
> Almost a turn away from
> RDBMS (and the "quagmire" which it entails).
Why do you call an RDBMS a "quagmire" (in quotes)?

Signature
Lew
thufir - 03 Jul 2008 15:41 GMT
>> Almost a turn away from
>> RDBMS (and the "quagmire" which it entails).
>
> Why do you call an RDBMS a "quagmire" (in quotes)?
Not an RDBMS itself, but ORM.
See:
http://en.wikipedia.org/wiki/Object-
Relational_impedance_mismatch#External_links
and click on:
The Vietnam of Computer Science - Examples of mismatch problems
-Thufir
RedGrittyBrick - 03 Jul 2008 14:40 GMT
>> So, for serializing JavaBeans, you would use XMLEncoder instead of
>> AbstractTableModel.
I have the feeling that the OP may have been sidetracked by the mention
of Serialization.
> So, if I have a Person bean, or even a Coffee bean, then persistence
> would be through XMLEncoder. If beans persist as XML, then there's no
[quoted text clipped - 4 lines]
> XML. Where does the RDBMS come into play? (I'm reading that link which
> you provided.)
You still need a model. You still need a data store of some kind.
I see no point in serializing your Person bean to XML and then trying to
store the XML into a traditional RDBMS. I'd skip the XML step.
I'd use JDBC to directly store the Person bean as a record in a Person
table. Typically I do this using JDBC in the model classes (MVC
pattern). Usually I pass Data Transfer Objects (DTO) between View and
Model. I imagine your Person bean can be used as a DTO.
If you'd prefer something take care of the Object-Relational Mapping for
you then you should probably look at Hibernate & Spring and read about
JPA. I'd try JDBC first if you are not familiar with any of these.
I believe any of these approaches have a significant learning curve.

Signature
RGB
thufir - 03 Jul 2008 15:34 GMT
> I'd use JDBC to directly store the Person bean as a record in a Person
> table. Typically I do this using JDBC in the model classes (MVC
[quoted text clipped - 4 lines]
> you then you should probably look at Hibernate & Spring and read about
> JPA. I'd try JDBC first if you are not familiar with any of these.
OK, thanks.
-Thufir