该死，原生移动应用的开发成本太高了！
JavaScript 移动应用
![](/data/attachment/album/201705/18/153154kw44b4yuu4wjzsco.jpg)



> 
> 一个有价值的命题
> 
> 
> 


我们遇到了一个临界点。除去少数几个特别的的用例之外，使用原生框架和原生应用开发团队构建、维护移动应用再也没有意义了。


![](/data/attachment/album/201705/19/112427dv88de7dmmvvijme.jpg)


*在美国，雇佣 [iOS，Android](http://www.indeed.com/salary)，[JavaScript](http://www.payscale.com/research/US/Skill=JavaScript/Salary) 开发人员的平均花费*


在过去的几年，原生移动应用开发的费用螺旋式上升，无法控制。对没有大量资金的新创业者来说，创建原生应用、MVP 设计架构和原型的难度大大增加。现有的公司需要抓住人才，以便在现有应用上进行迭代开发或者构建一个新的应用。要尽一切努力才能留住最好的人才，与 [世界各地的公司](http://blogs.wsj.com/cio/2016/09/30/tech-talent-war-moves-to-africa/) 拼尽全力[争个](http://www.bizjournals.com/charlotte/how-to/human-resources/2016/12/employers-offer-premium-wages-skilled-workers.html)[高](https://www.cnet.com/news/silicon-valley-talent-wars-engineers-come-get-your-250k-salary/)[下](http://www.nytimes.com/2015/08/19/technology/unicorns-hunt-for-talent-among-silicon-valleys-giants.html)。


![](/data/attachment/album/201705/19/112428c22s24203yc0szmk.png)


*2015 年初，原生方式和混合方式开发 MVP 设计架构的费用[对比](http://www.comentum.com/mobile-app-development-cost.html)*


### 这一切对于我们意味着什么？


如果你的公司很大或者有足够多的现金，旧思维是只要你在原生应用开发方面投入足够多的资金，就高枕无忧。但事实不再如此。


Facebook 是你最不会想到的在人才战中失败的公司（因为他们没有失败），它也遇到了原生应用方面金钱无法解决的问题。他们的移动应用庞大而又复杂，[他们发现编译它竟然需要 15 分钟](https://devchat.tv/react-native-radio/08-bridging-react-native-components-with-tadeu-zagallo)。这意味着哪怕是极小的用户界面改动，比如移动几个点，测试起来都要花费几个小时（甚至几天）。


除了冗长的编译时间，应用的每一个小改动在测试时都需要在两个完全不同的环境（IOS 和 Android）实施，开发团队需要使用两种语言和框架工作，这趟水更浑了。


Facebook 对这个问题的解决方案是 [React Native](https://facebook.github.io/react-native/)。


### 能不能抛弃移动应用，仅面向 Web 呢？


[一些人认为移动应用的末日已到](https://medium.com/javascript-scene/native-apps-are-doomed-ac397148a2c0#.w06yd23ej)。尽管我很欣赏、尊重 [Eric Elliott](https://medium.com/u/c359511de780) 和他的工作，但我们还是通过考察一些近期的数据，进而讨论一下某些相反的观点：


![](/data/attachment/album/201705/19/112429lin9q7dmnd029z1g.png)


*人们在移动应用上花费的[时间](http://www.smartinsights.com/mobile-marketing/mobile-marketing-analytics/mobile-marketing-statistics/attachment/percent-time-spent-on-mobile-apps-2016/)（2016年4月）*



> 
> 人们使用 APP 的时间占使用手机总时长的 90%
> 
> 
> 


目前世界上有 25 亿人在使用移动手机。[这个数字增长到 50 亿的速度会比我们想象的还要快。](http://ben-evans.com/benedictevans/2016/12/8/mobile-is-eating-the-world) 在正常情况下，丢掉 45 亿人的生意，或者抛弃有 45 亿人使用的应用程序是绝对荒唐且行不通的。


老问题是原生移动应用的开发成本对大多数公司来说太高了。然而，面向 web 的开发成本也在增加。[在美国，JavaScript 开发者的平均工资已达到 $97,000.00](http://www.indeed.com/salary?q1=javascript+developer&l1=united+states&tm=1)。


伴随着复杂性的增加以及对高质量 web 开发的需求暴涨，雇佣一个 JavaScript 开发者的平均价格直逼原生应用开发者。论证 web 开发更便宜已经没用了。


### 那混合开发呢？


混合应用是将 HTML5 应用内嵌在原生应用的容器里，并且提供实现原生平台特性所需的权限。Cordova 和 PhoneGap 就是典型的例子。


如果你想构建一个 MVP 设计架构、一个产品原型，或者不担心对原生应用的模仿的用户体验，那么混合应用会很适合你。但谨记如果你最后想把它转为原生应用，整个项目都得重写。


此领域有很多创新的东西，我最喜欢的当属 [Ionic Framework](https://ionicframework.com/)。混合开发正变得越来越好，但还不如原生开发那么流畅自然。


有很多公司，包括最严峻的初创公司，也包括大中规模的公司，混合应用在质量上的表现似乎没有满足客户的要求，给人的感觉是活糙、不够专业。


[听说应用商店里的前 100 名都不是混合应用](https://medium.com/lunabee-studio/why-hybrid-apps-are-crap-6f827a42f549#.lakqptjw6)，我没有证据支持这一观点。如果说有百分之零到百分之五是混合应用，我就不怀疑了。



> 
> [我们最大的错误是在 HTML5 身上下了太多的赌注](https://techcrunch.com/2012/09/11/mark-zuckerberg-our-biggest-mistake-with-mobile-was-betting-too-much-on-html5/) — 马克·扎克伯格 
> 
> 
> 


### 解决方案


如果你紧跟移动开发动向，那么你绝对听说过像 [NativeScript](https://www.nativescript.org/) 和 [React Native](https://facebook.github.io/react-native/) 这样的项目。


通过这些项目，使用由 JavaScript 写成的基本 UI 组成块，像常规 iOS 和 Android 应用那样，就可以构建出高质量的原生移动应用。


你可以仅用一位工程师，也可以用一个专业的工程师团队，通过 React Native 使用 [现有代码库](https://github.com/necolas/react-native-web) 或者 [底层技术](https://facebook.github.io/react/) 进行跨平台移动应用开发、[原生桌面开发](https://github.com/ptmt/react-native-macos)，甚至还有 web 开发。把你的应用发布到 APP Store 上、 Play Store 上，还有 Web 上。如此可以在保证不丧失原生应用性能和质量的同时，使成本仅占传统开发的一小部分。


通过 React Native 进行跨平台开发时重复使用其中 90% 的代码也不是没有的事，这个范围通常是 80% 到 90%。


如果你的团队使用 React Native, 既可以消除团队之间的分歧，也可以让 UI 和 API 的设计更一致，还可以加快开发速度。


在编译时不需要使用 React Native，在保存时应用可以实时更新，也加快了开发速度。


React Native 还可以使用 [Code Push](http://microsoft.github.io/code-push/) 和 [AppHub](https://apphub.io/) 这样的工具来远程更新你的 JavaScript 代码。这意味着你可以向用户实时推送更新、新特性，快速修复 bug，绕过打包、发布这些工作，绕过 App Store、Google Play Store 的审核，省去了耗时 2 到 7 天的过程（App Store 一直是整个过程的痛点）。混合应用的这些优势原生应用不可能比得上。


如果这个领域的创新力能像刚发行时那样保持，将来你甚至可以为 [Apple Watch](https://github.com/elliottsj/apple-watch-uikit)、[Apple TV](https://github.com/douglowder/react-native-appletv)，和 [Tizen](https://www.tizen.org/blogs/srsaul/2016/samsung-committed-bringing-react-native-tizen) 这样的平台开发应用。



> 
> NativeScript 依然是个相当年轻的框架驱动，Angular 版本 2，[上个月刚刚发布测试版](http://angularjs.blogspot.com/2016/09/angular2-final.html)。但只要它保持良好的市场份额，未来就很有前途。
> 
> 
> 


你可能还不知道世界上一些最能创新、最大的科技公司在这类技术上下了很大的赌注，特别是 [React Native](https://facebook.github.io/react-native/)。


我供职过的多家企业以及世界 500 强公司目前都在转移至 React Native。


### 在产品中特别注意使用 React Native


看下面的例子，[这是一个使用 React Native 技术的著名应用列表](https://facebook.github.io/react-native/showcase.html)。


#### Facebook


![](/data/attachment/album/201705/19/112429h8mjv93b77jhli7k.jpg)


*Facebook 公司的 React Native 应用*


Facebook 的两款应用 [Ads Manager](https://play.google.com/store/apps/details?id=com.facebook.adsmanager) 和 [Facebook Groups](https://itunes.apple.com/us/app/facebook-groups/id931735837?mt=8) 都在使用 React Native 技术，并且[将会应用到实现动态消息的框架上](https://devchat.tv/react-native-radio/40-navigation-in-react-native-with-eric-vicenti)。


Facebook 也会投入大量的资金创立和维护像 React Native 这样的开源项目，而且开源项目的开发者最近已经创建很多了不起的项目，这是很了不起的工作，像我以及全世界的业务每天都从中享受诸多好处。


#### Instagram


![](/data/attachment/album/201705/19/112429wiwamowwkn4ao49d.jpg)


*Instagram*


Instagram 应用的一部分已经使用了 React Native 技术。


#### Airbnb


![](/data/attachment/album/201705/19/112430d4ik8928t4428zjv.jpg)


*Airbnb*


Airbnb 的很多东西正用 React Native 重写。（来自 [Leland Richardson](https://medium.com/u/41a8b1601c59)）


超过 90% 的 Airbnb 旅行平台都是用 React Native 写的。（来自 [spikebrehm](https://medium.com/u/71a78c1b069b)）


#### Vogue


![](/data/attachment/album/201705/19/112430x5rwddlzxhr2zpsb.jpg)


*Vogue 是 2016 年度十佳应用之一*


Vogue 这么突出不仅仅因为它也用 React Native 写成，而是[因为它被苹果公司评为年度十佳应用之一](http://www.highsnobiety.com/2016/12/08/iphone-apps-best-of-the-year-2016/)。


![](/data/attachment/album/201705/19/112431fljrhudjigp7d9li.jpg)


#### 沃尔玛


![](/data/attachment/album/201705/19/112431fvs4euts00a44ego.jpg)


*Walmart Labs*


查看这篇 [Keerti](https://medium.com/@Keerti) 的[文章](https://medium.com/walmartlabs/react-native-at-walmartlabs-cdd140589560#.azpn97g8t)来了解沃尔玛是怎样看待 React Native 的优势的。


#### 微软


微软在 React Native 身上下的赌注很大。


它早已发布多个开源工具，包括 [Code Push](http://microsoft.github.io/code-push/)、[React Native VS Code](https://github.com/Microsoft/vscode-react-native)，以及 [React Native Windows](https://github.com/ReactWindows/react-native-windows)，旨在帮助开发者向 React Native 领域转移。


微软考虑的是那些已经使用 React Native 为 iOS 和 Android 开发应用的开发者，他们可以重用高达 90% 的代码，不用花费太多额外的时间和成本就可将应用发布到 Windows 上。


微软对 React Native 生态的贡献十分广泛，过去几年在开源界的表现很抢眼。


### 结论


移动应用界面设计和移动应用开发要进行范式转变，下一步就是 React Native 以及与其相似的技术。


#### 公司


如果你的公司正想着削减成本、加快开发速度，而又不想在应用质量和性能上妥协，这是最适合使用 React Native 的时候，它能提高你的净利润。


#### 开发者


如果你是一个开发者，想进入一个将来会快速发展的领域，我强烈推荐你把 React Native 列入你的学习清单。


如果了解 JavaScript，你会入门很快，工具我首推 [Exponent](https://medium.com/u/df61a4267d7a)，其他的就看你怎么想了。使用 Exponent 开发者可以轻松的编译、测试和发布跨 Windows 和 MacOS 两个平台的 React Native 应用。


如果已经是一位原生应用开发者，你更会受益匪浅。因为在需要时你能够胜任深入研究原生应用边缘的工作。虽然不会经常用到，但在团队需要时这可是十分宝贵的能力。


我花了很多时间来学习、指导别人 React Native。因为它让我十分激动，而且使用这个框架创作应用也是我一个平淡的小乐趣。


感谢阅读。




---


作者简介：


教授和构建 React Native 应用的软件开发专家




---


via: <https://hackernoon.com/the-cost-of-native-mobile-app-development-is-too-damn-high-4d258025033a>


作者：[Nader Dabit](https://hackernoon.com/@dabit3) 译者：[fuowang](https://github.com/fuowang) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Search icon](https://hackernoon.imgix.net/search-new.png?w=19&h=19)

If you’re interested in learning more about React Native for your company or team, check out [React Native Training.](http://reactnative.training/?ref=hackernoon.com)

*A tipping point has been reached.* With the exception of a few unique use cases, it no longer makes sense to build and maintain your mobile applications using native frameworks and native development teams.


Average cost of employing iOS, Android, and JavaScript developers in the United States ([http://www.indeed.com/salary](http://www.indeed.com/salary?ref=hackernoon.com), [http://www.payscale.com/research/US/Skill=JavaScript/Salary](http://www.payscale.com/research/US/Skill=JavaScript/Salary?ref=hackernoon.com))

The cost of native mobile application development has been spiraling out of control for the past few years. It has become increasingly difficult for new startups without substantial funding to create native apps, MVPs and prototypes. Existing companies, who need to hold on to talent in order to iterate on existing applications or build new applications, are [fighting](http://www.bizjournals.com/charlotte/how-to/human-resources/2016/12/employers-offer-premium-wages-skilled-workers.html?ref=hackernoon.com) [tooth](https://www.cnet.com/news/silicon-valley-talent-wars-engineers-come-get-your-250k-salary/?ref=hackernoon.com) and [nail](http://www.nytimes.com/2015/08/19/technology/unicorns-hunt-for-talent-among-silicon-valleys-giants.html?ref=hackernoon.com) [with companies from all around the world](http://blogs.wsj.com/cio/2016/09/30/tech-talent-war-moves-to-africa/?ref=hackernoon.com) and will do whatever it takes to retain the best of the best.


Cost of developing an MVP early 2015, Native vs Hybrid ([Comomentum.com](http://www.comentum.com/mobile-app-development-cost.html?ref=hackernoon.com))

If you are a huge company or you are flush with cash, the old thinking was that as long as you threw enough money at native application development, you did not have anything to worry about. This is no longer the case.

Facebook, the last company in the world who you would think of as behind in the war for talent (because they aren’t), was facing problems with their native app that money could not fix. The application had gotten so large and complex that [they were seeing compilation times of up to 15 minutes for their mobile app](https://devchat.tv/react-native-radio/08-bridging-react-native-components-with-tadeu-zagallo?ref=hackernoon.com). This means that even testing minor user interface changes, like moving something around by a couple of points, could take hours (or even days).

In addition to the long compilation times, any time they needed to test a small change to their app the update needed to be implemented and tested in two completely different environments (iOS and Android) with teams working with different languages and frameworks, muddying the waters even more.

Facebook’s solution to this problem is [React Native](https://facebook.github.io/react-native/?ref=hackernoon.com).

[Some people think mobile apps are doomed.](https://medium.com/javascript-scene/native-apps-are-doomed-ac397148a2c0?ref=hackernoon.com#.w06yd23ej) While I really enjoy and respect [Eric Elliott](https://medium.com/@_ericelliott?ref=hackernoon.com) and his work, let’s take a look at some recent data and discuss some opposing viewpoints:


Time spent in mobile apps (April 2016, [smartinsights.com](http://www.smartinsights.com/mobile-marketing/mobile-marketing-analytics/mobile-marketing-statistics/attachment/percent-time-spent-on-mobile-apps-2016/?ref=hackernoon.com))

90% of Time on Mobile is Spent in Apps


There are 2.5 billion people on mobile phones in the world right now. [That number is going to be 5 billion sooner than we think.](http://ben-evans.com/benedictevans/2016/12/8/mobile-is-eating-the-world?ref=hackernoon.com) *It is absolutely insane to think that leaving 4.5 billion people out of your business or application makes sense* *in most scenarios.*

The old argument was that native mobile application development was too expensive for most companies. While this was true, the cost of web development is also on the rise, with [the average salary of a JavaScript developer in the US being in the range of $97,000.00](http://www.indeed.com/salary?q1=javascript%20developer&l1=united%20states&tm=1&ref=hackernoon.com).

With the increased complexity and skyrocketing demand for high quality web development, the average price for a JavaScript developer is inching towards that of a Native developer. Arguing that web development is cheaper is no longer a valid argument.

Hybrid apps are HTML5 apps that are wrapped inside of a native container and provide access to native platform features. Cordova and PhoneGap are prime examples.

*If you’re looking to build an MVP, prototype, or are not worried about the user experience mimicking that of a native app, then a hybrid app may work for you, keeping in mind the entire project will need to be rewritten if you do end up wanting to go native.*

There are many innovative things going on in this space, my favorite being the [Ionic Framework](https://ionicframework.com/?ref=hackernoon.com). Hybrid is getting better and better, but it is still not as fluid or natural feeling as Native.

For many companies, including most serious startups as well as medium and large sized companies, hybrid apps may not deliver the quality that they want and that their customers demand, leaving the feeling unpolished and less professional.

[While I have read and heard that of the top 100 apps on the app store, zero of them are hybrid,](https://medium.com/lunabee-studio/why-hybrid-apps-are-crap-6f827a42f549?ref=hackernoon.com#.lakqptjw6) I have not been able to back up this claim with evidence, but I would not doubt if the number were between zero and 5, and this is for a reason.


[Our Biggest Mistake Was Betting Too Much On HTML5]— Mark Zuckerberg

If you’ve been keeping up with the mobile development landscape you have undoubtedly heard of projects such as [NativeScript](https://www.nativescript.org/?ref=hackernoon.com) and [React Native](https://facebook.github.io/react-native/?ref=hackernoon.com).

These projects allow you to build native quality mobile applications with JavaScript and use the same fundamental UI building blocks as regular iOS and Android apps.

With React Native **you can have a single engineer or team of engineers specialize in cross platform mobile app development**, [native desktop development](https://github.com/ptmt/react-native-macos?ref=hackernoon.com), and even web development [using the existing codebase](https://github.com/necolas/react-native-web?ref=hackernoon.com) or [the underlying technology](https://facebook.github.io/react/?ref=hackernoon.com), shipping your applications to the App Store, the Play Store, and the Web for a fraction of the traditional cost without losing out on the benefits of native performance and quality.

It is not unheard of for React Native apps to reuse up to 90% of their code across platforms, though the range is usually between 80% and 90%.

If your company is using React Native, it eliminates the divide between teams resulting in more consistency in both the UI and the APIs being built, speeding up the development time.

There is no need for compilation with React Native, as the app updates instantly when saving, also speeding up development time.

React Native also allows you to use tools such as [Code Push](http://microsoft.github.io/code-push/?ref=hackernoon.com) and [AppHub](https://apphub.io/?ref=hackernoon.com) to remotely update your JavaScript code. This means that you can push updates, features, and bug fixes instantly to your users, bypassing the labor of bundling, submitting, and having your app accepted to the App and Google play stores, a process that can take between 2 and 7 days (the App Store being the main pain point in this process). This is something that is not possible with native apps, though is possible with hybrid apps.

If innovation in this space continues as it has been since it’s release, in the future you will even be able to build for platforms such as the [Apple Watch](https://github.com/elliottsj/apple-watch-uikit?ref=hackernoon.com) , [Apple TV](https://github.com/douglowder/react-native-appletv?ref=hackernoon.com), and [Tizen](https://www.tizen.org/blogs/srsaul/2016/samsung-committed-bringing-react-native-tizen?ref=hackernoon.com) to name a few.

NativeScript is still fairly new as the framework powering it, Angular 2,

[was just released out of beta a few months ago,]but it too has a promising future as long as Angular2 holds on to a decent share of the market.

What you may not know is that some of **the most innovative and largest technology companies in the world are betting big on these types of technologies,** specifically [React Native.](https://facebook.github.io/react-native/?ref=hackernoon.com)

I have also spoken to and am working with multiple enterprise and fortune 500 companies currently making the switch to React Native.

Along with the below examples, [here is a list of notable apps using React Native.](https://facebook.github.io/react-native/showcase.html?ref=hackernoon.com)


React Native Apps by Facebook

Facebook is now using React Native for both [Ads Manager](https://play.google.com/store/apps/details?id=com.facebook.adsmanager&ref=hackernoon.com) and [Facebook Groups,](https://itunes.apple.com/us/app/facebook-groups/id931735837?mt=8&ref=hackernoon.com) and [will be implementing the framework to power it’s news feed.](https://devchat.tv/react-native-radio/40-navigation-in-react-native-with-eric-vicenti?ref=hackernoon.com)

Facebook also spends a lot of money creating and maintaining open source projects such as React Native, and t[hey and their open source developers have done a fantastic job lately by creating a lot of awesome projects](https://code.facebook.com/projects/?ref=hackernoon.com) that people like me and businesses all around the world benefit greatly from using on a daily basis.


React Native has been implemented in parts of the Instagram mobile app.


Airbnb

Much of Airbnb is being rewritten in React Native (via [Leland Richardson](https://medium.com/@intelligibabble?ref=hackernoon.com))


Over 90% of the Airbnb Trips Platform is written in React Native (via [spikebrehm](https://medium.com/@spikebrehm?ref=hackernoon.com))



Vogue Top 10 apps of 2016

Vogue stands out not only because it was also written in React Native, but [because it was ranked as one of the 10 Best Apps of the Year, according to Apple](http://www.highsnobiety.com/2016/12/08/iphone-apps-best-of-the-year-2016/?ref=hackernoon.com).


**Walmart**


Walmart Labs

Check out [this](https://medium.com/walmartlabs/react-native-at-walmartlabs-cdd140589560?ref=hackernoon.com#.azpn97g8t) blog post by [Keerti](https://medium.com/@Keerti?ref=hackernoon.com) to learn more about how Walmart is taking advantage of React Native.

**Microsoft**

Microsoft is betting heavily on React Native.

They have already release multiple open source tools, including [Code Push](http://microsoft.github.io/code-push/?ref=hackernoon.com), [React Native VS Code,](https://github.com/Microsoft/vscode-react-native?ref=hackernoon.com) and [React Native Windows](https://github.com/ReactWindows/react-native-windows?ref=hackernoon.com), in the shift towards helping developers in the React Native space.

Their thoughts behind this are that if people are already building their apps using React Native for iOS and Android, and they can reuse up to 90% of their code, then s_hipping to Windows costs them little extra relative to the cost && time already spent building the app in the first place._

Microsoft has contributed extensively to the React Native ecosystem and have done an excellent job in the Open Source space over the past few years.

React Native and similar technologies are the next step and a paradigm shift in how we will build mobile UIS and mobile applications.

**Companies**

If your company is looking to cut costs and speed up development time without compromising on quality or performance, React Native is ready for prime time and will benefit your bottom line.

**Developers**

If you are a developer and want to enter into an rapidly evolving space with substantial future up side, I would highly recommend looking at adding React Native to your list of things to learn.

If you know JavaScript, you can hit the ground running very quickly, and I would recommend first trying it out using [Exponent](https://medium.com/@expo?ref=hackernoon.com) and seeing what you think. Exponent allows developers to easily build, test ,and deploy cross platform React Native apps on both Windows and macOS.

If you are already a native Developer, you will benefit especially because you will be able to competently dig into the native side of things when needed, something that is not needed often but when needed is a highly valuable skill to have on a team.

I have spent a lot of my time learning and teaching others about React Native because I am extremely excited about it and it is just plain fun to create apps using the framework.

Thanks for reading.

My Name is

[Nader Dabit]. I am a Developer Advocate at[AWS Mobile]working with projects like[AppSync]and[Amplify], and the founder of[React Native Training].

If you enjoyed this article, please recommend and share it! Thanks for your time