8 ms·
As a web developer, I honestly hope the author of this post is wrong. Performance of modern web apps is simply awful compared to their native counterparts by an
by josephg 10y ago
As a web developer, I honestly hope the author of this post is wrong. Performance of modern web apps is simply awful compared to their native counterparts by any measure. They load slowly and consistently feel sluggish in comparison to proper native apps. Slack takes seconds to load and it'll happily sit on over a gig of ram while in use. (And remember, its a glorified IRC client.)
Web apps only have two benefits over native apps:
1. They're easier to build in a cross-platform way, because you just have to make the app once
2. Users don't need to install anything
I hope in the long run we solve both of those problems for native apps and move back to writing applications which don't depend on a DOM implementation to run. React-native is a great step toward solving (1). I hope that in time we can have modern (reactish), good looking cross-platform toolkit for native app development.
But the biggest hurdle is (2), which very few people are attacking. App stores have helped a lot, but we need to be able to run native apps without installing anything. It should be as easy as it is on the web. Unfortunately native app authors usually assume all their assets are bundled. Nobody even thinks about how long it takes from the point when a user decides to install an app to when they see the first content. On the web we count that time in milliseconds and on native apps we count minutes. There aren't any hard technical problems there - we obviously manage it on the web, so its easily possible. We need native apps to catch up if they are ever going to be able to compete as a platform.
- victorhooi 10y agoIs this a given though? What is stopping a progressive web-app from performing as well, or nearly as well (to be impercetible). I would have assumed that most of the time waiting is on network events - so using things like service workers to handle things asynchronously, and also handle caching would reduce things. I watched a presentation on how Google made the IO 2016 webapp (https://events.google.com/io2016/ https://events.google.com/io2016/): https://www.youtube.com/watch?v=__KvYxcIIm8 https://www.youtube.com/watch?v=__KvYxcIIm8 and they used quite a few clever tricks to tweak performance.
- bsder 10y ago> What is stopping a progressive web-app from performing as well, or nearly as well (to be impercetible). Direct access to graphics, direct access to network, and direct access to storage. The problem is that direct access to network and storage are ALSO security hazards.
- josephg 10y agoThe desktop is (slowly) making inroads on that front through app sandboxing, backported from mobile operating systems like ios and android. I really look forward to being able to run native apps on my desktop without worrying about the network & filesystem access they have.
- pjmlp 10y agoThat is the whole point. Native apps are fast and enjoy every feature the OS has to offer. Web apps are a pile of hacks that require conferences sharing clever tricks, usually browser specific, to make them usable at all.
- dfabulich 10y agoIn addition to the benefits you mention, web sites can be created/updated without anyone's approval, and web browsers make URLs prominent (which makes it easy to share content via any textual format). > Performance of modern web apps is simply awful compared to their native counterparts > There aren't any hard technical problems there - we obviously manage it on the web, so its easily possible "easily?" Didn't you just say we're managing it badly on the web? It turns out that it's quite difficult to develop an app-like experience that loads from scratch on a cellular connection and is ready for the user to interact in just seconds. The app folks will have it just as bad, if not worse, because they've got no practice.
- josephg 10y agoMy point is that the technical problems have been solved. That is to say, there aren't any new, difficult CS problems we have to figure out before we can bring the desktop up to par. Instead solving this problem will 'just' require tons of work. We need to improve our compilation toolchains to allow native apps to load progressively. We'll need better ways to monitor and analyse application size & performance. We'll need new libraries and we'll need buy in from vendors. And as thats going on we need to convince developers to actually care about this stuff. Again, all these problems have been solved for the web. We 'just' need to backport all that stuff to native apps. No question there's lots of work to do. But its all (obviously) solvable with code.
- the8472 10y agoThe unilateral updates and URLs pointing to remote content also have downsides. * it assumes you're online * features can be removed at any time even if the user relies on them * link rot * totally unsuited for sensitive data
- pedalpete 10y agoWhy would you want to solve the problems of native apps rather than solve the problem (there is only one) of web apps, which is the performance issue. Customers don't install apps for the most part. Why try to solve for that?
- josephg 10y agoWhy? Because building hack on top of hack is convenient, but terrible craftsmanship. The web today is a red hot mess of overlapping standards and inconsistent APIs. Google chrome is up to ~20M lines of code now, which makes it bigger than the linux kernel (with every device driver). Its basically a small virtualised operating system at this point. How many more lines of code do you think it'll take for chrome to feel fast and light again? Is it possible to achieve that by adding code, forever? And then to work around all the cruft in browsers we have frameworks like react - conceptually beautiful but which do layout by diffing thousands of DOM elements through javascript. The stack is a mess, and I don't see any direction it can possibly go but fatter, bigger and uglier than ever before. Forever. Surprisingly, this is a fate native apps have avoided. And in avoiding that fate new laptops have amazing battery life and work great. Well, until you open chrome or slack that is. > Customers don't install apps for the most part. Why try to solve for that? I don't write code for customers. I do it because as a kid I fell in love with the craft. I just... didn't fall in love with programming for this. Nope nope nope I want off the train before I throw up.
- dasil003 10y agoThe reason native apps have avoided that fate is because they are not cross-platform, they are entirely controlled by a single vendor. Of course you also have cross-platform GUI toolkits like Java and Qt, but they suck because they don't have true vendor support. The web has solved these things: it's an open standard which any serious device maker must support to be taken seriously. It can load applications in a relatively safe sandbox on demand. And it does all this with tremendous backwards compatibility that even 90s Microsoft would be envious of. You're absolutely right Chrome is a virtualized operating system, but that's what it takes to be open and cross platform. Designing a better platform is the easy part; getting it to cross the chasm where it has first class device vendor support on a majority of platforms is the practically insurmountable part. I'm not saying it can't happen, but I don't think any organized group of humans has the power to do it intentionally.
- SkyMarshal 10y agoRegarding #2 I feel like Oracle is dropping the ball here with Java for the desktop. They need to provide a lightweight JVM tailored specifically for desktop apps and for bundling into a self-contained install package, so that the app doesn't have to confuse users by downloading the JVM separately. Just pack it all into a single .msi/.dmg/.dpkg/etc, download one file, install it, and you're good to go. The JVM should be local to that app only, not global to the whole OS. The filesize may be a little bigger than native apps, and redundant if you install more than one of such apps, but in this day and age of high bandwidth and storage that's an acceptable tradeoff. I spent 2015 working on a Win/Mac/Linux app where this would have been the preferred solution, it was annoying that in 2016 it still doesn't exist and as a result we're getting janky Node.js-based platforms like Electron (http://electron.atom.io/ http://electron.atom.io/) instead. Qt and GTK are the only mature enough x-platform non-web-based options it seems, but Qt is not open source and GTK's look is dated.
- gioele 10y ago> Qt is not open source Not only is Qt open source, it is also free software according to FSF. Core Qt and most modules are released under the LGPL, the rest under the GPL. https://www.qt.io/licensing/ https://www.qt.io/licensing/ Qt even has a binding poison-pill promise that will make the code BSD-licensed should Qt (the company) stop releasing it. See https://www.kde.org/community/whatiskde/Software_License_Agreement_2015.pdf https://www.kde.org/community/whatiskde/Software_License_Agr... and https://www.kde.org/community/whatiskde/kdefreeqtfoundation.php https://www.kde.org/community/whatiskde/kdefreeqtfoundation....
- jaysoncena 10y agoHe's probably referring to QT5. If you're a for-profit business and using QT, most likely your software is closed-sourced which requires a commercial license. I've worked with a team who develops a windows app which still uses QT4. They cannot migrate to QT5 since it requires a commercial license.
- blub 10y ago
- paganel 10y ago> Performance of modern web apps is simply awful compared to their native counterparts by any measure For what is worth I can now only access FB from my phone using the browser (the web-app, so to speak), the native FB app has become ridiculously slow for quite some time. I use the native app only for uploading photos, once every 3 or 4 months. I'm using an iPhone 4 of which I'm still pretty happy, don't feel the need to drop 600+ euros on a New phone just yet if this one still does its job.
- rudedogg 10y agoThe app is said to have over 18,000 classes: http://quellish.tumblr.com/post/126712999812/how-on-earth-the-facebook-ios-application-is-so http://quellish.tumblr.com/post/126712999812/how-on-earth-th... I'm guessing that link will crash on mobile, it slows down chrome on a desktop.
- blub 10y agoThe native app tracks you harder, better but alas, not faster. This will be fixed once web apps get more capabilities, don't worry, the entire web development community (except the josephg fellow above) is praying for it.
- pjmlp 10y agoI am also voting along josephg. Since I returned back to native apps development, couldn't be happier, instead of having to deal daily with the crap and hacks on top of hacks, to make a stack designed for interactive documents work as a virtual machine.
- daleharvey 10y agoWeb apps do not need to be slow, they are slow because they are badly written or more usually rely on the network far too often. There is no reason <Button android:id="@+id/button" is faster than <button>
- aikah 10y ago> Web apps do not need to be slow They are slow because HTML rendering engines are slow, they are slow because Javascript engines aren't that fast compared to Java, C or Swift. Native frameworks don't need to deal with the complexity of an HTML layout and CSS. And native applications can be optimized to use way less memory than web apps. There is very little room for performance tuning in a web app, since it depends on the browser engine. Something good for a browser can degrade performances in another browser. > <Button android:id="@+id/button"> Isn't dynamic, it is inflated once and turned in a class instance. > <button> Is highly dynamic as it can be replaced by anything at any time in an HTML page.
- izacus 10y agoThe first one is also precompiled for quick parsing at compile time and doesn't burn battery/CPU every time a user accesses the app.
- daleharvey 10y agoRendering engines are capable of turning html into on screen drawn pixels more than fast enough for the user to perceive and are capable of maintaining 60fps drawing. JavaScript can certainly deal with handling user input faster than the user can perceive, rendering engines can 'inflate' html (cache the layer tree) of dom that hasnt been invalidated. While a commercial failure I worked on Firefox OS and we built an OS and application suite that on low end hardware compared often favorably than the equivalent on Android. The web does not need to be slower than native applications it just needs to be built better
- qwtel 10y ago> we built an OS and application suite that on low end hardware compared often favorably than the equivalent on Android I haven't heard this before. I assumed firefox os failed because the web stack proved to be too crufty for the low end hardware. Are you aware of any resources that go into more detail?
- on_and_off 10y agoInteresting that you mention #2. This is what Instant apps want to solve. tbh I wonder if it is that much of an issue but we are probably going to test it at some point. About #1. I am not that convinced that they are easier to build. Well they are, but building them in a way that fits each platform and performs well looks harder than making 2 apps. I should mention that I work in a 30 devs teams (half iOS, half Android) working on the same in-house app. I do believe that there is some potential to reduce duplicated work with something like j2objc. It is probably not the definitive expression of this concept, but it seems to me that it should be possible to share a lot of the business logic and this is what this tool aims to do. Some of the data objects should be shareable as well. All the rest : UI, integrating with the Home screen, notifications, services, et cetera is just very specific to the platform and IMO should be written specifically for each platform. I am still waiting for the perfect kotlin-to-swift library allowing that.
- claudiug 10y agoYou are following that guy on twitter, you will he is a avid javascript guy. So you can take his words with a grain of salt. I never see any web app one mobile feel good. But you never know. also, with kotlin and swift doing native app is not that complicated. Learning a new API on top of native API I don't think is safe. Also, google, apple they can change the rules and parts of the apps don't work anymore for x reason.