Lessons learned while building with Bubble.io
Some things I picked up through my learning curve.

Over the past few months, I have been diving into the world of Bubble.io and exploring its capabilities as a programming platform. Along the way, I have discovered a few things that have really helped the development process.
Utilize backend workflows: Although setting up back workflows may seem tricky at first, they are incredibly useful for streamlining your code and ensuring maintainability. There are a couple of configuration steps to get them in place, but once you have done them, you can feed your workflows into them really efficiently. The newbie mistake is not having a termination step. Whatever you do, define that first, even if it is a hard stop. The consequences of not doing so is a runaway thread that executes forever and eats up all your Work Units (WU).
Master how to do recursion: This is a bugbear for all Bubble developers. The forum is full of people asking how to do it. There are actually plenty of options. It is a case of finding the right one for the right problem. Backend workflows are one answer and are great, super efficient and (mostly) thread-safe. If you want to send a lot of data to the database then use one of these. For smaller front end problems there are plugins you can use to create small lists of iterations. Check out the Toolbox plugin, it’s got a function that will give you what you need (amongst other handy things).
Embrace single page apps: This was something I had not cottoned on to straight away. Coming from a Java background my first thoughts were to ring fence pages using a new template (with reusable elements) on each one. It works of course, but performance is terrible. If you go with the single page approach, you will need to make sure you are organised on the page, but you can achieve a lot very quickly and the user will navigate between pages at lightening speeds. The key is to set up
paths
and link them withconditions
to switch elements on and off as required.Leverage reusable elements: As far as possible make reusable elements rather than repeating code on different pages. There are two reasons for this. 1) it makes code maintenance and code consistency easy 2) When you are using a single page architecture it means you can have a tidier page.
Harness the power of themes: The Bubble community is really mature. There is no reason not to be able to create a good looking app, by leveraging the work someone else has done. Do be careful though. You can get caught up in removing and editing parts of the theme you don’t want to use. So what I tend to do, is have the theme installed in a separate app, and then switch tabs to take what I need as I need it.
This is the Orzo Blue blog. Learn how we can help you develop your MVP or platform for you.
Explore plugins: As with themes, make as much use of the available plugins as possible. There are free ones and there are subscription or one time payment ones. Some are more supported than others. It is definitely worth looking at the plug in page to see how many times it has been installed, and also to see how well it is supported. The reviews are useful for this. The key to plugins, is that you do not need to reinvent the wheel. Leverage other people’s work and get your ideas flowing and out there quickly.
Embrace branching and custom workflows: Workflows can get pretty big and unwieldy once you have more than around 4 steps. Often you are going to be executing those steps from different starting points. So break them down in to what is effectively sub-routines by creating and then calling Custom Workflows. Once you get into Backend Workflows these become even more useful.
Master database triggers: There are some real limitations that can be difficult to work around efficiently. One of the most annoying things is there is no real way to join two database tables and play with the data in memory. I’ve found one way to manage this is to create temporary table populated using database triggers. As data is added to the database you also write it to the temporary table (much like say a cache) and then talk to the temporary table to run reports and manipulate data for use on the front end.
Custom states are your friend: Custom states are one of the most powerful tools in Bubble. They allow to you store data for repeated use. They can be made up from data objects (
things
) and lists or they can be single scalar variables. They are most useful as a way to avoid making repeated requests to the database when sending data to the page; most commonly when you are iterating Repeating Groups, refer to your custom states rather than hitting the database for every row.Work with Bubble's Philosophy: Bubble is an opinionated platform, and it is best to align with its approach rather than forcing your own ideas onto it. They are hosting thousands of other sites and they are optimising their platform for everyone. They work hard to cache repeatable queries and regular tasks. If you go along with it, your app will be really fast and useable. If you try to go against it, all you will do it create pain for yourself.
I hope you find these tops useful. I am sure there will be more to come. As I build out other apps and features I am sure I will have more thoughts to write about in the future.