Transcript
In this Quick Tip, we’re going to learn about naming our data types and fields.
This is subjective as you can name your data type and fields to whatever you’d like. Since Bubble is so flexible, you can even name data types and fields with spaces in between words. The key here as you have the ability to be as descriptive as you can, so you can keep track of it as you build, so you don’t have to ask yourself what is this later on. As you’re being descriptive, keep in mind two things: duplicates and plurals.
We recommend naming types and fields singularly as Bubble will automatically pluralize it by adding the appropriate 's' to the end of your name. For example, you may think that you wanna have many Events so you would name the data type Events. But if we do this and Search for Events, we now see the Bubble appends the S making it Eventses wherever we use it. By keeping it singular, the pluralization is handled for you and your types and fields will make more sense. Again, Bubble is flexible so, if this isn’t your style, take this as a recommendation.
Be on the lookout for duplication. For example, we have a data type named Event, but we also have an option set named Event. If we try to define a Type of content, we won’t know which one is which. So in naming things with the same name, try to add something more descriptive so when you go to use it, you can easily identify the one you mean.
That’s it for this Quick Tip! For more, be sure to check out bubble.io/academy.