Oh
Hey, I didn't see you there. Well come on a little bit closer
What's this? Oh, it's a very special drink. I prepared it just this morning
Well before I tell you what it is, would you like to try some?
No, it's actually poop drink. Mm-hmm. Hmm, very
Healthy very tasty in a strange way. It's not the sort of thing
You want to drink every day?
But every now and then you want just flush your system with recycled water just to get things going again
The topic for today is hybrid mobile app development and I thought I would give you some of my thoughts on how the whole state
of things are with regards to flutter, react native,
Web views, and just general app development across Android iOS and web. This comes at a time when we've seen companies like Airbnb
recently sunsetting their use of react native and we've also seen other companies having poor experiences with hybrid app development like the next-door,
Coursera, Udacity, and so I think this is an area that we need to be careful about when we look at which
technologies were choosing to use and
It's not just about which technology you're choosing
But when you're using the technologies and in my mind, you can categorize a native app into three categories
We have fully native apps that need high interactivity
Then we have apps are basically like web views and then we have apps that maybe somewhere in between using hybrid technology
100% pure native app development is
A pretty expensive thing these days like you got the develop not only your mobile web presence
But you need to have a separate code base for Android and another one for iOS, but I think this makes sense
Especially for larger companies like say the top 50 apps or so
These apps have millions of users and if they can go all native and increase the usage of the app by say even 1%
It's generally worth while because they can generate millions of dollars in revenue just from a 1% increase in usage. Now
there is a statistic that came out a while back that said Americans install on average zero apps per month and that's probably
exaggerated but it's clear that the enthusiasm for installing apps has probably gone down quite a bit if you're one of those top apps that
users are using then you want to make sure that you're giving users a really good experience
The code startup time should be very good, performance should be good,
the app should function smoothly and it generally make sense to add support for user gestures,
animations, and a lot of these things you can really only do with a fully native application, especially since there's so much competition
There's an analogy that I like, which is that as a photographer
You need to get the best photo and you know, you can take a hundred photos of something
But you only pick one and that's kind of the same with app development
Like it doesn't matter if there's like five or ten versions of an app for say reddit
Users will generally pick the one best app and that's the only one that they'll install so it's a winner-takes-all scenario
That's why sometimes you need to ask yourself
Are you going to have competition from other app developers?
and
If you will
then I would say the native app is going to win because if you start developing your app in say web views or
Flutter or React native or something?
And then another guy comes along and puts it the time to develop the app fully native
faster more fluid supports gestures all of that good stuff
Then all they need to do is spend a few months to copy your app
Make it fully native add in a few more features and they would have beaten your app, just like that. The main negative point
of native app development
is that you need to develop the app twice, once in Android, one in iOS, and maybe even once for the mobile web
And the old days you could just develop for say one platform like iPhone and capture a large percentage of the market
but these days it's not so easy because
IPhone is only like 40 percent or so of the US market
Maybe 20 percent of the global market
and then Android is capturing the rest of the market. So you really need to be developing for both platforms
and I think that makes it especially difficult for indie developers and startups these days because they need to invest twice the
resources to get an app going.
Now the other side of the coin is we have apps that really in my opinion have no business being apps
They're basically web views
They don't have a lot of native features and they're essentially native app shells that contain just a webview
Examples of these types of apps are like the iOS App Store is actually done with web views
The Amazon app is also using a lot of web views
Like if you go to the Amazon mobile site
It looks almost exactly the same as the Amazon app that you open up. Other sorts of apps may also make sense as web views
like a car insurance app or health insurance app
Where all you want to do is just check some basic information
And generally these apps will have a few native features maybe being able to log in with face the ID or something like that
Now I know some developers will here a webview and just immediately think oh that's garbage and then they just throw away the idea
But it's important to remember that if you take a look at the app market in China
They're using WeChat and WeChat has built this whole platform of apps built on web views many companies
There are building on WeChat and just building web view applications
It's cross-platform and what a platform like WeChat may be able to provide are just some quick
Integration points like quick login without needing to use a password, payment information
so people don't have to keep entering their credit cards, push notifications, access to location, quick bookmarks so that they get distribution
Now the other good point about web views is if you have a mobile website
You've already got most of the code probably and you only have to write once and reach three platforms by using a webview
I think that for smaller companies, especially now when the phone devices are much more powerful
Web views may be something that you can consider
I've used web views myself to great success and in my opinion the Amazon app shows how impressive web view technology can be
It's a top app. It has great reviews. Now that brings us to the most interesting category of apps; which is hybrid app technology
That's where I think technologies like xamarin, flutter, react native, Cordova, titanium,
All of these may be very interesting to take a look at. If you look at some of these
technologies like xamarin, flutter, native script, most of these were built in mind with the idea that
The entire app would be built on this technology
if you want some of the top apps using your technology you need to make sure that it is
incrementally adoptable
on the page by page basis and not only that I think it's very risky to bet your home mobile app strategy on
some brand new technology that hasn't quite yet been proven like
some developers found xamarin to be kind of slow and
If it turns out that your app is too big and xamarin can't compile your app quickly anymore
Then you need to rebuild your whole app
now flutter is relatively new on the market and flutter is interesting because
The technology is based on a canvas and you essentially control every single pixel on that canvas
It's using like game graphics technology to do that type of thing
The thing to know is that it will never purely be native
Like text may not be selectable the way you think it should be selectable. User input widgets, forms text fields,
accessibility, all of that is not going to work the way you normally think it would work, it's going to be a simulation
but at the same time if you adopt a certain design philosophy like say material design then
Your app is going to at least always be up to spec to say material design philosophies
So I think the user interface design of your app is going to be a key consideration here
I think flutter is still pretty early though. It has some issues supporting things like inline map views inline video playback
voiceover and accessibility may act a little bit weird and to me the biggest issue with flutter so far is they don't support
incremental pages option, so
your whole app needs to be in flutter if you want to use it so that brings us to react native which is in my
Mind the only technology that has heavily invested in being
Incrementally adoptable on the page by page basis that makes it easy to integrate into native
Applications and it gives you a chance of becoming very popular because then you'll see top
Applications that are generally going to be pure native
They may have usage cases for react native in scenarios where they don't need that last ounce of performance
Like say settings pages, analytics pages, profile pages, things like that
And I would imagine that when other technologies like flutter are better able to support page by page incremental adoption
that they could also become more used and again for the US market
I think that web views are sort of an underrated technology and may also be quite usable in these scenarios
React native is a cross-platform technology built by Facebook using javascript core to build cross-platform features
So it's important to keep in mind
I would say that react native is still a
technology that is under quick development and recently the team announced that they would be doing a complete
re-architecture of the internals of react native to make it more
performant and address some of the issues
I would say that in any scenario where you're starting to mix technologies. You want to keep in mind
That's very possible to get the worst of both worlds. Where
Developers will need to learn two different technologies you're mixing and matching different technologies on different pages
It becomes very difficult to maintain the app to refactor the app, you
You may have gone in there thinking that you could ship over-the-air app updates without an app store release
But if your technology is still tied to native technology and you're mixing and matching components, you'll find that
in order to ship a complete feature you may still have native app components that will need to be built into the binary
and so you still need to wait for that app store release process. The thing to know about adopting any new technology is
You don't want to underestimate the amount of investment in infrastructure and tooling that you may need to add to support that new
technology. You probably need to add support for bridging API calls, code linters,
accessibility,
internationalization, offline support,
exposing the networking layer, and so forth
So I would encourage you to think carefully about whether the advantages outweigh the disadvantages
And the investment support that you will need to add because often the largest cost and code is not going to be in the initial
Development of the feature but in the additional long-term investment and maintaining that feature and beyond that you may find
refactoring is just very difficult. Like if you want to implement say dark theme across the whole app
And this is something that you want to keep in mind, I believe in iOS 12
It's rumored that iOS will support dark theme
So if you want your app to be at the cutting edge
You know can all of these hybrid technologies support dark theme. Having implemented dark theme for the YouTube iOS app
Hope you guys are enjoying that out there
I found this simpler to do when most of the app was built on the same underlying
technology, and I could just do large search and replaces create
Infrastructure and tooling that would only need to be done once if there was some hybrid technology like say web views, react native, flutter,
integrated into the app that would have doubled or tripled the amount of work
I had to do and increase a lot of the maintenance and tooling support that needs to be built in
So this comes back to the question of when you should be using hybrid
technology and I would say you want to find areas of your app that you can easily isolate
Like say the settings page and that's going to look and feel different than the rest of your app
And that's okay and for scenarios like that
You may be able to get a boost out of switching your technology stack entirely
You want to keep in mind that the entire tech stack is going to be different
You're going to have a second way to do everything
Two ways to create buttons two ways to create text labels a second way to do control flow business logic
accessibility
Internationalization the networking stack may be different
The way images are loaded may be different offline access, you know
Like if you want your app to be offline first and have very good offline capabilities
Then you're going to need to build other support for persisting offline data
That infrastructure is going to have to be duplicated for both technologies
so the way I like to think of it is, it's almost like two apps and one and ideally developers aren't
switching context from one app to another app
If you're using react native the chances are you may be using Redux control-flow,
Which is a very different way about thinking of the app compared to say 'mother view controller
Which is the general technique that iOS is recommending. I mean, the entire language is going to be different
So to summarize my main points though hybrid technology generally works best when you're in the native application and then you can segment off certain
portions of your app to be built in the hybrid app technology and it may be a completely different team that is managing that
portion of the app so that developers don't have to keep context switching between different languages . Finally,
I would say that native app development is not something to be underestimated like the app space is very competitive
these days. Users are expecting more from their apps
they're not installing as many apps as they used to. we've seen that increasing performance,
decreasing co-start latencies and making the app fluid and smooth can really increase the app usage
But at the same time we have seen that webview technology has been coming a long way especially in China
Where a lot of businesses are building web views instead of full native applications
And I think this would be a great direction for US companies to go towards to
Once we have a platform like that
Which I think it's kind of a shame that we don't have a webview app platform like that yet. I see a lot of apps that
In my mind, I just wonder like why didn't they just build this with a web app?
Why did they go through all the trouble of creating and natively on both platforms?
Although let me talk about web views for a moment here on
IOS, at least we have UI webview and WK webview. UI webview, in my opinion, was a great technology because it ran in the same
Process space as the app, so it would never get booted from memory. Wk webview
Sometimes when you come back to the app from a background process the WK webview
could be booted from memory and all you'll be seeing is a blank screen and then you have to manually
refresh that app, and you could be losing state
If you did that. For UI web view you can also intercept Network requests and load the assets that are locally offline
For wk webview
You can't intercept network requests and you can't load local files unless you were to run a local web server on the phone itself
so
It's kind of a pain to use WK webview
The main benefit of WK web view in my mind is that it is using the JavaScript nitro engine, which is much faster
But for my personal apps, I would always just up for UI webview, Cordova
which was basically like PhoneGap using webview technology for cross-platform app development was also primarily using UI webview and
Now Apple has announced that they're deprecated in UI webview. They don't want anyone to use it
So everyone has to migrate over to WK webview?
WK webview is a more performant webview technology
but it's also less flexible and it gives developers less controls and in my mind if Apple can just
Expose something like UI webview with all of its original flexibility,
but running the JavaScript nitro engine that would probably bring webview technology much further and
Then there are the hybrid apps where maybe you don't really care much about performance or quality
You're just trying to move fast
I think these make sense for smaller businesses
and startups and my opinion for that, where you want to start with is probably like a native base and then use cross-platform
technologies that general flexibility, in my opinion, is a great thing to have. you know
locking yourself into a certain technology like say xamarin technology or flutter technology or
Native scripts, Cordova, PhoneGap, something like that that lock-in is something that you won't be careful about
So personally if it were me I would be considering technologies like full native app development
Maybe mixing a few web views for non important screens, if there were some other pages of the app where I wanted some more
performance, I would look at
technologies that I could incrementally adopt, probably the strongest one on the market now is react native but flutter is starting to build out this capability
Experimentally, and as soon as that comes online, I think that could also be a very interesting technology. So there you go
Those are my thoughts. I'm very curious to see what you guys think. again
what I'm trying to do is kind of kick off a discussion and
Post your thoughts in the comments below and if you liked the video, please give it a like and subscribe
It really helps the channel. I'll see you next time
Bye