There is a reason for JavaScript to win in the mobile end.

Source: Internet
Author: User

There is a reason for JavaScript to win in the mobile end.

JavaScript is not the best programming language in the world. For this reason, a world-class expert wrote a book about the language. The name of this book is "the highlights of deep mining javascript", because excellent things are buried quite deeply. Even so, it quickly becomes one of the world's most popular languages. This popularity deserves it because, despite its flaws, javascript provides significant advantages that developers cannot provide in other languages. There are some advantages that are produced after the browser developer agrees to Javascript okay, technically ECMAScript) as the web language standard. Others are inherent web application programming models and are not improved by any enhancements. However, although the original application dominated the position of web applications on mobile devices, the advantage of JavaScript is gradually shifting to mobile devices. Will it eventually dominate?

Popular but not preferred

The latest tibench Community list lists JavaScript as the sixth in all programming languages and continues to rise. The ranking of the tietong method tends to support older and more mature languages, but is not very good at following the trend. In contrast, the Redmonk ranking method places JavaScript in the first place. To some extent, the Redmonk method tends to be a language with a strong open source community, but it also reflects the current trends and points of interest. Our own developer Economic overview shows that HTML5/Javascript combination is already the second popular language used by mobile developers, and almost 55% of users use it. Only a small advantage to 57% of users using java. However, although we found that the combination of HTML5 and Javascript is 19% of the preferred audience), this phalanx lags far behind Java 29% ). This seems to be a significant improvement in the next few years. [What do you think? We have a new investigation, so let's look at this investigation and let us know what you think]

JavaScript flying freely on the browser

This is not a standard saying of "net win.I don't think browsers or network-based applications will eventually rule mobile devices. Even if it is used and growing, it will not be the norm.If web standards will be enabled to govern mobile devices in the future, they need to start with the Document Object Model DOM. DOM is not the basis of building an application, but a document. Of course, you can initially design an application for documentation around a platform, but you will be struggling. Taking a look at the current framework, you can design quite high-performance applications for mobile browsers or network views: React. js, Famo. us, and lonic. The commonality of the three is to use DOM as little as possible.

Yes, there are too many WebGL or HTML5 Canvas required), but these are low-level APIs. What you need is a big, multi-byte framework that can create an excellent platform for developing most applications. This is not suitable for web application programming models. The latest program code is placed on a remote server, especially in a mobile environment. It is true that a hybrid application can be created on a large locally stored WebGL, and only program-specific code is obtained from a remote server. But why use a browser? Why isn't javaScript just better than other cross-platform frameworks in the hardware Graphics Accelerator tip: Qt provides good products. A high-level API does not have that much overhead to bridge languages. Access to specific features may be restricted.

There are several interesting new options that match this description. React Native and NativeScript .. They run in different ways, but both use JavaScript to build an app with the original UI. The TiNext of Appcelerator may also be interesting. Even though they have been talked about for many years, they have never published a version, so let's wait and see it.

JavaScript exception

Apple has recovered its mobile advantage of JavaScript.One key thing that prevents most developers from adopting an agile, web-style continuous delivery model on the Mobile End is Apple's ban on code downloads. Without a significant slowdown in this iteration model, comparison testing would be more difficult.This actually means that developers, especially beginners, will learn slowly. Until recently, the only way to get faster iterations was to first develop a hybrid application from Android, because Apple made JavaScript an exception in the webview code download rule. In the first case, it means that most early adopters are moving away from this platform. Unfortunately, in the second case, the choice of UX is too large. Most developers take that route because of user program failure or local switch. However, the JavaScriptCore interface is added to run JavaScript in ios7, and in the latest ios developer license terms, they modify the rules for code downloading exceptions, including JavaScriptCore.

This makes sense in terms of security. Apple can audit and update their runtime. However, if they allow third-party code downloads during runtime, they do not effectively monitor security issues. Because JavaScript is Apple's only script option and they are not allowed to download code locally, JavaScript is restoring privilege-the only option for fast iteration. The availability of JavaScript has triggered some efforts. For example, the relaxation of the Code download policy by React, NativeScript, and Apple has been perfectly announced.

Will it be open to win?

Web advocates sometimes show that the web-based Open Standards will eventually win, because openness will always win. However, Linux is an obvious example. It is an open and rapidly developing ecosystem without unified standards. React and Facebook seem to be a developer ecosystem quickly built in open-source projects. There is already a committee for rapid growth around React. js, which clearly gives them a leading opportunity. However, the NativeScript team at Telerik is working with Google, so Angualr2.0 needs to be seamlessly integrated. Google intends to support non-DOM environments, regardless of whether the web standard is oriented towards it. Microsoft and Google may take a long time to support the standards they will implement in the future. However, they work together toward TypeScript to make building a negative and complex application with JavaScript that proves that the compiler is smarter than humans in discovering Type mismatch.

Apple has already created many impressive tools for their new Swift language, especially interactive playground in interactive scenarios ). However, Facebook may already have a better coding experience based on instant feedback and high-frequency instant encoding on React Native. Apple will continue to iterate over their tools. the developer community has now added these new JavaScript environment tools. Android may be open-source technically, but it is not open in community construction. Google is enhancing its Android platform and tools. It is probably true that the open developer community will win, and the real community-based open source can be faster than the open iteration Based on Open Source standards. To this end, the "Local UX uses JavaScript to establish" environment and is successful. Such a platform will certainly not fail. Applications will still be built based on the platform's appearance and feeling and using APIs for specific new platforms.

At this time, it seems that the open JavaScript developer community is about to win, because the apps they make have the appearance, feeling and performance of the local platform, in addition to the experience of Web development. Closed platforms used to win because apps needed to be customized for their closed ecosystem at that time.Currently, open web standards are still lost.If the mobile browser manufacturer can agree to the new standard, so that the applications they make can have the same experience as local applications,SoThey will surely win.

What did you use to make it?

Do you think JavaScript will control the future of mobile development? Or should Java, Objective-C and Swift continue their leadership positions? Will Iot use Node. js at the backend? Through investigation, let us know what you are using to build your APP.

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.