Talk about React Native

Source: Internet
Author: User

Objective

A few days ago, Facebook launched the React Native (video link) at the React.js Conf 2015 conference. I sent a micro-blog (address), resulting in more than 100 forwards. Why is React Native attracted so much attention? I'm here to talk about my understanding of React Native.

The emergence of a new framework is always to solve the existing problems, then for the current mobile developers, what are the problems React Native can be involved?

The problem of talent scarcity

The first problem is: The scarcity of mobile development talent. Take a look at those training courses, and after 3 months of training you can get 8K or even tens of thousands of jobs. A little bit of working experience in the IOS development in Beijing requires a 20,001-month salary. This shows that the current mobile internet and entrepreneurial hot, has let the industry has not enough development talent, so we all use up wages to rob talent. And because cross-platform frameworks (such as phonegap,rubymotion) are still less reliable, for a slightly larger company, there are different custom development options for IOS and Android platforms. While JavaScript is clearly a more broad-based language, it makes it easier to get relevant talent, and it can save a few developers because of the code reuse issues that are mentioned later.

Problems with code reuse

React Native insists that he is not a "Write once, run anywhere" framework, but it can be reused at least like Google's J2OBJC in the Model layer. Those underlying, interface-independent logic, believe that React Native can also be reused. This way, while the UI layer is still working on IOS and Android two platforms, if the abstraction is good, the reuse of logic and the Model layer will not only make the code reusable, but it is more likely to implement the unit tests of the underlying logic. This makes the code quality of the mobile side more reliable.

In fact React Native propaganda "learning once, Write Anywhere" itself is a kind of reuse of ideas. Everyone is tired of all kinds of programming languages, and if there is a language that can really unify the mobile development world, it's good for everyone.

Problems with UI typography

I've never liked Apple's new AutoLayout solution, in fact, HTML and CSS in the interface layout and rendering over the years, Android is also a reference to the HTML of the package, Apple can also take this package. But Apple chose to invent a Constraint to make typography. In the enterprise development, in fact, we seldom use Xib, and handwriting Constraint is actually very painful. So there is a masonry type of open source framework to solve this kind of peer pain.

I've been looking for a framework that uses HTML + CSS-like typography, but uses native controls for rendering. In fact, before Beeframework did this thing. So I interviewed him on behalf of InfoQ. Although Beeframework has been open source for many years and has more than 2000 star numbers, it has been largely unsuccessful because of its own influence and the complexity of its framework. At least I don't know what big companies are using.

This time Facebook's React Native to do something more radical than beeframework. Not only does it use HTML + CSS typography, but it also replaces the language with JavaScript, which can be called a huge change. But Facebook has its aura as a global internet company, and it is believed that many developers will follow React Native.

However, it is not always good to say that Facebook is open source, such as Three20 was abandoned by Facebook, but it is undeniable that three20 as a framework for the particular value of that period. So React Native, even if not successful, has focused on the efficiency of mobile development. It is likely that more and more relevant frameworks will emerge.

MVVM

MVVM is pretty hot in Web development, and IOS is a very small reactivecocoa, though it's a fire. The reason why, on the one hand, Reactivecocoa brought about by the programming habits of the change is too big, Reactivecocoa and MVVM learning cost is still very high. On the other hand, Reactivecocoa is less friendly in code readability, maintainability, and collaboration.

While web development has a very different degree of acceptance of the MVVM programming model, there are quite a number of widely used MVVM frameworks in web development, such as AngularJS. Believe that React Native will drive the development of MVVM applications on the mobile side.

Dynamic Update

Finally speaking of the most "Chicken frozen Heart" part of the. Have you had enough of every new release to be audited for one weeks? The inefficiency of Apple's audit team made it hard for us to update the version every 2 weeks or 1 months with an Agile development team that was not allowed to update one version of the iteration every day. Many teams a previous version has not been reviewed and the next version is ready.

The language of React Native is based on JavaScript, which inevitably makes it possible for code to be dynamically updated from the server side. By the time, daily updates are no longer a dream. Of course, the security of the code will be challenged a step further, and how to effectively protect the security of the core code will be a challenge.

Summarize

In any case, this is indeed a mobile internet era, I believe that with the development of several years, the development of mobile Internet will accumulate more and more valuable framework to support the emergence of more great apps. As a mobile developer, I am delighted to be the protagonist of this era, using mobile development technology to transform people's lives.

Talk about React Native

Related Article

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.