node. JS Learning Master

Source: Internet
Author: User

作为一名Android猿,从今日开始学习node.js(之前简略的看过^_^)。然后Express、MongoDB、AngularJS、Ionic、Cordova(Rect Native观望中);为了全栈!
下面附一篇对比的文章(转载自:http://www.phonegap100.com/article-486-1.html):
Ionic react-native and native development mobile app that's good?

How to choose the mobile terminal development? Here is a look at the ionic,react-native,native of my eyes three types of mobile development selection comparison. You are welcome to add

One, cross-platform features

ionic : write once, run anywhere ( 一次开发,随处运行,学习成本低 会html css js就可以学会)

Does not involve system-level development, it is really a development run everywhere, if it involves system-level API calls and project configuration (such as iOS plist files)
You need to manually write the Cordova plug-in way to achieve the effect (such as: How to open the registration file), of course,
It is also possible to find ready-to-install plugins on the web. will be HTML CSS JS can learn to learn the cost of low

react-native :Learn once, write anywhere ( 一次学习,随处开发)

Does not involve with native mixed words, unified JS carries on the development uses the JSX grammar to be able to do each end development,
But there are two sets of code that need to be developed for iOS and Android.

native :使用原生java objective-c 开发, 各玩各的,无法跨平台。

Ii. Mode of development

ionic :html + angularjs + css

Using HTML + angularjs similar to web development, the code only need to write once, you can achieve cross-platform effect, system-level calls by the Cordova plug-in solution, encapsulation is quite good, easy to use, special cases of their own hand-written plug-in is difficult, generally do not need to manually write code plug-in situation, There are more plugins available on the Web for download and installation, which can be flexbox layout. Call convenience (for example: to use the camera plug-in, only need to Cordova plugin add camera, and then you can use JS to call the native camera)

react-native :js + css

Normal UI full JS development, in some cases need to use the native mixed with the way, there is no unified UI components, more iOS components, Android components are few, each JS file, the simple space and logical layer can be shared, basically iOS and Android are two sets of code, Available Flexbox layouts.

native :java + oc|swift   iOS android 不同语言开发 以及适配。

Third, function support

ionic :编写cordova插件,则能达到全部支持    原生能完成的功能  ionic结合cordova都可以实现

UI interaction by the Web implementation, system-level interaction by the Cordova implementation, the current file upload download, url jump and file open methods have been done to verify the implementation, Cordova system-level call support is better, covering most of the system functions, such as camera, device information, battery, network, etc., Do not rule out potential unsupported issues.

react-native :与native 混编 可达到全部支持

Android advanced components may need to be implemented on their own, system-level features can be installed through the installation of third-party plug-ins or integrated with native, basically function can fully realize

Native: full support fully achievable

Four, performance comparison

ionic :虽然性能一直是html5在移动端的最大问题,但是ionic已经做得非常出色了,在ios上基本上无法区分是否是原生app

Android is largely invisible and native by optimizing

Ionic using Ionic-native-transitions call native session basic see and native difference (for Android iOS)

Android 2G memory above the phone can not see and the original difference, performance close to the native.

Android Low-profile phone add crosswalk plugin after the experience is better, but the app packaging is too large. program run memory consumption is large (network data compared to the same product, memory consumption 100+m)

react-native :基本接近原生性能js 到 native 需要经过两层桥接,性能与原生差别不大(网络数据对比同款产品,内存占用50 M)native:开发者水平很重要    性能最好 (网络数据对比同款产品,内存占用30 +M)

Summary: The level of development is important, HTML-developed apps may be faster than native. Mainly look at the level of developers and will not optimize
V. Comparison of pros and cons
Ionic:
Advantage:
iOS and Android can basically share code, pure Web thinking, fast development, easy, one-time coding, running everywhere,
If you are familiar with web development, it is less difficult to develop.
The document is full, the system-level support package is good, all UI components are HTML simulation, can be used uniformly.
Enables online updates to allow loading of dynamically loaded Web JS
Many documents, many developers, video tutorials how easy to learn to encounter problems easy to solve technology mature
Disadvantage:
High memory consumption (but the phone memory is not affected), not suitable for the game type app, Web technology can not solve all problems, for the comparative performance of the place can not take advantage of native thinking to achieve complementary advantages, such as high experience of interaction, animation and so on.

React-native:
Advantage:
1, although can not do a code everywhere running, but basically even two sets of code, is the same JSX syntax, using JS for development. User experience, higher than HTML, development efficiency 2, flexbox layouts are said to be simpler and more efficient than native's adaptive layouts
Enables online updates 2015.7.28 AppStore Audit Policy adjustment: Allow dynamic load code running on JavaScriptCore
Closer to native development
Disadvantage:
1, (lead) to the development of high demand, not understand dot Web technology on the line, when the official package of control, API can not meet the needs of the need to understand some native things to expand, the extensibility is still far less than the web, also far less than directly write native code.
2, (citation) the official said very obscure: learn once, Write anywhere. I didn't say run anywhere. In fact, judging Sliderios,switchios from the official API. Wait for these controls, and then there is bound to be sliderandroid,switchandroid ..., which is likely to require multiple sets of code to be written for different platforms.
3, the development is not mature, currently many UI components only iOS implementation, Android needs to implement its own.
From native to the web, there are a lot of conceptual transformations that are bound to compromise both sides. For example, the Web to use a set of CSS version of castration, native through Css-layout to get the final style and then converted to native native expression (such as iOS Constraint\origin\center and other properties), such as animation. In addition, if Android and iOS have to do the same package, the concept of conversion is more complex 5, the document is not complete the learning curve is too high
4. Document less learning difficult

Native:
Advantage:
The best experience and functional implementation.
Complete and mature development documentation and demo.
Disadvantage:
Android Development learning curve is higher.
It is difficult to have ios,android dual platform master for separate development of each platform.
High cost of development

node. JS Learning Master

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.