Create multiple things, FAST

This is the same issue as when people think it might be better to create a shopping cart that exists entirely in the page and then pass the contents of that cart to the backend and iteratively create the order there. (Rather than create the Order’s Line Items as Things as the user adds them to their cart.)

In some ways, this is smart:

  1. We avoid creating Line Items (or Field Responses or whatever) that later have to be deleted if they are never attached to an Order.

  2. We could potentially (not in vanilla Bubble, mind you) save the user’s cart locally and never interact with the database until the user commits to buying the shit we are trying to sell them.

  3. The in-page experience can potentially be blazingly-fast as we never have to interact with the database. (But, practically speaking, can you REALLY feel the difference between the two methods I demonstrate here?)

HOWEVER, there is no free lunch. If I make some sort of in-page proxy for Things and then send them to a backend workflow after some sort of commit action (e.g., BUY) to turn them into Bubble Things, we’ve delayed our pain. And we’ve traded a few tens of milliseconds per Thing (creating them as we go in the page), for about 1 second per Thing in the API Workflow (AFAICT) on lower-end Bubble plans.

This is fine for shopping cart order submissions (once the user has clicked the “BUY” button, they probably don’t care if they get an email confirmation for several minutes).

But for your use-case, you want your user to be able to click a “PREVIEW” button and see their form in action.

If that’s the case, you just do the calls to Create New Thing (or Make Changes to a Thing) as soon as the user needs them.

1 Like