Building a Desktop Application for Datasette
simonwillison.net
simonwillison.net
>Datasette is a tool for exploring and publishing data. It helps people take data of any shape or size, analyze and explore it, and publish it as an interactive website and accompanying API.
At first, i was a bit confused because i thought of the Commodore C64 Datasette [0] and wondered why one would need a desktop app for that...
I believe there is a market for a heavily simplified RStudio - call it RStudio Light. My belief it would crush the market (excel users, novice RStudio users) who simply want to summarise, plot data.
My vision is for a simple desktop app (with the core data functions in R) almost based off something like - https://cran.r-project.org/web/packages/esquisse/vignettes/g...
I built a similar Desktop application where you can write SQL, though you will need to supply the CSV files. Here: https://superintendent.app
I started out just wanting a way to more easily connect code snippets, SQL, and graphs together. But it's evolved a bit more beyond that.
I want my stuff to be usable by people who don't understand (or need to understand) the difference between a desktop application, a web application and a command-line application.
https://en.wikipedia.org/wiki/Active_Desktop
https://en.wikipedia.org/wiki/HTML_Application
https://en.wikipedia.org/wiki/XUL
https://www.allaboutsymbian.com/features/item/The_Wonderful_...
Eventually Electron will join them.
> Eventually Electron will join them.
Perhaps it will, eventually, but not until we have better native desktop kits that fill the needs that Electron is serving right now and if they don't let you build apps with the most popular programming language in the world (that'd be JavaScript) then you can just forget it about it.
So I just tolerate it, while the pendulum reaches its point of maximum displacement.
"Whatever that is supposed to mean", but you've still been seeing it? That makes no sense. None of those kits you listed have nearly the same robust quality of UX or DX as Electron. None of the technologies listed here even had a dependency manager (LOL). 3 of the kits weren't even cross platform!
Tolerate it? By making off-topic complaints about it on every post about a desktop app built with Electron, in an attempt to deride the conversation about the actual subject? Without even have a suggestion for a decent alternative?
Clearly there's some sort of disconnect with reality here.
Decent alternatives are standard Web applications that don't help the goals of Google turning the Web into ChromeOS.
No, to tolerate something you need to have some measure of control over it in the first place. Given that you don’t have any control over Electron or other developers using it, you’re not actually tolerating anything. You have no choice in the matter. The only thing you could possibly do resembling tolerance would be to not comment on it... but you’re doing the opposite, even when nobody asked and in places you shouldn’t be.
You’re essentially just sitting here sneering at the community based on your ideology and your comments are not interesting or even practical.
Standard web applications that run in a browser are not an alternative and given that completely unreasonable suggestion I’ll just assume that this is satire.
Good luck stemming the tide!
It isn't a satire, it is the only place for applications on systems I own, either full Web or native, period.
On the systems I don't own, I tolerate Chrome packaged as "desktop" application.
I thought the satire was the suggestion that standard web apps can replace a desktop apps.
And it serves excellently as a framework for the desktop apps that use it. And that's why it's eating the market for purely native desktop apps.
Oh and Microsoft bought and uses the whole kit because they want to add to Chrome's hegemony right?
The small loud minority of HN complainers here should let them know that they're doing it all wrong. It's a whole 5 million lines of open source code - there's no way any other company but Google can maintain that! Brave doesn't exist either apparently.
Last I checked newer apps like Slack, Discord, VS Code and other market leaders use Electron to run on all platforms. I don't see a whole lot of new purely native desktop apps.
In any case, I use a Linux desktop for work so I'm quite happy either way.
I've run across him everywhere. From places like the D-lang forums, /r/java, /r/dotnet, /r/cpp, Hacker News, decades old mailing lists for Oberon development, etc.
I wish he would write more, in blog form. He seems to have been around for decades and to know many obscure things which the world has forgotten.
There's also not a programming language I've ever seen him not intimately know the history and nuances of.
He's like some sort of omnipresent hacker-sage. I don't write or keep a blog myself because I feel like I've got nothing useful to add to the world, but I've considered trying to interview certain obscure programmers and other people I've come across that I find really impressive and fascinating, to share their stories with the world.
This person would be very on high on that list.
Some abandoned modern alternatives included Chromeless[1], Positron[2][3] and qbrt[4][5].
While technically possible using Firefox's XULRunner functionality (`firefox --app app.ini` — mostly undocumented, potentially unsupported in the future), as far as I can tell, Mozilla has abandoned the Electron approach for XUL/Gecko bundling, which is a shame since Firefox itself is basically just an implementation on top of the Gecko XUL runtime.
> "[Firefox] is distributed as the combination of a Gecko XUL runtime — libxul, other shared libraries, and non-browser-specific resources like those in toolkit/ — plus a Firefox XUL application — mostly just the files in Contents/Resources/browser/, plus the 'firefox' stub executable that loads Gecko and points it at a XUL application" [6]
On Android, there is also Geckoview[7][8] for embedding gecko.
[0]: https://en.wikipedia.org/wiki/XULRunner
[1]: https://github.com/mozilla/chromeless
[2]: https://github.com/mozilla/positron
[3]: http://web.archive.org/web/20210227132731/https://mykzilla.o...
[4]: https://github.com/mozilla/qbrt
[5]: http://web.archive.org/web/20210601133844/https://mykzilla.o...
[6]: http://web.archive.org/web/20210227132731/https://mykzilla.o...
> You can do that in-tree by adding a XUL app to a fork of mozilla-central, like Positron does; you can do it out-of-tree in a distinct repo that uses a copy of Firefox and its –app flag to run the app, which I suspect is what mkaply is doing; or you can take a hybrid approach like Thunderbird (although this is deprecated and only supported for that app).
> In all cases, however, you’re building a XUL app, and a XUL app running on Firefox via –app is almost as capable and flexible as one built in-tree (except that you can’t make changes to Gecko itself).
> So it isn’t clear to me why developers wouldn’t build serious applications with that approach. Firefox itself is a serious application that uses that approach.
http://web.archive.org/web/20210227132731/https://mykzilla.o...
Why not create a simple Mac app with a web view? AFAIK the overhead of electron is more than 100MB, for an app that could probably be distributed as a ~10MB ZIP archive.
A native Mac app with a web view would also have much less RAM overhead -- and you wouldn't need to worry about updating Electron, since you would just be using frameworks bundled with macOS.
Sure, Electron is theoretically cross-platform. But you are going to need a lot of platform-specific code to package the app for macOS, Windows, or Linux anyway.
Anyway, just my two cents. Maybe Electron is less scary to get started for a web developer. But if you start a project like this, I really recommend giving AppKit and Swift a try. There's lots of examples out there. Native development is easier than you think.
Not really. The most platform-specific code I've got in my app is 1) the CI install instructions that use brew rather than apt-get [0] and 2) what exists in the application menu [1].
For packaging, electron-packager [2] handles everything else platform specific. So my Windows, Linux, and macOS builds share the exact same script [3]. The result gets zipped and uploaded to the relevant Github release page.
[0] https://github.com/multiprocessio/datastation/blob/master/.g...
[1] https://github.com/multiprocessio/datastation/blob/master/de...
[2] https://github.com/electron/electron-packager
[3] https://github.com/multiprocessio/datastation/blob/master/de...
Since my audience is developers and this is an early project I'm ok with them having to do the usual right-click Open and Open Anyway flow.
It's a step everyone needs to do regardless of electron or native.
So I don't think there's anything disingenuous here.
https://gs.statcounter.com/os-market-share/desktop/worldwide
Don't feel bad - I'm writing this on a Linux laptop which has less market share (2%) than "unknown" (8%) on that graph.
I know it is a resource hog but I'm glad Electron is around so that I have access to the latest mainstream apps.