Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6062501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:03:34+00:00 2026-05-23T09:03:34+00:00

How you should save/load settings in an app when you want to use the

  • 0

How you should save/load settings in an app when you want to use the localStorage?
Let’s say we just want to save a username and a password.

Currently I know two options:

  • using a model with store and proxy.
    This seems to be a bit too “big” as you only want to store one object. But you have the advantage to easily use this.load() in the settings FormPanel.
  • using the Phonegap or the ‘plain’ localStorage.
    Then you have to use JSON.stringify and JSON.parse but you store only one object and its easier to load it (after a page refresh I run into some trouble using the store and proxy).
    But you can’t use this.load as you need to load a model. Maybe you need to “cast” the settingsObject from the localStorage to a model and load this one!?

Which approach is better or is there even another, better approach to save/load settings and display them in a form?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:03:35+00:00Added an answer on May 23, 2026 at 9:03 am

    I definitely agree with you that using a Sencha Touch model and store is overkill to store some settings. I recommend serializing your settings object with Ext.util.JSON.encode/decode.

    Note: You won’t be able to serialize the function members of an object though, much less the properties belonging to objects up its prototype chain, so you won’t be able to serialize and deserialize an Ext model and have it work when you get it back. The best you could do is serialize the configuration for your Ext component and reconstitute it through its constructor after getting the configuration back.

    For most simple settings objects, just serialize it and store it in a key in the local store. When you get to your page, get the settings object out and update your form. When you change a setting in the form, write it to the object. When you leave the page (onbeforeunload), write the object to localstore.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am looking for where I should save my app stuff, and after a
Should I use NHibernate Collection Cascading to perform collection save-updates, or should I use
I always read that I should use model = Model(a=5, b=6) model.save() But I
Is it possible to save some kind of settings for an app create in
I am trying to use local storage to be able to save/load multiple sets
My program should save, retrieve and manipulate a large load of data. (Around 200,000
I want to save / load instances of my classes using NSCoding. Each class
Yesterday I asked the question on how I should save my files. After some
I have a small issue with a method that should save the text contained
Should be a quick and easy question. Does System.Drawing.Graphics.DrawImage() or Image.Save() by default make

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.