Porting a 100% local app to the web
actualbudget.com
actualbudget.com
For web:
* Easy deployment
* Better conversion rates (no installation)
* Easier login flow, support, a/b testing
For desktop: * Better tech (sqlite3 in this case)
* Super fast
* User owns the data
What struck me is that the advantages of the web are primarily sales and developer advantages and are focused around the novice user experience. Whereas the advantages of the desktop are primarily user-centric and affect the long-term or power users.I'm not sure this is generalizable to all web apps, but perhaps this distinction is why I always feel unsatisfied with the web app experience. I'm always happy to learn shortcut keys, tweak settings, and otherwise speed up the experience of apps I work with frequently. Basically I like being a power user. Web apps rarely cater to this desire and it feels like being stuck in perpetual "novice" mode.
Edit: s/mobile/web
But yeah, I definitely agree that it's easier to profile the network activity of a web app. It's pretty cool that you can just open the browser devtools and see all the network requests, and there's no way for a page to "fake" it. I like the web for that reason, and it's also why I leave the devtools on in the electron version on desktop (users could open it and do the same, but it's not as trustworthy, i.e. I could hack electron and fake it)
Yesterday I got a call from a tech support scam, claiming to be comcast security. The very first thing they instructed me to do was to download a desktop app, teamviewer. When I refused to do so, there was nothing else they could do besides read my name and address to me.
Such as? Apps that do exactly the same thing on the desktop version and the web version? desktop using what tech?
Pinboard is a good example of a fast web solution.
Most users do not know what a PWA is and won't install it unless it was done for them. Even then a PWA is at the mercy of the host browser's configuration and addons which can degrade the experience. (And on Apple devices it won't even work.)
I should mention though that desktop apps seem to have an order of magnitude conversion rate than web apps... it's been a slog.
Yes, those robust web apps that disappear as soon as the vendor loses interest, unlike those pesky desktop apps that work years after the vendor is dead.
Yep, I think you're right. By default the web sandboxes you into a naive client. I'm hoping to change that with still doing everything locally.
I've lost count of how many Windows-only and these days even MacOS-only apps I've seen. Similar story for Android or iOS.
I think they don't get made because of a) a cultural shift, and maybe also b) because the browser itself has some keyboard shortcuts that users may care about more (and don't want overridden). For example Twitter actually has a bunch of shortcuts and I usually invoke them on accident. But if your users are power-users then they probably know what features are available, and of course if you're using electron then the point is moot.
"Users don't want websites to override their keyboard shortcuts" is so right and so telling! We've all been burned by copying a Google search link, or had 'automated link attribution' spam our clipboards. Keyboard shortcuts should not be a "power user" feature but that's where we find ourselves, as the web subverts all user interactions.
document.addEventListener("keydown", (e) => {
if (e.ctrlKey && e.code === "KeyA") {
console.log("Shortcut pressed!")
}
})
I qualify the above as easy.> "Users don't want websites to override their keyboard shortcuts" is so right and so telling!
I mean, it's no different from an OS that has shortcuts that applications shouldn't override. The browser is just one more system layer. That may limit some of the specific shortcuts you may want to use (or not! you can override them if you deem that worthwhile to your users), but it doesn't make things "hard". At my company we solved this by adding Shift to every binding, which browsers hardly ever use.
And again, if you're using Electron, you don't even have to worry about that aspect because your user isn't exposed to the UI "as a website", meaning they won't be reloading, going back/forward, opening new tabs, etc which are the most common browser-level keybindings.
i can't hack dlls and local binaries, but i can easily make extensions and hack anything on the web to hell and back
The approach of "local app in the browser" works very well and is underrated IMO. It's the approach we use too - everything is downloaded via a Service Worker for offline support, and it's very responsive as nothing needs to wait on the network, unless the user chooses to (e.g. saving their work to Google Drive).
Chrome 86 also introduces the File System Access API [2] which is the icing on the cake - you can get read/write access to actual local files and folders, bypassing any issues about IndexedDB limits or persistence. I think this is one of the last pieces of the puzzle to make tools like Electron and NW.js more or less redundant, as now you can just do it directly in the browser and not have to ship the whole runtime around to everyone as well.
[1] https://www.construct.net [2] https://web.dev/file-system-access/
The problem is that those approaches require the developers to actually care about what browser the user has installed instead of pushing Chrome everywhere.
Yes, each Electron app ships a copy of node and Chromium engine, but user gets icon on a desktop, ability to manage windows with whatever window manager and utilities, hotkeys, tray icons, dedicated menu etc.
A few years ago I wrote a framework for daemon-based native/browser apps: https://github.com/jdarpinian/web-ui-skeleton. I used it for a benchmark that I wrote: https://google.github.io/latency-benchmark/ This approach is underused for sure.
Same can be done with web widgets, or a couple of utility daemons.
Well, at the end of the day don't complain about Google owning the Web.
And whatever its problems are, not being an Electron app is not one of them.
Jupyter Notebooks.
You do have to be careful to avoid security issues. XSRF could be a problem if your server exposes sensitive APIs. But XSRF is not unique to this approach, and the techniques for defending against it are well known. And Electron has security issues of its own which are probably more serious.
Overall I recommend the daemon + browser approach. The "benefit" to Electron of only having to support one browser is rarely realized in practice because you almost always want a hosted version of your app as well, and that needs to support all browsers anyway. For example Slack and VSCode both have web versions.
As I keep saying don't complain about Web == ChromeOS, when you push Electron everywhere.
How likely is this to get deprecated like the file system API, web SQL API and Chrome apps? I'm excited about this too but support is still poor https://caniuse.com/native-filesystem-api.
https://github.com/sql-js/sql.js
we also have a website with a cool URL
(Unfortunately the old repo URL is still the first result for "sql.js" on google)
If we want users to really own their data we have to give webapps somewhere to put it that’s in the user’s control.
How do they lose their data? Three ways, mostly:
1. They clear their browser cache, including data in IndexedDB, without realizing that will delete data from my app.
2. Some internal browser error. An error message pops up somewhere, they reload the page, and all the data is gone.
3. The browser intentionally deletes it because of a quota. In the old days, this was a theoretical concern - allowed by the spec, but browsers never did it. These days, it is a real thing that happens.
Something that helps a bit is the persistent storage API https://web.dev/persistent-storage/ but it's not ideal. Last I did a deep dive (like a year ago) it was not supported at all in Safari, and it was weird in Chrome (the browser would not allow the user to enable persistent storage unless the user had spent some unspecified about of time/activity on the website first).
My point is, overall it's kind of shitty. The data is local, but users are not in control. The browser is in control, and browsers these days seem to almost have contempt for users. The idea that users can manage their own data - preposterous, we must do it automatically in the background and give the user no control!
It's good enough for my app, but I would not want to put my budget data in IndexedDB.
(That being said, I do appreciate your blog post, and your architecture sounds pretty cool!)
I'd expect that desktop apps give you the ability to read files and write programs to transform them into another format (easier if the two formats are fairly open), whereas for cloud storage, you're left at the mercy of the two apps to develop integration.
Depending on the features you use your argument might fall flat though, how do I collaborate on a presentation? How can I easily share a presentation with a set of folks?
I like Keynote a lot, but Slides has it’s use cases as well.
I agree GSlides has its uses. Web apps are good for ephemeral tasks, but I use desktop apps for stuff I care about.
1: https://support.apple.com/guide/keynote/intro-to-collaborati...
Fun fact: 2003 was Keynote's public unveiling. Before that, it was a bespoke NeXTSTEP app created for Steve Jobs. (I'm not sure how old proto-Keynote is, but IIRC he'd used it publicly since the late 90s.)
More here: https://apple.fandom.com/wiki/Keynote
There's also the big difference that the app is local and we provide end-to-end encryption.
An example of a feature that YNAB doesn't have at all is custom rules: https://actualbudget.com/docs/other/rules/
It seems like, at least the first mentioned use case in Actual's documentation, is covered by YNAB already.
I feel this simple app is too over engineered.
https://actualbudget.com/docs/overview/syncing-across-device...