[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

What structure should file saving take?

Posted on 2007-11-16
6
Medium Priority
?
190 Views
Last Modified: 2010-03-30
I am currently developing a standalone application that will have the following structure:

File
General Information
         - Group 1
      - Table 1
      - Table 2
      - Notes
                   > Group A
                 -Table
                 -Notes
                 -Pictures
        - Group 3
      - Table 1
      - Table 2
      - Notes
         - Group 4
      - Table 1
      - Table 2
      - Notes

(note – there can be up to 30 groups)

At the moment all the above are all stored as arrays, vectors, variables etc..  

The application will have functionality to import specific elements – e.g. Table 1 in File 1 being imported/reused in File 2.

I have developed database applications in the past and the nature of this application does not lend to a DB.  Any thoughts on the best way to “SAVE” this information?  I.e. Text File, Custom File etc?

Thanks
Angus

0
Comment
Question by:amacfarl
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 35

Expert Comment

by:TimYates
ID: 20298000
As it's a tree structure, it would tend to lend itself to XML or JSON or some other tree structure based format in my opinion...

Especially if more than one application is going to need this file or you are going to be transmitting this file across the network to another service
0
 
LVL 35

Expert Comment

by:TimYates
ID: 20298007
(if you are transmitting it, XML would be better as you can define a schema)
0
 
LVL 2

Author Comment

by:amacfarl
ID: 20298058
Sorry... misunderstanding.  It is not a tree structure, the structure above is purely to illustrate the object hierarchy.  eg. Group1 is a class that contains several tables, pictures, and other classes which also contain tables, pictures etc..

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 35

Expert Comment

by:TimYates
ID: 20298104
Yeah, so that can be thought of logically as a tree of objects...

ie:

Group 1 contains tables
    each table contains other objects

etc...

Or am I missing the point entirely?  (it's very possible as it's a Friday, and my head is swimming with work-based javascript at the moment) ;-)
0
 
LVL 2

Author Comment

by:amacfarl
ID: 20299000
Thanks Tim for getting back to me.  

My thoughts on using XML or JSON is that it requires effort to create a file structure and parse it and load it etc. etc.  it is also something that is readiable and editable by notepad which causes a problem.  The tool that I am developing is going to be used by IT professionals and they will start playing with the contents of the file outside the program - thus it means that further effort will be required to develop validation etc.. etc.

A few years ago (in the 90's :-)) I developed a program that simply saved the objects directly.  I recall having a method that I simply past it the object and it saved it.  Serialiazation i think.  If so, what are your views?

Thanks
Angus

P.S  Bring on the weekend.... sitting in an Airport lounge about to take my 6th flight this week.... only one more after this!!!!!

0
 
LVL 35

Accepted Solution

by:
TimYates earned 1500 total points
ID: 20299433
The only worry I have with serialization is that it is not guaranteed to work over different versions of your application unless you're careful

It can be handled by being careful with changing your core classes, but if it goes wrong it's hard to fix as the serialized files are binary...

A framework like XStream* may help here

http://xstream.codehaus.org/

It serializes java objects to XML, so gives you all the ease of serialisation, but with all the hackableness of xml ;-)

Tim
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question