Progressive Web Apps (PWA)
Pages: 1 2
Neil Carmichael (8509) 3 posts |
I like the idea of progressive web apps, in particular the cross-browser way it can make an app work on an OS the original developer never even thought of! Is there a browser that supports these on RiscOS yet? Because of Google using them on Chromebook, there are PWAs for mainstream things like Twitter and telegram (as well as games and more homebrew things) Can RiscOS do the same trick that iOS and Android does of giving them an application icon in the OS as if they are a “real” application? |
Rick Murray (539) 13840 posts |
Something Java was trying to do two decades ago; but needed a separate runtime environment because browser support was in its infancy.
The problem is that while it is “lightweight” and “open” in terms of having one app run almost everywhere (some API elements are browser specific), we do run into the problem that they are not efficient. You’re using a massively overcomplicated renderer and scripting system to run an application that would likely be faster/smaller/better if it was available as a native app. Then let’s consider the implications of giving the browser access rights to things like the filesystem. With individual apps, you can control what gets run and what it can access. But the browser? The browser is best considered your effective global attack vector, where it is best to lock it down as much as possible. My browser of choice is Firefox and my policy of choice is to disallow by default. There’s a part of me that thinks that PWA is intended for app developers, not app users.
Isn’t that basically just a shortcut link with a pretty picture attached? If so, all you need is to create an app directory, give it a sprite, and have the !Run file start a web link. A few other checks (like ensuring there’s a browser available) and Robert is your mother’s brother. |
Neil Carmichael (8509) 3 posts |
“they are not efficient…This sort of thing is important on mobile devices” I agree, but if someone is running it on a raspPi (plugged into the mains), for example, they might care more about having a greater selection of apps, than underlying efficiency. I had an argument once about a browser-based “remote desktop client” that worked just using javascript. I was complaining about how stupidly inefficient the design had to be to do that, but the person I was talking to didn’t care, as long as with one click (and no-installation) he was able to do what he wanted…he didn’t care! |
David J. Ruck (33) 1635 posts |
Web apps are the antipithis of RISC OS – they require a humugously large browser to run a javascript program very slowly in a sandbox. Where as on RISC OS we have small efficent applications which interact with each other via drag and drop. I use RISC OS for what RISC OS is good at, and for web applications I have dozen different devices from smartphones to laptops which would be able to run them far better. |
Michael Gerbracht (180) 104 posts |
I just want to mention that it would be possible to write e.g. a RISC OS twitter app. The disadvantage is that you need to write an individual app for every service. The advantage is that it can be a real style guide conform and efficient RISC OS App. This works for all services which have a public API (for twitter you can find it here). BTW. there is a RISC OS app for telegram: !ChatCube supports the telegram protocol. |
David Feugey (2125) 2709 posts |
There is a good helper here, Weboob: https://weboob.org/ Could MicroPython be a candidate for this? |
David J. Ruck (33) 1635 posts |
Very fast and optimised might be a bit of a challenge. I’ve got some Python command line programs that on run the same Raspberry Pi 3B under RISC OS and Raspbian Buster. RISC OS Python 2.7.16 vs Linux 2.7.13 is 1.8x slower. RISC OS Python 3.8a6 vs Linux 3.7.3 is 2x slower. Some of this could be due to running programs in a TaskWindow on RISC OS, as I have one C program that is 1.6x slower than running on a Linux terminal, but some others are supposedly 6x faster which I find hard to beleive. |
Rick Murray (539) 13840 posts |
When the alternative is running it in a browser, an implementation written in BASIC would probably be “very fast and optimised” in comparison. [I’ll get my coat…] |
Bryan Hogan (339) 592 posts |
RISCOSBits would be proud of some of those app titles – Boobsize, Flatboob, Handjoob, and Wetboobs :-) |
Rick Murray (539) 13840 posts |
Oh, look. Colour me surprised… https://www.theregister.com/2020/07/31/w3c_progressive_web_app_privacy/ |
Entony (8619) 1 post |
If we are talking about PWA, then now its parts are mentioned in the context of “progressive web apps vs native apps”: It is also a very relevant question today, how exactly your application will look like. And the most interesting thing is that discussions on this topic are still ongoing. You can check this article about similar topic: https://www.cleveroad.com/blog/progressive-web-apps-vs-native-apps-who-is-going-to-win-this-battle |
Steve Pampling (1551) 8170 posts |
Some of it could be due to Linux using all the available CPU cores, while RO uses just the one. |
Grahame Parish (436) 481 posts |
ARM processors can have literal Thumbs, of course |
Rick Murray (539) 13840 posts |
I suspect Entony is a spambot, however the question isn’t so much speed, it’s security. Are you happy having a website pick up an application of unknown providence and run it on your machine with a list of privileges you wouldn’t normally give unknown code, and much harder censoring given that browsers seem to be falling over themselves to destroy aggressive content blocking (the just a touch under half a billion dollars that Google throws to Mozilla every year is probably why Firefox is being distorted into a lame impression of Chrome and having its content blocking abilities broken by design). I don’t choose PWA, and as long as I have a choice, I won’t. |
Rick Murray (539) 13840 posts |
Just to add – when you’re dealing with anything “internet” assume the rest of the world is out to get you. Complacency will only get you pain. It’s a shame IoT devices drop that lesson in the hands of the hapless users rather than instituting security within the design. |
Theo Markettos (89) 919 posts |
A PWA is running in the same browser sandbox that a web browser tab is. If you’re happy to run it in a browser tab, you can run in a PWA. There are rights the app can ask for (video, audio, location, notifications) just like a browser tab. They have similar privacy implications to a web page. I use Electron app-ified versions of Microsoft Teams and Onenote on Linux – they’re not going to write Linux versions of those apps, let alone RISC OS ones. They mostly work fine – not quite as good as the native apps, but not far off (I’m not sure Teams has a native app or if they’re all PWA). However they are heavyweight, and I think RISC OS would likely struggle even with a suitable browser – the scheduling just isn’t that great for managing large multithreaded workloads. The other issue is that running multiple apps may not share code/data space between them, meaning they take a lot of memory. |
Steffen Huber (91) 1953 posts |
Teams has AFAIK no native variant, and it shows everywhere. A usability nightmare and a resource hog. I have to endure it on Windows. |
Steve Pampling (1551) 8170 posts |
So, you don’t think it’s wonderful and absolutely essential that everyone that could talk on the phone from office to office can see the people they are talking to – about day-to-day trivia? Resource hog you say? |
Charlotte Benton (8631) 168 posts |
Web Apps are generally awful (and indeed the antithesis of the RISC OS paradigm) but unfortunately the world is going in that direction, and failing to keep up will simply add to the list of things RISC OS can’t do. In a perverse way it could be beneficial, as if Iris is capable of running web apps at an acceptable speed, the list of things RISC OS can’t do might be reduced. |
Terje Slettebø (285) 275 posts |
As someone who’s been working for a couple of decades doing web application development, I’m clearly not against them. :) There are many advantages with web applications (progressive or otherwise) over regular desktop applications, one being the ability to easily deploy new versions without anyone having to install anything. I understand the points having been made by those against web applications, but I think it’s important to consider all the sides of a technology, and to start out with, it’s a little ironic that you guys state you’re against web applications when this site and forum is one such application. :) I think PWAs have great potential, because it means you may use a single code base to target any kind of platform. Without it, you need completely different systems for each of web, iOS, Android, and whatever else you want to support, which is a huge additional cost. I know that this was earlier tried with Java, but I also feel it’s different this time around. Java was basically a black box in a web page (an applet), which didn’t interact with the rest of the page. In contrast, modern web applications are based on HTML, CSS and JavaScript all working together. As an aside, does those of you who are against web applications do any kind of Internet banking, or do you go still to the physical bank to do bank business? What about buying things online, do you do that? All these things are web applications, unless you somehow define the term differently than what is common. How would you do these things without web applications? |
Steffen Huber (91) 1953 posts |
Actually, Java Applets can communicate with other Applets, as well as via Javascript with other parts of the page. And it was absolutely trivial to provide the same application as standalone and as Applet. And Java WebStart at least tried to solve the “how do I deploy those applications”. But yes, it is surely different this time around – look at Electron apps and find out why they consume a gigabyte of memory, have glacial speed and provide a UI experience that rivals Windows 3.1 (e.g. scrollbar behaviour). Don’t get me wrong, SPAs and modern web apps in general are a big improvement on static webpages. But I think that UX wise we lost around 20 years of progress. The look&feel of apps is all over the place. And the browser is your new OS. This roughly doubles the RAM you need to get your work done. |
Terje Slettebø (285) 275 posts |
Agreed, and I found it quite tragic when years ago, some companies tried to make their desktop applications more “web-like” (blue links, etc.), in a sense negating the advantages of having a native application in the first place. Don’t get me wrong, either, I like native applications, and I very much look forward to getting back into RISC OS application development. Web applications have an advantage of being accessible over the web on different platforms, but native applications, whether it’s desktop or mobile apps, certainly have their advantages as well, not at least having full access to the platform, and unlimited potential in terms of the user interface. Unfortunately, it’s not just for web applications that the look & feel is all over the place, it goes for native applications as well. I think it’s really sad that the promise of GUIs as originally conceived has not been met, save for one platform: RISC OS The promise? A consistent user interface where all applications work in the same way. In RISC OS, once you learn how load and save works, you can use it in any application. Same thing for other UI elements, like the menu. It all works in the same way, consistently and reliably. When it comes to Windows: Where is the menu…? :) It’s bad enough that the menu is at the top of the page, so you need to go there just to choose something from the menu, but many applications now does their best to abolish the menu in the first place, hiding it away in obscure places, or splitting the functionality into different menus, so you need to look all over the place to find all the options. I could write pages and pages of “Why I love RISC OS”, but I’d be preaching to the converted, so I’ll stop. :) |
Rick Murray (539) 13840 posts |
Can’t speak for modern Windows, but a heck of a lot of Android apps are massive (~30MB) wrappers around the site. I know this because it loads up exactly the same as the mobile version of the site and, when things go pear, it’s a 404 or 502.
Dunno about that. It works on NetSurf so I’d say more “web” than “application”. ;-p
That’s exactly it. It also means that should we ever have a sufficiently capable browser, even we could use this new fangled magic.
As an introvert in the middle of a pandemic, I quite like to use the internet to handle my banking. It means I don’t have to interact with actual real people.
Only Amazon. For food, clothes, etc I like to see, feel, and compare. Online shopping with a few photos isn’t the same, not at all.
What is common? This, right here, it isn’t an “application”, it’s a “forum”. Back when we had forums and sites that could do clever stuff, nobody called them applications. That’s a more recent thing. I’d certainly say that Google Docs is an application. It turns your browser into a word processor (and does a surprisingly good job). But where do you draw the line? Personally, for me, I’d say it’s a website if it looks like a website, and an application if it doesn’t. Docs doesn’t look like a site. It has a toolbar, menu bars, work area… it’s basically like a simplified version of Word.
Good for deployment, bad because it means you expect people to run code of unknown provenance each time, especially given how many third party things a typical site/app pulls in from elsewhere.
I believe the term is “progress”. There’s no point making and selling new computers unless you have sone tasks that make the older ones run like crap. ;-)
Perhaps thinking ahead for the time when the native app would simply be a web view version of the site? If the native app looked like the site, they could probably switch it without anybody noticing.
You’d have thought. But Docs is a pretty dismal native app. It offers about the minimum necessary to be functional. Indeed the only reason to use it is because it can work offline and it’s less crashy than a browser.
Throw some shade at Ubuntu too. The one I tried in the past (brown/orange) looked like a nicer version of Windows with menus at the top of each window. The most recent (sorry, I don’t know the versions, I think it was purple themed?) did that awful Mac thing with putting the menu relating to the current window at the top of the screen. Like, the last place I’d think to look, and instantly more mouse-metres in getting to it (probably even more annoying with a touchpad). RISC OS got this very right. Hide menus until needed, and when needed put them exactly where needed. |
Steve Pampling (1551) 8170 posts |
I haven’t been beyond the end of my driveway (just longer than the car) since December 18th. One day in the office, filling in for sick/annual leave takers. As to interactions with physical people – the milkman collects real money every other Friday. Which, of course, means I need to go to a magic money box before this Friday evening.
Christ on a bicycle, I thought that died in the 1990s. I had to do some work on one and thought either I was going to get RSI elbow or the Mac was going to get something heavy embedded in the screen (or both) |
Charlotte Benton (8631) 168 posts |
The distinction between a website and a web app is a continuum. This forum is towards the website end of the spectrum, and it’s probably better off that way. It’s when you’re implementing things like word processors and spreadsheets in a web browser that it becomes silly. |
Pages: 1 2