Post 9iTO3zyUUfBQnIzHRQ by artlogic@mastodon.social
(DIR) More posts by artlogic@mastodon.social
(DIR) Post #9iT9xiZoromnjvYgwi by codesections@fosstodon.org
2019-05-04T14:23:03Z
1 likes, 0 repeats
There's a certain app architecture that I don't see all that often and I wonder if anyone knows why it's not more popular.Here's what I have in mind: a local server web server that exposes a web-based GUI.You see this sort of design with router configuration pages or, for example, the #piHole admin page. But it seems like it would be a good fit for a bunch of apps (including Mastodon clients)—it seems to have all the advantages of #electron without the bloatSo why isn't it more common?
(DIR) Post #9iTA81IC8ZN2gJE8gq by lynnesbian@fedi.lynnesbian.space
2019-05-04T14:24:50Z
0 likes, 0 repeats
@codesections one example i can think of is syncthing, which runs a web UI that's only accessible from localhost by default, but can be configured to be accessible globally
(DIR) Post #9iTADOaSxIqgNPKvtw by alexcleac@mastodon.technology
2019-05-04T14:25:53Z
0 likes, 0 repeats
@codesections in my opinion, such interfaces are good only for applications for administration and development purposes, because it is a bit harder to ship such an application to user. Also most of the users expect the browser to open website, while it is a bit harder for them to understand that it is *so* easy to run a server on their machine :)
(DIR) Post #9iTALPxLkVSiwIrj4S by HerraBRE@mastodon.xyz
2019-05-04T14:27:03Z
0 likes, 0 repeats
@codesections Having done this with #Mailpile, I definitely got the impression that we were going against the grain.It def adds cognitive load to the user: they have to understand that this window they're looking at and interacting with, does not directly represent the app doing the work.They have to go elsewhere to turn it on, and just closing the tab doesn't switch it off.Turns out, most non-techies are extremely confused about where computation happens. This makes things MORE confusing.
(DIR) Post #9iTAW475IjPSNcUosK by marxjohnson@octodon.social
2019-05-04T14:28:24Z
0 likes, 0 repeats
@codesections I suppose one issue is that if you've got lots of apps all trying to run local web servers, there'd be contention for memorable-numbered ports. Not an issue on something like a router where the UI is the only app doing this.
(DIR) Post #9iTAaxTZPEQvF6LYUS by zalandocalrissian@ieji.de
2019-05-04T14:29:23Z
0 likes, 0 repeats
@codesections1) i think the concept that something inside your browser is actually not on the network is non-intuitive for non-technical users.2) with electron, the developer knows which browser features are available. when relying on the user's browser, you'd have to support other browsers.3) starting/stopping the app: some things make sense as an always-on service where you visit the web interface from time to time. others (e.g. https://www.balena.io/etcher/ ) don't make sense that way.
(DIR) Post #9iTJqbQ64oLl3eFysK by artlogic@mastodon.social
2019-05-04T16:13:50Z
0 likes, 0 repeats
@codesections #electron also gives you access to features and services the browser doesn't. Do you need access to the filesystem? What about a full network socket? Both aren't going to happen in browser.
(DIR) Post #9iTLl4nS8qIqL4fqWO by codesections@fosstodon.org
2019-05-04T16:35:15Z
0 likes, 0 repeats
@artlogic > #electron also gives you access to features and services the browser doesn't. Do you need access to the filesystem? What about a full network socket? Both aren't going to happen in browser.But I'm talking about having a locally installed server. Unless I'm very confused, Electron wouldn't give you access to anything you couldn't access from the server, would it?
(DIR) Post #9iTMFQTg62jiGjtczA by artlogic@mastodon.social
2019-05-04T16:40:43Z
0 likes, 0 repeats
@codesections the network socket is probably a bad example, but if you need someone to save and load files from the filesystem using a server, you'll end up reimplementing the systems file chooser, and that's not going to make things easier for anyone.
(DIR) Post #9iTMjKaAZzXkflBzVI by codesections@fosstodon.org
2019-05-04T16:46:11Z
0 likes, 0 repeats
@artlogic fair point, if you want the user to select/name a file to save to. If you just want to save state, though, you could just write to a database—which seems like it would be plenty for a lot of electron apps
(DIR) Post #9iTO3zyUUfBQnIzHRQ by artlogic@mastodon.social
2019-05-04T17:01:05Z
0 likes, 0 repeats
@codesections Thinking about it further, even exposing a network socket ends up being a lot of work if you want to do something event based. Your server would have to basically be a websocket bridge between your web app and the system. It's possible, but definitely more of a pain.
(DIR) Post #9iTa8tJTt3Sf22u9tg by alcinnz@floss.social
2019-05-04T19:16:25Z
0 likes, 0 repeats
@codesections I'm increasingly implementing new Odysseus this way, though since they're part of the browser I don't have to touch the network to do so.I've implemented a very powerful templating language capable of accessing the Web and an SQLite database, and those pages tend to be very independent.