Efficiency, block organization and variables

Hi everyone, given that the purpose of Thunkable is to “code” without “know how to code”, maybe this post will be useful not only for me but to all the code naive thunkable users.

I began my app with only one screen, a dozen of blocks, and a couple of variables, but now I have a lot. So I have some questions regarding app efficiency.

  1. The workspace is a free space, is there a “correct” or better direction for the blocks? I mean, is it better to keep adding block groups vertically or horizontally? Or it doesn´t matter? This is of course aside from the “realtive order” that everyone needs to keep to find your blocks haha.
  2. The new variables can cross between screens, however, is it better to add the “initialize variable” in any particular screen? E.g at the first screen that opens in my app, or at the first screen the variable is used?
  3. Is there a maximum number of variables, blocks, etc. per screen to prevent it from crashing?
  4. Is there a way to estimate app size?

Thanks

Hi,

  1. For more efficient filling of the working space and more convenient work, I place the blocks both vertically and horizontally. This makes it easier to find blocks using browser-based search on the page. If the blocks go beyond the screen, they are not included in the search.

  2. It depends on the application. Suppose that on one of the 20 screens you need to download a lot of data from the Internet. If you do this when initializing the first screen, the data will always be loaded and will slow down the load. But not all users will go to the screen where this data is required. Why then download them, if the user does not need them?

  3. There are no restrictions, because the application can fail when using 10 blocks, and when using 1000 blocks. The more blocks, the harder it will be to work with them and find errors. With an increase in the number of sides, the speed of work in the block editor also decreases. You will notice a difference if there are 50 blocks on the screen or more than 300-400. The general rule is that the smaller the blocks and components, the better. Instead of repeating blocks, use functions. If you need a lot of buttons, then consider replacing them with multiple ListViewers. I know a user who has a lot of components on the screen and for this reason he has not been able to make a working screen for several weeks.

  4. Make an apk file for your project and see its size.

1 Like

This was exactly what I was looking for with my post. Thank you for your suggestions. I have a lot to work at the efficiency department on my app lol.