Hi Thunkers!
Sorry for the long text, but I need first explain what I’m trying to do, in order you understand what is the pain.
I’m want to learn the best approach for a social application, with a timeline similar to Facebook. The idea is a car lovers social platform, so the user can post texts and images (maybe videos?) that will be viewed, liked and commented on by him and others.
After login, the application has an initial screen with the timeline, and a second screen that displays the details of a publication (image, comments and likes). Take a look what I have done until now:
My first choice was to use the obvious combination of Firebase + Datasource (with local tables) and DataViewerList (with custom layout).
Regarding the visuals I managed to come up with a beautiful design, but the execution / user experience is still bad. I ran into 3 major problems with this approach:
-
Dataviewer update when the user modifies something in the secondary screen: in some cases what the user modifies on the secondary screen is not automatically reflected from the main dataviewer, even though I update Firebase and the datasource that feeds the Dataviewer.
Then you will tell me, “it’s just a matter of refreshing the dataviewer”. Yes, the problem with doing this is that it creates an “ugly” visual effect, as all the data disappears from the grid to be reloaded later, in addition the grid returns positioned on the first line, causing it to lose the reference to where it was positioned previously.
In theory, when you update the datasource, the data should be automatically reflected in the Dataviewer, but there are situations it works, and situations it doesn’t! -
Slow Performance of data loading and waiting blocks on loops: As loading/displaying data from the cloud is costly (in terms of time and money), and also having observed how slow it is to create new rows in a datasource as well as taking considerable time displaying a lot of images in dataviewer, in order to provide a smoothly user experience I had to create a strategy of loading data as much anticipation possible and in batches (loops that reads 10 rows at a time in the timeline). To do this I have variables storing the first and last lines were read, and create a button external to the Dataviewer to load more feeds, and a button to force the reading of new feeds.
But I’m having some app fatal crashes when the user goes out to the secondary screen, modifies something and then goes back to the main screen but the app was still in the feed reading loop. It’s not always, but sometimes it happens. -
Sync data when another user changes something (eg posted a new comment or liked a post/comment), the correct thing would be to update the dataviewer on the affected lines. But I didn’t even try to deploy this since even the changes made by the user are failing to update. So, only when the user reloads the data and updates the dataviewer he will “realize” that something has changed, or read the notification the app will send. It’s not cool, but for lack of a better solution, I left it at that for now.
The speed and synchronicity issues are maddening, because you have to manage 3 “layers of data” (Firebase, datasource e dataviewer) dealing with the sync issues, predicting the behavior of each type of component, put wait blocks (slowing the app), control multiple variables with red/green flags and guess the weird actions the user cand do and cause application crashes.
I know it’s hard to provide advising without “read the code”, but because is a lot of blocks it’s impossible to paste it here, so the idea is to discuss in general what is the best approach for an app with this kind of requirements.
Be sure I tried to avoid the pitfalls of the sync issues, but considering the results obtained so far and the enormous effort working to solve these issues, I’m wondering if maybe it wouldn’t be better to change the approach of use Firebase + Datasource + Dataviewer to work with the combination of Firebase + Cloning Components (to clone labels and images components) to create the rich viewer this type of App requires.
But as I’ve never used this components class, and from the research I’ve done, I’ve seen that it’s not something easy to manipulate, and I don’t know how I would update the data on the main screen without having to read everything again.
I must confess that after a long time trying to make it work, you get the feeling that there is no way to reconcile all this in Thunkable, given itss limitations and characteristics of a low code tool.
So before I spend any more time trying to find a solution, I’d like to hear the experts’ opinions on what would be a way to get a smooth running implementation for cases like this.
Thanks for reading, be sure any help will be appreciated!
Regards,
Paulo Vaz