8 ms·
200 bytes for the business logic. 47MB for the UI & boilerplate around the business logic. I get that this may be the easiest way to develop and publish an ap
by paxys 1y ago
200 bytes for the business logic.
47MB for the UI & boilerplate around the business logic.
I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.
- ryandrake 1y agoI so strongly wish more developers gave even a single shit about this. The current state of desktop app development is truly an embarrassment.
- malnourish 1y agoWho is embarrassed? What are the realized harms?
- PaulHoule 1y agoMicrosoft seems to have given up on guidance for how to write desktop apps, Windows 8 had that Metro thing that got rejected by the world. I guess you could use Win32, WinForms, WPF or something else. The incoherence is second only to the Linux world, I remember how developers were crazy about theming in Win32 in the ‘95 age so something like Back Orifice or the app for your scanner looks atrocious. WPF added really great support for theming but at the point everybody was burned out in theming so it hardly ever got used.
- chuckadams 1y agoMetro goes back to Windows XP Media Center, and frankly was one of the best UIs ever. Also used by the very underappreciated Zune (which was not helped by its drab hardware design or MS's PlayForSureWeMeanItThisTime DRM)
- PaulHoule 1y agoI had a $99 Windows tablet that I thought was a great value and totally easy to use, but, like every other tablet I've had, I mostly used it to browse the web. Zune was pretty good but the only program that deserves the name "It plays for sure" is VLC.
- LauraMedia 1y agoThere is a deeper problem in this: The DX for native applications is too annoying, undocumented or hard for most people. I tried to build some of my tools without Electron, it's always a battle of multiple documentations for multiple systems and creating a bespoke system or having to deal with UI documentations that are glorified API references without examples. The last few tools I built used PhotinoNET, which gave me an electron-esque framework but not bundling it's own chromium, instead using the browser already on the system. And even that required a complicated build script so I can just export a simple flatpak, exe and dmg...
- aeonik 1y agoModern app bloat in one analogy: Business logic size: ~20 bytes Total app size: ~47 MB = 47,000,000 bytes Bloat factor: 47,000,000 / 20 = 2,350,000 Let’s scale this up and say the business logic is 1 pound. Then the whole app would weigh: 1 lb × 2,350,000 = 2,350,000 pounds What weighs ~2.35 million pounds? - A fully loaded Boeing 747-8: ~987,000 lbs - Another fully loaded 747-8: ~987,000 lbs - A blue whale: ~330,000 lbs TOTAL: ~2,304,000 lbs The business logic is like shipping a 1 lb object (a book, a flash drive, whatever) by loading it into two fully loaded 747s and strapping a blue whale on top. Just to run 20 bytes of logic.
- WD-42 1y agoThis is a cool visualization, thanks.
- aquafox 1y agoOn a related note: Transporting a human in a car is (in relation to weight and size) like using a standard shopping cart to transport two 1L bottles of water. So the next time you walk through a pedestrian area, imagine everyone carrying a bag would use a shopping cart instead. That would be a huge traffic jam -- exactly like what you see on the road!
- WD-42 1y agoI've been pretty aware of this ever since I became a cyclist. I will ride down to the corner store to pick up a six pack and some chips, throw them in a backpack and ride back. It's easy. I see people driving their cars to do the same thing. All that weight and space for a 6 bottles of beer. There is massive waste all around us.
- lostlogin 1y agoThere is also the time component. Off peak and with a decent sized backpack (change of clothes, laptop, food etc) it takes me the same time to go 6km as it does to drive it. At peak it’s 1/4 to 1/3rd the time. Cars are slow around town.
- righthand 1y agoIt’s not the easiest way just the most evangelized. A Qt app even would be a few lines of code, but we’ve done a good job scaring people that learning other languages is bad because we can’t ship features fast enough with non-evangelized frameworks.
- anthk 1y agoEven TCL/TK would be smaller.
- righthand 1y agoEvery framework under the sun gives you a `main()` func to call your program code. But if all you’ve ever used is blogs telling you how to hack together an electron app, you’d probably assume electron was the gold standard for simplicity sake but in reality is the gold standard for Google’s sake (and whatever marketing company’s).
- PaulHoule 1y agoYuck! Funny though I wrote a program for making red-cyan anaglyph stereograms using TkInter/Python. Stereograms work best when you can put important objects at the plane of the paper/screen and this is done by sliding the left and right images relative to each other. Tk has no color management, unlike newer frameworks, which was good in this case because I asked for (255,0,0) and got (255,0,0). When I exported to JPEG and views on a web browser though I got something like (186, 16, 16) because on my wide gamut monitor the native primaries are more saturated than sRGB primaries so some white gets blended in to make them less saturated. Turns out in Windows, screenshots are in the color space of your monitor! It’s something you’d never notice unless you made stereograms because that little bit of green and blue goes to the wrong eye.
- mistercow 1y agoI keep thinking that this could be solved by just building Electron into the OS as a shared framework so we don't have to have a separate copy for every app, but the more I dig into it, the more I realize I'm just reinventing the web browser.
- mixmastamyk 1y agoTauri: https://tauri.app/ https://tauri.app/
- paxys 1y agoYou are describing PWAs, but they'll never have the same API access & permissions as a native app.
- mistercow 1y agoYeah, and I think it’s worth asking why there. Why do we not just have a standard for PWAs with privileged OS access? There are two obvious answers. The first is portability. And sure, but Electron provides an answer here, so why can’t we provide one with PWAs? We could even have OSes define this interface for different browsers to target in a standardized way. Yes, you need platform specific code, but that’s often the situation with Electron too. The other answer is security. But how is Electron / any other installed app any better? Because we require more explicit consent before installing a “real” app than for installing a PWA? OK so, just let’s just do that for PWAs too.
- thisislife2 1y agoThere is something called the "WebView" in all the major platforms. The idea is that it allows you to use the browser engine only for creating the UI. But people complain its not "enough" because it is not the same on all the platform (it is if you use it just for UI), restricts access to some browser APIs (ignoring the fact that the OS often offers the same, even and more APIs) and Javascript (a crappy language for creating software applications).
- lxgr 1y agoWow, they optimized the minimal Electron app down to 47 MB?
- runlaszlorun 1y agoSadly this was also my reaction.
- CommenterPerson 1y agoAre they doing something additional with the 47MB - 200 bytes? Like selling you to the brokers?
- WJW 1y agoNot even. It's just overhead.
- dbalatero 1y agoTo be fair, the author didn't make this to impress people with byte optimizations, they probably just wanted to publish an app quickly that is useful, and was familiar enough with Electron or JS to do so.
- thwarted 1y agoThose who don't learn /usr/bin are destined to reinvent it, poorly.
- tomrod 1y agoWhat does this mean? I've always understood /usr/bin to be the storage dump for system binaries. Do you see or use it another way?
- GTP 1y agoThey likely mean that you already have in there all what is needed to change your laptop WiFi card's MAC address, without needing an additional application.
- unixhero 1y agoYes but you need a space station OS (Unix) to enjoy the terseness of 47-200 bytes of business logic. ps: I love both space stations and Unix
- yjftsjthsd-h 1y agoI guess, but the OS is a fixed cost that you already have
- amlib 1y agoThe solution to this problem requires you to interact with the OS, so a solution that requires tools found in the OS itself isn't a bad one. Its so simple you can have a script triggered by a desktop shortcut and be done with it. That all said, a simple GUI API provided by the OS for simple programs like this would be nice, just to give the user better feedback on the process. Is it done? Is it doing anything? Did it run correctly? Etc.. Zenity on linux kinda does that but is not guaranteed to be installed...
- kjkjadksj 1y agoWhy do you need that in gui when you already have it in cli through pid?
- deleted 1y ago[deleted]
- kzrdude 1y agoAnd notice the other abstraction too. This is not 'an app to change MAC address' but an app to 'overcome WiFi time limits'.
- ncr100 1y agoCough, AI Training Models, Cough There's great power in abstraction. Disagree? Your point is that an operating system, and its shell, all running on a machine, and a collection of apps, are somehow smaller than a wrapper application. I'm curious the amount of bytes the entire stack, minus the chrome which is the complaint I believe, how many bytes that is. I would say probably a gig.
- PaulHoule 1y agoA few years back I did an eval of ways to make cross platform apps, specifically to escape Electron, and came to the conclusion that ‘they all suck’ except maybe JavaFX. Thing is, most x-platform frameworks still require a big download. Java and Python runtimes are in the same ballpark as Electron.
- runlaszlorun 1y agoAnd sadly my reaction to 47MB these days is "hey not bad" given that I see 6 or 700 MB apps not doing much .
- sli 1y agoIt just seems to me like far less work to just write a real binary that execs this static command than it does to setup a whole Electron project.