Just a few weeks until the 2021 JavaScript Full-Stack Bootcamp opens.
Signup to the waiting list!
I was thinking about a new web application (still in the idea phase) and I was thinking that I would like it to be 100% frontend. I don’t have a need for a backend, and I thought to use IndexedDB as the main database for the application data.
See my complete IndexedDB tutorial
IndexedDB is a W3C standard and it’s built into the browser. The fact that it’s built into the browser should give you the following advantages:
- There is zero cost associated with storing data, and transmitting data over the network. It’s all local
- You do not need to worry about storing the data on your servers
- There are no scaling issues whatsoever. You can have 1 or 10M users without having to do anything on the tech side
- There are no issues with GDPR (and other regulations) data handling overhead (I think! Not a GDPR expert)
- Data is secure by default, at least on your side. The user has to worry about it
If you think about using it, there are some downsides that might change your mind.
The first m and bigger one, is that Safari will wipe out IndexedDB (and other local storage) after 7 days of inactivity on the site. This means that if you don’t visit the site for more than 7 days, your data is gone. On iOS and on the Mac, too.
All the other browsers have a way to ask users permission to persist the data, but Safari does not and this is a big show stopper.
Other downsides? You do not have access to the data unless in the moment the user opens the app, which prevents to add some kind of functionality that for example relies on using this data in the backend when the user is not using the app.
Another problem of this approach is cross-device sync. IndexedDB lives inside the browser, so if you access the app from your phone, the data cannot be accessed, without creating some kind of syncing service. Which.. is a backend, in the end.
So I think the only option, without creating a half-assed application that is not usable by Safari is to have a backend and store the data there.
And think about IndexedDB as good for temporary data, not long-term storage.
The 2021 JavaScript Full-Stack Bootcamp will start at the end of March 2021. Don't miss this opportunity, signup to the waiting list!
More lab tutorials:
- The stack I use to run this blog
- 8 good reasons to become a software developer
- SEO for developers writing blogs
- Review of the book The 4-Hour Work Week
- Build a lifestyle business
- Build your own platform
- As an indie maker, what kind of product should you build?
- Create your own job security
- Developers, learn marketing
- The freedom of a product business
- Generating value
- Have a purpose for your business
- The idea is nothing
- The niche
- Remote working for software developers
- Product / market fit
- The best podcasts for frontend developers
- Why should I create an email list?
- Disconnect time from money
- The scarcity principle applied to software products
- The social proof principle
- How I added Dark Mode to my website
- My notes on the Deep Work book
- The pros of using a boring stack
- How to estimate programming time
- On going independent as a developer
- How to learn how to learn
- Why interview questions for programming jobs are so difficult?
- Do I need a degree to be a programmer?
- Everyone can learn programming
- How to be productive
- How to get the real number of pageviews of a static site
- Have you filled a developer bucket today?
- How I record my videos
- All the software projects I made in the past
- Tutorial purgatory from the perspective of a tutorial maker
- Every developer should have a blog. Hereβs why, and how to stick with it
- Having a business mindset for developers
- How to write Unmaintainable Code
- What is Imposter Syndrome
- How to work from home without going crazy
- How I stopped worrying and learned to love the JavaScript ecosystem
- How I prototype a Web Page
- You should be the worst developer in your team
- How to start a blog using Hugo
- Write what you don't know
- How to block distractions using uBlock Origin
- Coding is an art
- I wrote 1 blog post every day for 2 years. Here's 5 things I learned about SEO
- Dealing with the fire
- On being a generalist
- The Developerβs Dilemma
- My plan for being hired as a Go developer. In 2017
- Productivity gains of using a Mac and an iOS device
- How to go from tutorials to your own project
- This is my little Digital Garden
- How to start freelancing as a developer
- Sharing the Journey Towards Building a Software Product Business
- Subfolder vs subdomain
- How I use text expanding to save time
- Software is a superpower
- I love books
- How I decided to create a new projects management app
- On using IndexedDB as the main database