Hey @keith ,
I just recently started testing Floppy, and it’s a great plugin! I’ve been using List Shifter for a while now, but the caching capabilities are what I’m really keen to explore, and is why I started using Floppy. However, I still have a use case that (I believe at least), requires ListShifter - the SORT action.
Perhaps I’m going about this all wrong, but in essence I have the following (I can’t describe the exact things, as its for a client - so I’ll use abstracts):
- Buildings - each of which has a list of specific features. There could be thousands of these, each with several features, which could change at any time.
- Preferences - each user has ~50 of these, some of which may change at any point. These preferences are numeric “weights” assigned to each feature.
Each building can change features at any time, and the preferences by the user can change at any time - so the goal is to rank the buildings based on a calculated score (which I currently use Floppy STEP to achieve, as I need to iterate through each building, then SUM the score for each feature against the user’s Preferences). This ranking obviously needs a mapped sort, which I have, to date, been achieving with the SORT function in ListShifter.
In the OLD version, which I am trying to get away from, it’s using the RG Extractor and a hidden RG to essentially create a list that contains the scores for each user. This was created by a previous developer - and I personally hate using an RG as a means of data retrieval. As you have said in many videos - RG’s are for displaying data (which I wholeheartedly agree!).
However, to allow this to scale, I cannot store the resulting calculations in the DB, as testing this results in a very poor user experience due to the latency involved, and is unlikely to scale without heavy resource uplifts - so by using ListShifter & Floppy, I hope to offload the bulk of the calculation and caching functions to the client browser/device.
My main problem has been bubble’s handling of numeric lists - and more specifically, how it handles duplicates and zeros. Sometimes, the calculation may result in a zero, and there is sometimes more than one zero. Using a numeric list doesn’t work, since bubble flattens this. Creating a list of only zeroes results in a list with 1 item, a zero. Creating a numeric list using Floppy containing zeroes, results in an empty list. However, I need the zeroes to remain in the list, at the correct position, to allow ListShifter to properly perform a mapped sort, without getting the wrong score mapped to each thing.
Do you know of a decent way using Floppy & ListShifter to achieve this outcome of a mapped sort with caching capabilities, given the limitations of bubble lists? I know using a text list works but I don’t like the numeric->text->numeric conversion approach due to the overheads…
I’ll keep hacking away, but any suggestions are welcome - as I think it’s probably a pretty unique use case, and one which perhaps requires both these plugins to achieve.