In today's landscape, deciding between building a native app or a web app can significantly impact your project's success and user experience. As technology advances and user expectations continue to evolve, the decision-making process becomes increasingly complex. Let's dive into the key considerations that can help you determine what is right for you, a native app or a web app. We'll also look at real-world examples of apps and examine the reasons behind their choice of development approach.
To App or Not: When to Choose Native or Web
AI Generated Video Summary
The Talk discusses the choice between building native or web apps for software development. It explores the benefits of building web apps, such as fast development, easy debugging, and universal rendering. It also highlights the power of native apps, with their advanced features, better offline experience, and monetization opportunities. The Talk suggests using libraries like Capacitor or React Native to combine the benefits of both web and native apps.
1. Introduction and App Distribution
I have an opportunity for you all to join me in building the latest and greatest product. It includes a compelling UI library and AI for contextual information. I need help figuring out the best way to distribute it as there are multiple paths to choose from. Should we build a native app or a web app?
Okay, I only have like 20-ish minutes but I have an opportunity for you all and I would like to invite you to join me. So I'm building the latest and greatest product these days. It's got a compelling UI library that I personally know and love. It includes a bunch of AI in there so that way we can provide contextual information to all of our users. I gotta figure out the last part but it's something to do with how we can get that app out to everybody. And that's the part I'd like to actually invite you to help me figure out. What is the best way to distribute this? Really at the end of the day I want to make sure that this app is available to everybody. It's a really really difficult thing to figure out because there's multiple distribution paths to how you can ship an app and which path you choose is going to influence how you actually go ahead and build the app. So let's go ahead and try to walk through this process. We're going to figure out if we should app or not, whether or not we should ship this app as a native app or as a web app.
2. The First App and Native vs. Web
This is the story of the first app I built in 2012. It was a time when mobile apps were necessary to be taken seriously as a company. As a web developer, I had to learn Xcode and deal with low-level languages. Android development was also challenging at the time. However, both iOS and Android have come a long way since then. I questioned why we didn't just build a web app, but that was the time of native apps.
I'm Mike Hardington, I work at a company called Ionic. You can find me basically everywhere online as mhardington.
But again, I kept pushing for, why don't we just do this as a web app? This is the time of the web, right? Everything's gonna be great. I didn't need to build and deploy up my web app. I just needed to bundle all my scripts together and then bring up the FTP client. I had my credentials. I knew where the folder was on my desktop. I could just drag it over to our hosting provider, upload it, and we're done, right? And that was 2012.
3. Building a Web App
And, you know, it's only gotten better for the web, where now, instead of having to deal with FTP, we can just go ahead and run a commit and push it up to our main Git service and then trigger a bunch of actions, whether or not we are using something like CircleCI, GitHub Actions. All of our builds and our deployments can be automated, so that way, as soon as we push Netlify, Vercel, Firebase, what have you, can pick up those changes and handle everything else for us.
So, it's easy to see that all of those three platforms, Android, iOS, and even the web, have gotten a lot better over the times. And we still have this eternal question as developers, you know, should we build a mobile app or not? Should we build a web app or not? And I want to walk through some of the pros and cons of each of these platforms. I'm a longtime fan of the web so I will try not to be so biased towards it, but there's a lot of great capabilities from both of these platforms that we should really consider as we start to build out our products.
And the languages that we know for building these features and these UI are also compelling. With those tools and these languages kind of in our skill set, our ability to build something on the web is incredibly fast. Compared to what we can do in native, we're not spending a whole lot of time with this build, compile lifecycle. We are literally opening up our dev server and then we can see the changes happening in our app instantly on the client. Which is super valuable. The ability to be able to inspect everything right in the environment that it is actually going to be deployed in, and actually look at all of those nodes, means that we're spending less time having to debug the actual app itself and more time just figuring out, how are we building the layout? Why is this style not being applied? Where can I make some changes to optimize it for usability? Our ability to take all of the stuff and just iterate and iterate really quickly, cannot be undersold.
Now, this may look like the USB symbol, but this is actually the symbol for universal. At least in my headcanon. The ability to be able to take something for the web and deploy it, is pretty universal. I can only think of maybe a handful of devices that actually cannot render web content. Where as I can think of so many places where web content can be rendered. Obviously, we have our desktop environments, we have our mobile browsers, but we also have payment kiosks. We also have the control center for NASA. They are all using web technologies to actually render out the UI. Because it is so fast, because it is universal, because it is things that they all know, and can be able to be productive really quickly.
Moving on with that, we have things like, we have powerful features inside of the web that allow us to build better apps than we have ever been able to. If we take a look at some of the features on what the web can do, you can show us that obviously we can do things like WebRTC, we can do some push notifications, we can do USB and NFC, all these cool features that are baked into the browser that the native devs have always kind of hung over our heads as, oh, the web will never be able to do this. But the web is a story of always being able to catch up. And with those features, we're seeing that the web can be pushed forward to do new and incredible things.
4. Web Development Benefits
And not only do it in a way that gives us powerful features, but do it in a way that's going to give us very performant features. We're going to be conscious about the energy footprint about what we build. We're not going to be shipping things that prove to be able to reduce the user's battery their device. As well as their desktop. Because we're just not going to do that. It's just a bad experience for users.
5. The Power of Native
Then, at the end of the day, when they are building that app, they're not shipping a bunch of files that need to be loaded up and fetched. They're shipping one binary, which is incredible, meaning that we're not having to have all of this extra fluff, we just have a single binary that holds all of the knowledge of our app. And, really, that's it. The optimization aspect of these build chains cannot be undersold. You can write really, really bad Swift in Java, and then the optimizer is going to come in there and actually make sure that it's turned a little bit more performant. Which is really, really nice, especially if you don't know what you're doing, like me.
Native also has the advantage in being able to get a lot of low level device features, things like Bluetooth, NFC, more refined geolocation, and file system access. These are things that the web are trying to get today, and if you've been following along with some of the features that are trying to be shipped in the browser, it's a pretty contentious conversations that are being had. A lot of this is being led by folks who fly under a certain browser flag. While the step towards progress is great, they are missing out on a lot of features and alienating a lot of other browsers and browser vendors. Compare that to native, which has all these features and then actually is able to provide a permissions management system so that way users know exactly why the device is asking to be able to connect to things on Bluetooth, be able to connect to things on NFC, or on your local network, or even store data onto the file system. There's a permission model that does not exist on the web that is clear to the users, and developers have the ability to provide meaningful descriptions. If it comes to find out that a developer is doing some nefarious action, their app can be terminated.
6. Native Apps vs. Web Apps
Native apps have better discoverability and monetization opportunities compared to web apps. Native apps can be easily found and downloaded from app stores, while web apps rely on search engine rankings. Native apps allow developers to charge for their apps or offer in-app purchases, providing more opportunities to monetize their work. On the other hand, web apps often rely on third-party ads or direct support from users. However, it is possible to combine the benefits of the web and native apps using libraries that enhance web apps with additional functionality and platform access.
There's a safety in the fact that we are giving privileged access to those features that the stores and the platform providers are able to protect the users from, which is really, really, really nice. In addition to that, Native also has a little bit of a better discoverability story. Now, discoverability can mean a lot of things. It can mean just, hey, here's the link to the app, go ahead and click on it and it automatically downloads it for you from the store. Or it can just mean going into the store and being able to search for the app that you want and the store is being like, we got you, no need to provide any more, here are the search hints, here's the app that you want. Compare this to the web discoverability. People actually have to know what they're looking for by being able to search for it through various search engines. And if you haven't played really good SEO games, you're not going to rank well. We have to play the ranking game inside of these search engines. Otherwise, we're just not going to be available. You could be third fourth fifth, you could be all the way on the dreaded page two of your search results. And if you're not first, you're last. So discoverability for native apps tends to be a little bit better. And I think the thing that's the most important monetization. I don't like to talk about monetization too much because you know, it's it's a very sensitive subject for for folks, but building a native app actually gives you more opportunities to monetize your work. Whereas the web, one of the common ways to monetize your work is with ads. You can actually charge for your app on the App Store, 99 cents, $1.99, $4.99 I've seen it where people actually want up, people actually see the amount of value you provide and are encouraged to pay for it. And if that's not your way of working, you could provide a free version of your app and then add on features using in-app purchases. Now you do have to pay a little bit of a tax to the platforms, both Google and Apple. But you still have a chance to be able to recoup some money on the time and effort you put into building your product versus a web where, yeah, you got third-party ads. No one really likes them. You have ad blockers. It's really not a great story unless somebody is directly supporting you through, you know, Patreon or other sorts of direct creator monetization models. The web does not succeed here. Native actually does a pretty good job with this. So we come back to the question. There's a lot of goods from both sides. Is there any way we can kind of combine those two to create the benefits of the web but with the capabilities, the reach, the platform security, and the extra efforts and niceties of Native? Well, yeah, there's ways we can do this. There's libraries out there that exist today that allow you to take, say, your simple React app, provide some extra functionality through extra libraries where you can say, hey, I want to have access to a file system. I want to be able to deploy this to iOS, to Android.
7. Building Web and Native Apps
Capacitor and React Native allow developers to create both web and Native apps, reaching more users and getting the best of both worlds. Choose the web for familiar languages, fast development, and ubiquitous deployment. Choose Native for resilience to network changes, access to rich features, and a good monetization model. To combine the benefits, use Capacitor or React Native to leverage existing web knowledge and build a better product.
And on here, we can see that we're just calling file system.makdir, file system.readdir. We're even able to hook into those permission models using file system.request.permissions. Now, this is something using a library called Capacitor. It allows you to take your web app, be able to package it as a Native app, and still have access to all the Native project configuration and Native code that you could add in addition to whatever you're doing in the web.
And I'd be remiss if I didn't mention stuff like React Native, where you can take your existing Native app and start to sprinkle in some of that React code as well. Now, both of these options allow developers to create not only a web app but also a Native app and be able to reach more users and get the best of both worlds.
So, how do we break this down again? We're going to pick the web if we want familiar languages, a very fast development environment, and a kind of common, ubiquitous approach to being able to deploy and load that app everywhere. Well, we're going to also pick Native if we want something that's resilient to network changes, having access to rich features like Bluetooth and NFC, and if we want to have a good monetization model. But if we want the best of both worlds, we're going to want to reach for something like Capacitor or React Native, where we can take our existing web knowledge, and actually go ahead and load all of that and build a better product.
Now, I'm biased because I do work on some of the stuff inside of Capacitor, and I would highly encourage you to check it out. If you go to CapacitorJS.com, you can check out how easy it is to adopt Capacitor into your existing projects without having to go through any migration or bug fixing. Evaluation of your existing libraries. You can just drop it in there, and you're off to the races. So with that, I think I have a good idea of how I want to build my app, so I would encourage all of you to go forth and build really cool stuff. I'm curious to see what you all build, and best of luck out there.