Jump to content

Saving Application Data Locally

- - - - -

  • Please log in to reply
4 replies to this topic

#1
yottagray

yottagray

    Newbie

  • Members
  • Pip
  • 2 posts
I am an intern at a small software development company. I am working on a small web application of my own design, and I have come to the point where I need to write and read application data to store the state of objects in the app. The objects rely on css, html, and javascript(Dojo) for position, stored data etc. What is an easy efficient way to write and read this application data?

I know that an xml or json file may be possible, or perhaps even cookies or HTML5's localstorage, but I don't know what is really feasible.

I have no previous experience in software development, but I am trying to learn as fast as I can. While I've gone to school for a few years now for a CS degree, I've found that college is good at making you a Computer Scientist but awful at making you a good developer...

Anyway, I'm trying to absorb as much information as possible at my new company, and this looks like a good place too! Any insight as well as links to examples or references would be greatly appreciated!

#2
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,254 posts
  • Location:C:\Countries\US
If you have a server-side script to handle the storing and providing then you could use AJAX.
AJAX Tutorial

#3
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts

yottagray said:

I am an intern at a small software development company. I am working on a small web application of my own design, and I have come to the point where I need to write and read application data to store the state of objects in the app. The objects rely on css, html, and javascript(Dojo) for position, stored data etc. What is an easy efficient way to write and read this application data?

I know that an xml or json file may be possible, or perhaps even cookies or HTML5's localstorage, but I don't know what is really feasible.

I have no previous experience in software development, but I am trying to learn as fast as I can. While I've gone to school for a few years now for a CS degree, I've found that college is good at making you a Computer Scientist but awful at making you a good developer...

Anyway, I'm trying to absorb as much information as possible at my new company, and this looks like a good place too! Any insight as well as links to examples or references would be greatly appreciated!

Depends what you are trying to store. The color they picked up for the site color, or anything else that doesn't need to be remembered very long? Use a cookie, javascript can do that. Need to store user information or something more long term? Use a database. You could use a file that has json values, no problem with that I guess, but it might be kinda slow, and JavaScript can't write to files.

Don't rely on beta features like HTML5, it's not in stone yet and not that many people can even use it properly.

#4
yottagray

yottagray

    Newbie

  • Members
  • Pip
  • 2 posts
What I have(or hope to have when I finish) is basically a web application that contains customizable widgets (of sorts) that are drag and dropable. They use css for positioning, dojo/javascript(Dojo's assorted widgets and whatnot) for implementation, and are actually placed inside <div> tags. I want to reinforce that I have very little experience with web programming outside of the html and tiny bit of javascript I've used for web sites in the past. Over the past few days I have been crash-coursing through DOJO and Javascript, learing as much as I can, but I'm still a super noob, so to speak. So, at this point I'm still trying to figure out how I'm going to use the data I store to save these settings.

Thansk for the heads up about HTML5 I will keep that in mind. Also, I think given my requirements there is no real reason to use a database, just storing settings on the users local machine would make the most sense.

#5
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Glad I could help.

Here is a link on JavaScript cookies.

JavaScript - Cookies




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users