未加星标

Native apps with Vue.js: Weex or NativeScript?

字体大小 | |
[前端(javascript) 所属分类 前端(javascript) | 发布者 店小二04 | 时间 2017 | 作者 红领巾 ] 0人收藏点击收藏

Vue.js is a great framework! It has a friendly learning curve and combines the best of React’s component approach and Angular’s templates. Despite all this, Vue.js still has a limitation that could be a deal breaker: unlike with React’s React Native, Vue.js currently has no stable, widely adopted way to develop native apps.

This is bound to change, though! There are currently two frameworks under development that could open the door to creating native apps with Vue.js, the framework we all love and cherish: Weex and NativeScript . In this article we will compare both frameworks and give you enough of a taste to at least try one of them!

Weex

Weex is a project created by the chinese e-commerce giant Alibaba. Its slogan is "Write once, run Everywhere", meaning that you can produce builds for web (html5), Android and iOS from the exact same codebase. There are several Weex projects currently in production, in the hands of probably millions of users in China. The core of Weex is in active development with PRs coming every week. Weex has several components, plugins to interact with the native platform, and a set of tools that are still somewhat crude.

Unfortunately, Weex developers don’t see making the platform available for the open source community as a big priority. Sure you have documentation , github repos, etc., and some things are getting better now that Weex is under the Apache Incubator (ASF). But… there is still no clear way to build a Weex project from scratch without a considerable amount of hacking on the native code. Also, forget talking in English in the official gitter channel …

NativeScript

In April, Igor Randjelovic opened up the possibility to use Vue with NativeScript. nativescript-vue is a NativeScript plugin that bridges the gap between Vue.js virtual DOM and NativeScript components, allowing you to build cross-platform apps with Vue.js. Although the project is still in early stages and not suitable for production apps, it has lots of potential because it leverages the NativeScript framework with all of its tools and huge inventory of components and plugins . With webpack, you can even use .vue single file components (see this template ).

The community is great and very well tendered ! If you join the official slack you will find lots of friendly people willing to help, including NativeScript core team developers, nativescript-vue creator, and other folks involved on the project. There are lots of people wanting nativescript-vue to work!

Summary of Pros andCons

Summing up the pros and cons of each framework, we have:

Weex:

:+1: In production (although, only in China);

:+1: Builds for Web, Android and iOS;

:-1: Bad community;

:-1: Crude tools;

:-1: No clear path to start a project;

nativescript-vue:

:+1: Awesome community!

:+1: Leverages all of NativeScript platform;

:-1: Not ready for production;

:-1: Builds only for Android and iOS (although there are people working on code sharing with a web build);

Final verdict

In open source projects, community trumps technology. Weex had a several months head start and is backed by a huge company, but we haven’t seen much progress in the community side of things. On the other hand, NativeScript + Vue has been getting an increasing amount of traction. Sure, there are some rough edges, but once they are cleared out we will have a solid framework to develop native apps with Vue.js.

I am betting on NativeScript !

Links Weex: Official website: http://weex.incubator.apache.org/ Weex How-to: https://hackernoon.com/how-to-create-a-weex-vue2-project-6b94981bee4e Demo To-Do app made with Weex: https://github.com/tralves/weex-todo-list NativeScript +Vue.js: nativescript-vue : https://github.com/rigor789/nativescript-vue Article about nativescript-vue : https://www.nativescript.org/blog/a-new-vue-for-nativescript NativeScript slack channel: http://developer.telerik.com/wp-login.php?action=slack-invitation NS + Vue template: https://github.com/tralves/nativescript-vue-template NS + Vue template with webpack (ready for .vue single file components): https://github.com/tralves/nativescript-vue-webpack-template Hmm… how do you know all thisstuff? I have been playing with Weex for a while. I made tests , built a demo app , a walkthrough video , wrote articles, and presented about Weex in

本文前端(javascript)相关术语:javascript是什么意思 javascript下载 javascript权威指南 javascript基础教程 javascript 正则表达式 javascript设计模式 javascript高级程序设计 精通javascript javascript教程

主题: ReactAndroidiOSReact Native
分页:12
转载请注明
本文标题:Native apps with Vue.js: Weex or NativeScript?
本站链接:http://www.codesec.net/view/561316.html
分享请点击:


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 前端(javascript) | 评论(0) | 阅读(43)