Results 1 to 1 of 1
- 08-22-2009, 12:51 PM #1Member
- Join Date
- Aug 2009
- Rep Power
Creating a Tree and then saving the Tree
I have a tree like structure that I have created using a SWT Tree. I save this to an XML when I close the application and open it again when the application is restarted.
Being my first SWT project I started is a round about way swapping and changing things as I went. Finally I decided to introduce an ID filed into each TreeItem which is associated with a class I have created.
(This was starting to look too much like a relational database structure instead of proper OO principles)
Later I found that I could actually store the Class with the treeItem through the setData() method.
My questions is this.
1. Should I drop the ID field altogether and instead save the entire Tree to an XML file?
2. Is using a Relational Database structure in OO development considered BAD.
3. Should I just drop the whole XML idea and instead use Serializable.
- By emailtosridevi in forum SWT / JFaceReplies: 1Last Post: 03-15-2010, 06:34 AM
- By roaan in forum New To JavaReplies: 1Last Post: 07-13-2009, 09:26 AM
- By wide in forum New To JavaReplies: 2Last Post: 06-30-2009, 11:37 PM
- By avi in forum New To JavaReplies: 0Last Post: 03-20-2008, 04:11 AM
- By Preethi in forum AWT / SwingReplies: 0Last Post: 01-07-2008, 02:04 PM