This is a migrated thread and some comments may be shown as answers.

Best approach to store user app preferences?

8 Answers 201 Views
AppBuilder in-browser client
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jean-Marc
Top achievements
Rank 1
Jean-Marc asked on 03 Mar 2017, 12:38 PM

I need to have a view in my app where the user can set some preferences for my app and service. This information should be stored in the Backend Data service and cached in the app.

I have created  a Form view attached to backend Data, however I'm unclear how to get it to load the user's record.

How can I achieve this?

Is this a good approach or are there other recommendations?

8 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 08 Mar 2017, 11:09 AM

Hi Jean-Marc,

You may store app preferences in the cloud (the backend data) or in a variable in the local storage of the device.

If you store the data in the local storage of the device the preferences will be avaible only to that particular device. Therefore if a user installs the app on different devices, then he will have to set these preferences twice as they are stored locally and not in the cloud. Still, this data will be available even if the device is offline (has no internet connection at all).

You may also store these preferences in the backend data as you have mentioned - then you will have to also store which preferences apply to which user. Here is documentation on how to create or read data from Telerik Platoform backend using the JavaScript SDK or using the RESTful API.

Whenever approach you choose, you will have to make modifications using the Code tab (not the Views service) as the Views service does not support it. The Views service is mostly aimed at creating as much as possible from the functionality and layout of the app from the start. However, after you get to the point where you need to make a lot of customization, it is best to switch to the Code tab and continue your development and updates there. After you do, you should stop using the Views service for the app in question, since a re-generation of its views will wipe your custom code (if they are outside the CUSTOM_CODE blocks).

Let me know if you need additional information.

Regards,
Martin
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:06 PM

Thanks. Martin.

What's the recommended approach to carve out certain views from the Views service while retaining others?

For example I have created a skeleton view for this settings form which I want to completely customize.

However in parallel I have other views like authentication or backend data driven views which I would still like to manage with the convenient Views service.

Is that even possible or is it more like all-or-nothing?

Best,

Jean-Marc

0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:06 PM

Thanks. Martin.

What's the recommended approach to carve out certain views from the Views service while retaining others?

For example I have created a skeleton view for this settings form which I want to completely customize.

However in parallel I have other views like authentication or backend data driven views which I would still like to manage with the convenient Views service.

Is that even possible or is it more like all-or-nothing?

Best,

Jean-Marc

0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:07 PM

Thanks. Martin.

What's the recommended approach to carve out certain views from the Views service while retaining others?

For example I have created a skeleton view for this settings form which I want to completely customize.

However in parallel I have other views like authentication or backend data driven views which I would still like to manage with the convenient Views service.

Is that even possible or is it more like all-or-nothing?

Best,

Jean-Marc

0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:09 PM

Thanks. Martin.

What's the recommended approach to carve out certain views from the Views service while retaining others?

For example I have created a skeleton view for this settings form which I want to completely customize.

However in parallel I have other views like authentication or backend data driven views which I would still like to manage with the convenient Views service.

Is that even possible or is it more like all-or-nothing?

Best,

Jean-Marc

0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:10 PM

Thanks.

Is there a way to carve out this view from the Views service while still using that for others (e.g. authentication view)?

Best,

Jean-Marc

0
Jean-Marc
Top achievements
Rank 1
answered on 08 Mar 2017, 06:11 PM
Sorry I got an Error 500 every time I posted my replies but obviously they seem to have been posted properly...
0
Anton Dobrev
Telerik team
answered on 13 Mar 2017, 03:14 PM
@Jean-Marc

My understanding is that you have created a few views in the Views service and now you would like to completely customize one of the views and detach it from the Views service tracking so that you keep your code changes. This is not doable out of the box.

You may want to stick to the writing your code only in the specified place for custom code changes (to prevent the code from being regenerated or updated). Alternatively, if it is CSS only, you can write it in a separate file and reference it in index.html. If the index file is regenerated, you can always reference the CSS again with a single line of code.

You can also think of adding a new branch in your app where to write the custom code and keep the Views service in the master branch. More on source control options in Telerik Platform here.

Let me know if this helps.

Regards,
Anton Dobrev
Telerik by Progress
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
AppBuilder in-browser client
Asked by
Jean-Marc
Top achievements
Rank 1
Answers by
Martin
Telerik team
Jean-Marc
Top achievements
Rank 1
Anton Dobrev
Telerik team
Share this question
or