Hi FF community and hiya Inactive Member
So in a few days I'll likely publish a FULLY-FUNCTIONAL COMPLETE MVP-READY OFFLINE No-Code database management plugin built for Flutterflow. This plugin (basically a set of Data Types, actions and functions) would allow FF community builders build ANY type of offline application they want without any coding needed and that's EXACTLY why I am making this post.
I am making it for my own peace of mind. Too often I have a LOT of questions to answer, calls to jump on and I have noticed a lot of "support requests" we all do in the community, while we do love helping out, they are mostly because our builders don't know these stuff yet. So I'm making this post to EXPLAIN the A-Z of what an offline database is. What to reasonably expect from an offline database. When to use an offline database and when not to use an offline database. Also LIMITATIONS of an offline database.
Again this is because offline database is one of the most POPULAR requests on the FF wishlist but it's often stemming from a place of our builders not really understanding what they're asking for. Many people want Firebase, but they want Firebase offline. So after I release this offline database I will not be surprised when I start hearing very interesting requests like "Can I use this with push notifications" ๐ญ
"I want to make an API call to fetch data from..."
Yet these our wonderful builders want an offline database ๐ญ
So I'm just trying to make clear what an offline Database is. And MAJORITY of app use cases are going to need an ONLINE database not offline. I built this offline database management system just because of two users (I'll acknowledge them in the release post when I release the database plugin whom I admire their grit) and they have super unique use cases that perfectly fit for offline. Also because I myself in building a Machine integration application and it just makes sense for me to have offline DB too. So let's dive in
What is an offline Database?
An offline database is a data store that is RESIDENT on the local device that the application is running on. Meaning the DATA is stored in the hard disk of the device the software is running on. Simple. Now this is very important to understand because it makes you understand a couple of KEY points:
Offline Databases DO NOT NEED internet and thus by design are NOT DESIGNED to do so for their everyday operations
Offline Databases because they're not connected to the internet ARE SELF-ISOLATED by design. This is a very powerful security feature but also means there shall be NO live syncing of data between multiple devices โ ๏ธ NONE.
Each device will have a COMPLETE STANDALONE database of its own and will have no business with any other device in most use cases.
Syncing an Offline Database with an online database is NOT CHILD'S PLAY, AT ALL and absolutely should be done using platform services like POWERSYNC and FIREBASE Firestore of course.
Storing raw media (video images etc) in a local database is not wise any day of the week, and definitely not on Sunday ๐ . I'm kidding but seriously, bad things happen to people who continue to store raw media files directly in their offline databases. Very bad things.
The plugin I will release is 100% free (like everything I've released before it), but please, if you can Donate to any open source project you can it is what encourages open source plugin Developers to continue to build. My favourites are (pdf, let's encrypt, get_storage, hive, orthanc and ohif). Feel free to please to make a donation to them if you benefit from the offline database I've use them all in the past and they helped me build my project so I'm paying forward by building this for free hoping you encourage them too.
Finally OFFLINE DATABASES COME EMPTY! Yes, your database will be EMPTY the first time your user signs up, unless you manually load data into it when your app starts up which will then require a short ONLINE connection, then after which it can remain offline forever (kinda like how Microsoft office does when you first install it). And NO, you cannot load data in to your database manually because REMEMBER (the database is running on the local device disk, so that'd would basically mean you have to load the data on the local device of EACH user you have manually ๐ ). So this is NOT like Supabase or Firebase where you will have 19 rows of data that "I want to use to test my API call. I am really begging that you read this post and understand. Some support questions truly exasperate ๐ฅฒ offline databases are OFFLINE. So anything internet is LAST RESORT because if not then there's no point of 'offline', why not use online databases instead.
When should I use an offline Database?
Good question! I thought you'd never ask. Well
If/when your app will work in a situation where it will never or VERY RARELY ever need to connect to the internet (rarely like 1ce in 3 months connection need)
If/when each instance of your application will run in ISOLATION so there'd be no "collaboration or co working" the app itself is enough to all it needs and will be so for a long time
If/when your application doesn't need to share it's information with any third-party it creates and consumes all the data it needs locally.
AN APPLICATION SYNCHRONIZATION LAYER IS DIFFERENT FROM A DATABASE
Many people need an offline sync layer to be able to make their app offline tolerant. But they erroneously believe they need a local database! No. They do not. If you need to Sync. I still recommend you use Firebase Firestore or you use POWERSYNC (if you're on Supabase).
SUPPORT REQUESTS FOR THIS PLUGIN
I will simply be UNABLE to respond to any support requests for this plugin because time is something I don't have plenty of anymore unfortunately. The instructions in the release post will be CRYSTAL clear. The link to the project maintained by the maintainer will be provided. Please just go on and build. You will have no issues as long as you read the documentation and follow the instructions STRICTLY. There is NO CODING required so please DO NOT EVER EVER touch the code unless you ABSOLUTELY know what you're doing (which in that case feel free to improve the code and share back with the community project maintainer).
Thank you for taking time out to read this long post. Thank you Abel and Inactive Member for a great tool and a great community. Thanks Serge Middendorf (you're gonna like this one I'm releasing ๐๐ฅ)
I'll post the Actual project of the Plugin's maintainer after I have sent over the updates to him. Thanks FF Community and happy building
Agent D ๐ฅ