# Storage - is there anything else than writing files to disk?

**URL:** https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667
**Category:** How-to Discussions
**Created:** [October 21, 2016, 9:43pm UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667 "2016-10-21T21:43:22Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![ted.ekeroth](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@ted.ekeroth](https://forums.fusetools.com/u/ted.ekeroth)
#### Post date: [October 21, 2016, 9:43pm UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/1 "2016-10-21T21:43:22Z")

</div>

I’ve been searching a bit, and I cant really find anything about storing data on the device, except for Storage where u can write files to disk.

I was hoping for something more refined, like Androids SharedPreferences or perhaps SQlite, something where the data is organized and easy to write and access. Does Fuse have support for something like that?

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [October 22, 2016, 7:10am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/2 "2016-10-22T07:10:20Z")

</div>

Hi,

Oh yes.

For advanced filesystem access: [https://www.fusetools.com/docs/fuse/filesystem/filesystemmodule](https://www.fusetools.com/docs/fuse/filesystem/filesystemmodule)

For databases, you need to use a third party SDK. For things like SQLite, there are community packages that wrap them in nice JS APIs: [https://github.com/bolav/fuse-sqlite](https://github.com/bolav/fuse-sqlite)

For backend data:

> **[Syncano/syncano-fuse-example](https://github.com/Syncano/syncano-fuse-example)**
>
> syncano-fuse-example - Simple example of integration with fuse tools

[https://appstax.com/docs/fuse-guide.html](https://appstax.com/docs/fuse-guide.html)

Hope that helps 🙂

---

<div class="post-metadata">

### Author: ![ted.ekeroth](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@ted.ekeroth](https://forums.fusetools.com/u/ted.ekeroth)
#### Post date: [October 22, 2016, 8:23am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/3 "2016-10-22T08:23:35Z")

</div>

Right, so no build in support in fuse other than writing files to disk then. No support for sharedprefs or the equivilient in ios?

Are there any plans for such support?

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [October 22, 2016, 8:55am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/4 "2016-10-22T08:55:07Z")

</div>

We try to limit the number of built-in packages (that can’t be stripped out) in favor of optional packages, like the SQLite package linked above. It works fine and is easy to use.

We don’t have any particular plans for sharedprefs at this moment, but it would similarly be easy to add as a community package.

---

<div class="post-metadata">

### Author: ![ted.ekeroth](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@ted.ekeroth](https://forums.fusetools.com/u/ted.ekeroth)
#### Post date: [October 22, 2016, 9:18pm UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/5 "2016-10-22T21:18:32Z")

</div>

I see. Well, im not sure why fuse decided to strip this important functionality and instead rely on a third party implementation, but i think its not the best of ideas.

I would suggest that something like the “sharedprefs” in Android is included in fuse by default and supported, as i see that as core functionality and its widely used, most apps use some persistent data.

Please at least consider it.

Thanks for input!

Regards

---

<div class="post-metadata">

### Author: ![dszymczak84](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/dszymczak84/32/418_2.png) [@dszymczak84](https://forums.fusetools.com/u/dszymczak84)
#### Post date: [October 22, 2016, 10:15pm UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/6 "2016-10-22T22:15:00Z")

</div>

> **[ted.ekeroth@gmail.com](mailto:ted.ekeroth@gmail.com) wrote:**
> 
> I see. Well, im not sure why fuse decided to strip this important functionality and instead rely on a third party implementation, but i think its not the best of ideas.
> 
> I would suggest that something like the “sharedprefs” in Android is included in fuse by default and supported, as i see that as core functionality and its widely used, most apps use some persistent data.
> 
> Please at least consider it.
> 
> Thanks for input!
> 
> Regards

You are absolutley right !

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [October 23, 2016, 1:57am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/7 "2016-10-23T01:57:45Z")

</div>

Hi!

Looking at `SharedPreferences` in android and `NSUserDefaults` in iOS, i don’t see what this adds on top of simply storing a JSON file on disk using Fuse’s Storage or FileSystem APIs.

Granted, the Android version allows you to listen for changes, but this can easily be emulated by creating a wrapper module in plain JS.

Please enlighten me on what particular use case you feel is not covered by Fuse’s current APIs.

---

<div class="post-metadata">

### Author: ![ted.ekeroth](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@ted.ekeroth](https://forums.fusetools.com/u/ted.ekeroth)
#### Post date: [October 23, 2016, 6:17am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/8 "2016-10-23T06:17:46Z")

</div>

Well, its always easy to say “you can build a wrapper” or “you can create your own class/classes that fulfulls the requirements you have”. In theory, Im sure I could build, for example, my own ScrollView too (luckily, you did it for us), or build my own Observable class in JS somehow, but as I see it, a framework is there to make it easier for developers and to have a “complete support” for the most used things.

So, to have some basic support for storing stuff, cookies, authentication stuff or whatever, is standard. Its so standard and widely used that its strange not to support it.

To save to a file is not ideal; lets say you store a little more offline data. You dont wanna read in the whole file. Sure, you could start storing in different files and build your own little homemade “database”, storing in different files etc, but again, the framework is there to help.

The main point isnt, as I see it, “why” Fuse should support some basic persistent data handling, the question is “why not”? Isn’t it a normal occurence in any app development? Is there a reason why Fuse opted to leave that part out?

So far, I really like what Fuse can do, so I am just humbly suggesting improvements to make it better for the average developer out there =)

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [October 23, 2016, 6:31am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/9 "2016-10-23T06:31:45Z")

</div>

I take your point Ted, and I agree in principle. However, the reason it isn’t in there is that there are literally _thousands_ of things that are on our “nice to have” list of features to add to Fuse, but we are a limited team to develop the core platform, and we need to prioritise. The features you are describing adds just a marginal benefit on top of the APIs we already support, and hence it will be low priority. I’m not saying we’ll never add it, but it’s not among the first things we will run and do.

It is however very easy to create and share community packages already, and with the upcoming Fuse package manager system, it will be even easier. So just because something is not bundled in the core platform, it doesn’t mean it is not supported in general.

Our vision for Fuse is that there should be a solid, yet compact core platform (to ensure small and fast minimal app exports), and an ecosystem of community packages which you can optionally link in to any project based on what you need. Note that the Fuse team also contributes lots of community packages already.

[https://www.fusetools.com/docs/packages](https://www.fusetools.com/docs/packages)

---

<div class="post-metadata">

### Author: ![ted.ekeroth](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@ted.ekeroth](https://forums.fusetools.com/u/ted.ekeroth)
#### Post date: [October 23, 2016, 6:59am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/10 "2016-10-23T06:59:42Z")

</div>

Ok, i understand you have a lot on your list to do 🙂️  
I will try to look into the third party stuff and see where that will lead.

Out of curiosity: when you write core functionality in fuse, what language do you write in?

---

<div class="post-metadata">

### Author: ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)
#### Post date: [October 23, 2016, 7:02am UTC](https://forums.fusetools.com/t/storage-is-there-anything-else-than-writing-files-to-disk/6667/11 "2016-10-23T07:02:07Z")

</div>

Cool, looking forward to see some new packages 🙂

The Fuse core is written in Uno, with foreign code (ObjC/Java) for interop with the native APIs.

FuseJS (the Fuse JavaScript standard library) is written in a mix of JavaScript and Uno.

You can read more about Uno here: [https://www.fusetools.com/docs/native-interop/native-interop](https://www.fusetools.com/docs/native-interop/native-interop)
