Local First

posted in
Local First
With the advent of HTML5, localStorage, mature javascript client libraries, ubiquitous REST APIs and mobile apps, we don't need to rely as heavily on cloud providers to develop our applications  It's time to change how we are writing our apps.

What is local first?
Similar to mobile-first (where you build your app to work well first on mobile, and then expand out to other devices), Local First is the idea that you can build a web app that works first as a disconnected app.  You can synchronize to cloud providers if you want, but your app should work locally.  

What are the concepts behind local first?

Cloud-optional
- Your app should still work without cloud storage.  

Data-permissions
- User data should not be sent to a cloud provider without permission.

Network-optional
- Once installed, apps should run without need for an internet connection.

Cloud-choice
- Users should be able to choose appropriate cloud providers for data storage.

Cloud-provenance
- Cloud providers should clearly document where your data is stored in understandable language

Why Local First?
There are many reasons to build your apps local first.  Performance and Stability, User Adoption, and Privacy

Performance and Stability
Local apps will have less dependency on network calls.    This will (usually) make them perform better.  If your network goes down, or is slow, firewalled, or otherwise encumbered, your app still works.   Less headaches for you as a developer.

Adoption
Users are increasingly concerned with their privacy.  Your application is probably losing users since they are uncomfortable with how you are using their data.  Many corporate networks simply will not allow your data to be stored on cloud providers (other than their own networks).   

Government privacy concerns
Government snooping continues to increase.  It's a losing battle (PIPA, CISPA) to fight governments who are intent on monitoring our internet usage and data.  As more governments gain control of the internet (with different points of view on the importance of free speech and privacy), your data will be in more hands.    By all means, let's continue to slow them down. But more importantly, let's make sure our data is not centralized.  

What's next?
The idea here is that this is not a centralized approach, so the conversation shouldn't be centralized as well.   As a developer, the next thing is to try and build an app this way.  Don't start with a SQL database and server application.  Start with a client application that works without the cloud.   If you've already been doing this, share how you do it.  Post your code.    Use #localfirst in your tweets, or somewhere in your posts, so we can track local first activity.    

What I'm going to do next
I've built my latest app undo.io in rails as a web-first app.  I'm going to spend a few weeks flipping it to local first.  I'll share how that works on my blog 

Find a problem or mistake? File a bug or better yet, submit a pull request
Copyright © 2010 - 2022 - Doug Tarr