Published on 2018-08-15.
This post is inspired by this Reddit post and I want to expand upon my comment.
This post assumes familiarity with web development and makes a lot of guesstimates.
For front end applications (i.e. apps with a user interface), the web will be preferred over native for an increasing number of cases.
Web apps can already do most of the things a mobile app can do. They have access to the location, bluetooth, sensors, and can even send notifications (see What Web Can Do Today for more). As more hardware-related APIs become accessible via the browser, web apps will get closer and closer to doing everything a mobile app can do.
Web apps can go offline and be available on your homescreen (checkout Progressive Web Apps). So you can use a web app that only needs access to the Internet to either fetch content or update itself, which is exactly what content-focused mobile apps do today. Building a progressive web app will become easier over time as more tooling for it becomes available. CLI tools like
@vue/cli have made setting up a progressive web app quick (albeit I can confirm configuring the progressive web app with
@vue/cli is a frustrating experience at the time of this post).
Using a web app for the first time is significantly smoother than using a mobile app for the first time. To use a web app, just visit a link (and, if it's a Progressive Web App, then maybe add it to your homescreen). To use a mobile app, you either visit a link or you search for it, then you download it, wait for it to download, and then open the app (which is usually slowest the first time around). The process of using a mobile app for the first time will take several seconds more than using a web app for the first time. This level of friction is at least one reason why we don't download apps too often.
A central marketplace makes it easy for users to discover apps. Plus, those apps are usually scanned for malware. Mobile apps have central market places (e.g. Play Store) but web apps do not have a central market place.
If there's no market place for web apps, and web apps could make mobile apps mostly obsolete, then we'll have to let word-of-mouth or search engines decide what we download.
Android P's slices being extended to web apps would be pretty neat. There'd be no need for even installing the web app. Just Google "uber to home" and make a payment.
Why build separate desktop apps for Windows, MacOS, and Linux or separate mobile apps for Android and iOS when you can just build one web app that runs everywhere? Right now, there are tools for doing something similar (e.g. React Native, Electron) but these tools either transpile developer's code to native code, produce another browser, produce resource-intensive/inefficient apps, or a combination of those.
I bet before we see desktop apps being fazed out in favor of offline progressive web apps, we'll see something similar to Electron but with almost none of the drawbacks because it'll use WebAssembly for the near-native performance.
Today, mobile and desktop apps almost always outperform their web app counter parts. Heavy games are almost always mobile or desktop apps. But with the onset of WebAssembly, web apps will attain near-native performance despite still being in the browser. The performance gap between web apps and native apps is going to shrink drastically.
We'll see games like League of Legends and Fortnite being played in the browser with a negligible or near negligible drop in performance. Here's a demo of a game built with Unity and ported to WebAssembly.
As mentioned in the previous paragraph, WebAssembly will increase the performance of web apps. But how will WebAssembly impact how we build web apps?
WebAssembly is a target for compilers and it's unlikely one would write WebAssembly by hand. So developers will build web apps using programming languages that compile to WebAssembly ahead of time (AOT) and then ship the resulting WebAssembly modules.
I doubt it; there will be native apps with user interfaces but it won't be anywhere near as common as it is today. It'll likely be reserved for apps that need the absolute best possible performance and maybe security. As far as security is concerned, I don't know if either web or native is clearly a better option. However, I suspect governmental bodies will prefer native because the idea of being in control of the hardware and not being connected to the Internet sounds like it must be more secure.
Lots of exciting stuff happening and about to happen with the web. Most front end applications will be on the web within the next two decades. Few jobs in mobile or desktop app development will remain.
Full disclosure: I'm attending university and, apart from internships, I do not have real world experience in software development. I may be terribly wrong about many things in this post.