I gave a talk at 360iDev in 2018 and discussed the different ways to build mobile apps for both the Android and iOS platforms. In doing so, I compared the three major categories of mobile development: web-based, cross-platform, and native, and explore the question: Is Native iOS Dev Always Best?
1. Is Native iOS Dev Always
Best?
Vui Nguyen
sunfishempire.com
@sunfishgurl
2. Building a Mobile App for Two
Platforms: What Are Your
Choices?Web-Based/Wrapper
Cordova/PhoneGap, Ionic
Cross Platform
Titanium, Xamarin, React Native
2 Fully Native Apps
Objective-C, Swift, Java, Kotlin
3. How do you choose? It depends
on
your situation
Entrepreneur
Freelance dev
Corporate dev
what you’re building
my recommendations
5. My Journey as a Mobile Dev
(Highlights)
Laid off from corporate job as Java dev in 2009
We were still in the throes of the Great Recession ….
Did web design, and learned I was not a designer!
Then “smartphones” came out
6. I wanted to be an Entrepreneur
I wanted to have it all!
Build an app that can run on all the platforms - make
lots of $$ from residuals
Work as a freelancer so I can be my own boss
“All” I had to do was convince companies to build
Cross-Platform Apps! Easy, right? Right??
9. Returning to Corporate Dev
With Titanium ahead of its time and not making
enough $$ as a freelance dev, I went back to being a
corporate dev aka “corporate shill”
10. Web-Based/Wrapper
Pro: Web-based apps make a lot of sense here
Con: UI may not provide a Native user experience
Con: Not good for apps that require heavy hardware usage (SLOW)
Con: Expected to know about both platforms
Con: More responsibility != greater pay if working for entrepreneur
Con: Getting all the test devices if freelancer
Pro: Great for building MVP / limited distribution
Con: SDKs /library/community support not good as native
Pro: Can leverage existing knowledge of previous languages
11. Cross Platform
Pro: Useful for apps with 80% or more shared code base
Pro: A “Native-Looking” user experience
Pro: Good for apps that require heavy hardware usage (high-performance)
Con: Expected to know about both platforms, even MORE so than for
Hybrid/Wrapper
Con: More responsibility != greater pay if working for entrepreneur
Con: Getting all the test devices if freelancer
Con: SDKs /library/community support not good as native
Pro: Can leverage existing knowledge of previous languages
Con: Approached by “entrepreneurs” to build “great ideas” for equity
13. NativeCon: challenging maintaining 2 code bases and feature parity with other
platform
Con: difficult to fund for entrepreneurs testing out ideas
Con: May have to find dev on other platform to provide “full solution” if
freelancing
Con: On legacy projects, may have to program in 2 languages for 1 platform!
(Objective-C and Swift)
Pro: Provide best user experience for projects that are fully funded
Pro: For devs, can focus on 1 platform and do it well
Pro: Great SDK/library and community support
Con: Not great for web-based apps - example: PDF.js
14. Go Deep or Go Broad?
Go deep, dev-wise, with 1 platform:
“become an expert”
Or go broad with developing
for 2 platforms: “jack of all trades”
15. My RecommendationsMixing / matching cross platform & native technologies may be ideal compromise
If have access to variety of talent
For best native mobile user experience
Code reuse where possible
Titanium: add native code modules
React Native: add React Native modules to native apps
Native if fully funded
Cross Platform if building 1 baseline correctly knowing limitations
Web-based/Wrapper if plan on rewriting anyway :)
Regardless of technology, helpful to know how to run business / fill market need if
entrepreneur
16. At the End of The Day
My freelance hustle was more famine than feast
My personal apps didn’t make much money
Maybe I needed a business partner to help procure gigs and develop ideas
to fill a market need! But ….
I’ve built and released my own apps, which run on both platforms
Might run my own business again someday, who knows?
Right now, career stability is a higher priority but at least I’m still a mobile
developer
In spite of hardships, my Titanium freelancing days led to my present
career: working as an native iOS developer from home
So you want to build a mobile app, and one that will eventually run on both iOS and Android. You have many options out there.
There are web-based / wrapper apps, which are web apps that have are wrapped in native code, so they can be downloaded through the stores and access native hardware; To access hardware, code must “travel” from the web view through the native container to call hardware code and travel back to the web view.
cross platform (which is what I have the most experience with) - they are mobile apps written in another programming language other than the native languages, compile into native code, and run, look, and perform like native apps;
native apps of course, are written in the native programming languages, so there is no wrapper and no need to compile into native code, you’re already there.
How do you decide which one to choose? Which is the best technology choice? the answer will vary based on whether you’re an entrepreneur, or a freelance or corporate developer. Also what you’re building. and finally, my recommendations
* I’ve deployed apps to the App Store, both personally and for clients/companies
built in Titanium: GTO Guide, Mustang Guide, Color Wisdom
car field guide apps
* taro card app
* built in Objective-C/Swift: NameThatPet, SimplyE
* built in hybrid/wrapper tech: I’m not as experienced with PhoneGap but I know enough to compare its pros and cons with alternatives
* My advice is based on my personal experiences and is highly subjective
* Present ideas to help you facilitate discussion with your co-workers, management, business partners, etc. about which technology to choose for your next mobile project
* I had gotten laid off from my last corporate job back when I was a Java developer in 2009
I got retrained as a internet marketing specialist and web designer
Proceeded to do Wordpress web design until I realized I was not a designer
These things called “smartphones” came out, and I decided to go back to becoming an application developer, what I was good at
Titanium was a great way to build an app that could run on both iOS and Android platforms from one codebase, with the look and feel, and performance of native
Excited about discovering Titanium, I went all in
I even ran a meetup, was a Titan for years
Although Titanium was the front runner of hybrid/cross platform technologies at the time, it never gained traction partly from bad marketing, and also most companies weren’t ready
It’s like the Betamax vs VHS, Betamax was clearly the better video format, but VHS won out. Titanium = Betamax, PhoneGap = VHS
Most companies preferred native or PhoneGap, until they realized that PhoneGap was more difficult to use than they realized, or not appropriate for their use cases, then they went back to native
Companies that did adopt Titanium thought it was “write once, run everywhere” - didn’t understand that’s not how Titanium works!
Failed to test for both platforms throughout, failed to learn design patterns of both platforms
ie segmented control = exists on iOS, does not on Android; 3D touch used to be only on iOS, etc.
These companies failed at Titanium cause they didn’t understand how native cross platform worked, giving Titanium an undeserved bad rep
So, in summary, what did I learn? …
According to Gregory Menvielle (@pyramedium), if you build it right (have the right resources, are intentional with designing UIs to match platform design patterns, etc.) and stay away from the “bad use cases”, a PhoneGap/hybrid app can provide a good user experience
for MVP , it doesn’t have to be perfect
It may have a lot of problems if it was released to production, such as: being able to implement only a subset of desired features, not look / feel native, etc. (because it’s a web app and will look the same on both platforms)
but may be fine to test if idea has legs
May choose to rebuild the app cross platform or fully native once project is funded
* SDKs/libraries may not be available or updated often, this is a big problem if a customer is dependent on that library!
The “pet rock” of apps idea I was presented with
“quickly” build an app that was going to be a wild fad, cash in on all the $$ in a short time
pet rock came out in the 70’s, and had a face painted on it
I’ve built apps in Titanium (for myself and clients) that used the hardware functions: geolocation, push notification, and camera, and worked just fine!
This is the #1 reason cross-platform apps failed, in my experience!
Old, but still relevant posts I wrote about Titanium:
https://sunfishempire.wordpress.com/2016/02/15/6-ways-titanium-dev-like-native-mobile-dev/
https://sunfishempire.wordpress.com/2013/07/17/but-i-thought-titanium-was-cross-platform/
Without building and testing in parallel, small diffs between the platforms start to add up, until you have to build the app over again from scratch, defeating the purpose of using cross platform
Give example with pdf.js.
Problem is with trying to make a web library work within a native app.
Trying to make pinch zoom work within a web view within a mobile app.
The pinch zoom gesture had to originate from the web view and “move out” to the native container by having Swift call JavaScript code within the web view, and then pull results of calling JS code into the Swift code
Was difficult issue to solve, remained open for years on Github and never resolved or closed.
The UI/user experience was more suited to the browser not for a native app (scroll up/down by default, not side to side).
My project, SimplyE, went with PSPFKit to implement PDF rendering
https://github.com/mozilla/pdf.js/issues/2582
Here is the fundamental difference between native and cross platform, summarized
With 1 platform, you don’t get an app that runs on both platforms, but you get a better user experience and can cover all use cases where building a native mobile app is desired
With 2 platforms, you have to learn to do more, and user experience may be good if you build it well, but you cannot possibly cover all use cases and all possible edge cases with mobile. There will be tradeoffs!
So, this presentation was really the story of how I became a native iOS developer …You might have learned some things about the different mobile technologies along the way and how to choose the right one for your given situation
As the great Jerry Springer once said, usually after we’ve watched people throw chairs and beat each other up on his talk show, I hope you didn’t feel too beat up after this presentation — “Take care of yourself and each other”.
I’m Vui Nguyen, thank you for coming to my talk!