Forum Academy Marketplace Showcase Pricing Features

FLOPPY: Plugin for localStorage, sessionStorage, IndexedDB storage, List Creation/Manipulation, Iteration, and More! Now with even more video docs!

Clone is off.

It has been a bad (re)start on the pricing. I’m confident they will iron out these huge misunderstandings on which WU count or not.

Well, Rico, I’m on strike.

2 Likes

:rofl:
….

@keith what does the picket sign read? :grin:

I’ve been thinking about trying some ideas on database retrieval for an app that has a major feature that is related to data that a user may come back to multiple times.

Would the use of Floppy for the local storage be a way to reduce the cost of showing the user the data? My thought is that if they come the first time, I can load into local storage all 2,000 items from the database, then when they come back the next day or even the next month, I can simply attempt to pull the data from their local storage as the data itself will not change.

Is there a time limit for local storage?

Is there a limit on the number of things that could be stored?

Based on your understanding of the new pricing, do you think that could equate to a savings on workload consumption?

2 Likes

Sort of yes, sort of no. Note that when Floppy stores a Thing to browser storage, it is essentially just storing the Thing’s unique ID (because that basically is the Thing). But what this means is that, on retrieval, there is a database interaction (because Things only exist in the context of the database, they don’t have a purely client-side representation).

There’s no workaround for this at the moment, it’s just a limitation of Bubble.

Now, it’s still faster than having to do a Search. Consider if you have a list of Things stored in browser storage (Floppy supports this of course), what happens is that list will get retrieved and the stored Things appear at Floppy’s List Storage output, but that act of publishing them to the output initiates a database interaction that turns the UID’s back into their Thing object representations.

Edit: If what you’re storing locally is a simple datatype (as opposed to a Thing), you can of course retrieve those values from browser storage without any database interaction at all.

1 Like

Maybe a JSON representation of the thing. In my situation that may work because I already had for that thing an alternative data type called ‘Product-Search’ which had only the five fields needed to display in the repeating group for browsing. The ‘Product-Search’ has a field that is related to the ‘Product’ data type that has all the fields necessary to view all product details.

I suppose if I send into the local storage a JSON representation of the ‘Product-Search’ for browsing, I’d still be able to show all values in the repeating group for browsing without hitting the database.

I had been thinking more about JSON as months back somebody was using JSON in the database as a text field and reported some speed improvements, however complexities exist for manipulating that data. Then the webinar did the workaround of JSON sent from backend.

I’ve also personally been changing data types to text for combining different data types into a single repeating group, mostly when working with APIs of different providers with same basic information or for filtering lists against lists quickly without needing the Advance Filter.

Maybe this is the way now…JSON in local storage?

Again: there’s no client-side representation of a Thing.

1 Like

If the strike is over, I could use your help.

I’m trying to put together a small Kanban board. 2 RGs with requests that can be dragged and dropped between the lists (and sorted).

I can drag items, but they end up repeated on each list.

Setup:

  • 2 RGs, each with its own Floppy.
  • Each Floppy with its own list key name
  • Each Floppy’s RAM is set when initialized
  • both Floppies have the same drag group name
  • Clone is off in both floppies

I’ve tried all the spaghetti I could think of. But I can’t beat this final boss. Any hunches on what I’m doing wrong? (I can give a lot more context if needed)

Hey @rico.trevisan if you invite me to your project (share details via PM) I can take a look at what’s going on! It’s possible something could be bugged if items are not leaving the old list and then joining the new list properly. (Note that that process is automatic and doesn’t need any additional actions/workflows. The result of dragging an item from one RG to the other should cause the item to leave the RAM List associated with RG1 and be added in the dropped position in the RAM List associated with RG2!)

Hi @keith

Is it possible with your plugin to change the order of files in the database?

For instance, I have several images and each of them has a number (to sort them in RG)
I’d like to change the number on the database via Floppy

floppy

I don’t know if I am explaining myself well.
Fabian

List fields stored on a thing have an order. Raw files just sitting in your database don’t.

In my image above I’m showing that files are stored in database. I’m using them in repeating group and the order as a sort
The idea is that if I change the places with Floppy is it possible to change the order in database?

Thanks

Hi There,

my second plugin from @keith . List shifter enabled me to do my app, otherwise I would not do it on Bubble I guess. Now after first MVP test with users and Bubble new pricing I have to improve efficiency. I bought permanent license of Floppy!

Problem:
In my use case I need to refresh page every ~5min. After page load I set states where I temporary hold round start and round end time. In order to do this I get dates from database thing rounds and set them to state. So every 5 minutes (or if user makes random page refresh) I call database and (re)set custom states.

Here I found floppy super useful. I will call database only once. Store values in local storage and I improve performance and save WU.

Question:
Let’s say I have Floppy A set to work with data type date. Can I store multiple scalar values with floppy A alone and read them later? And how?

I want to floppy-fy these custom states workflow:


Example states
image

Assumption:
I can just use Floppy A and in workflows to store to local storage with different names
Round1-Start, Round1-End, Round2-Start…
Like this:

Floppy stored to local storage:

Cool! How to read them now? How can I read endtime1 and starttime1 in bubble?
Do I need for each scalar key extra floppy? So 20 scalar keys = 20 floppies? Is there any impact on performance (initialize 20 floppies)?

Thanks.

P.s. I seen most of the videos however simple principals of reading values from local storage is not clear to me.

Floppy stores lists of dates of course (it can store nearly any type of Bubble list). Don’t store 20 different scalar dates, store a list of the dates that you need, @nagy.pavol.

1 Like

Hmm good point so then I can use just 1 floppy, 1 list and get data by index#.

@nagy.pavol, BTW, for situations when you DO want a single element to be able to read multiple keys, see the Floppy Reader element.

1 Like

@keith I want to explore more functions of Floppy.

  1. RAM. I’m not sure if I understood RAM function. Is it temporary storage like custom states? So after I hit refresh values are gone? If so, when should I use RAM instead of custom states?

  2. I do use list shifter for looping / simple n+1 operations. Do I still need list shifter or can I achieve looping with floppy?

  3. Storage to indexedDB - do you plan video for this? It would be dream to copy bubble thing / table to local and instead of talking to bubble DB, I would get data from browser.

Yeah, Floppy’s RAM list is just like a custom state with additional actions in it. Watch my videos.

See my video in this thread about iteration features in Floppy. Floppy’s “Step mode” actions let you iterate over a workflow like List Shifter, with some differences.

It works exactly like localStorage. It’s not a full implementation of IndexedDB, it’s using the localForage library to put a localStorage-like interface on IndexedDB. The benefits/differences are that IndexedDB can hold a lot more data, it’s asynchronous, so doesn’t hold up the execution loop (not that this is a big issue), you can specify a datastore as well as the key name.

1 Like

@keith

Thank you for your work here!

I am a few hours into working with Floppy. Game changer.

On List Shifter I was able to use “group by…” after searching for data in order to further consolidate a search. Once “group by…” is used it changes the Type of Content to “Grouping”. Is there any way to work with a “Grouping” in Floppy?

Thank you!

@jasonjwadsworth thats a good question. Groupings are weird and, personally, I don’t use them. They are, in fact, sort of like their own datatype and it is possible that they do not play nicely with Floppy.

Can you show what, exactly, it is you are trying to do? (I cannot precisely answer your question based on what you’ve shared so far.)