• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Saving and loading question

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey, I am creating an application which allows users to simulate certain communications protocols. This application would allow users to configure networks using network components such as routers and hosts by dragging and dropping images of them onto a configuration area. Therefore, as an image is dropped onto the area, objects would be created and certain parameters set.
One of the requirements of the application is to allow users to save configurations so that there could be loaded in the future.
Could anyone give me ideas on how I would be able to save the configurations along with the parameters? Thanks in advance.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Broadly, there are two ways: save the Java objects directly using serialization, or define a structured file format to translate your objects into as they are saved. Serialization is easy, but opaque and potentially fragile if your code changes. Defining and using a custom file format may or may not be difficult. It might be something you define from scratch, or you could just use an established format like XML. The advantage of using something like XML is you can use a pre-existing parser and tools for writing the file format.
 
Marcus Senna
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you tell me of any website or book that would give me information on using either of these two techniques?...thanks
 
reply
    Bookmark Topic Watch Topic
  • New Topic