Native、HTML5(Web) or Hybrid

比较不同的开发方法

Native开发方法在性能和设备访问方面很出色,但成本和更新方面有缺点。Web方法更新起来简单得多,成本较低,也更容易,但是目前功能有限,也无法获得使用Native API调用所能获得的那种出色的用户体验。Hybrid开发方法提供了折中方案:在许多情况下,它集两者之所长,如果开发者面向多种操作系统更是如此。

 

没有哪一种开发方法总是提供所有的优点,选择一种合适的方法取决于企业的具体要求,可能取决于诸多因素,比如预算、时间表、内部资源、目标市场、所需的应用程序功能、IT基础设施及其他许多方面。但是有一点很清楚:如今的大多数公司显然在两个方面之间作一取舍:一方面是用户体验和应用程序功能,另一方面是开发成本和产品上市时间。问题就变成了选择一种合适的开发方法,能兼顾企业的要求和其在预算和产品上市时间方面的限制。

 

下面介绍有助于帮助企业选择合适开发方法的一些场景:

 

一、Native开发方法的场景

 

现有的Native开发技能——反对Native开发方法的主要理由之一是,它缺少对多种平台的支持。要求为多种移动平台开发App的企业需要招聘新员工,或者对内部开发者进行众多Native语言方面的培训。内部拥有这种Native开发技能的企业不需要大笔新的投入,就能够充分利用这些技能。

 

单一移动操作系统——在一些情况下,企业旨在向有限的目标群体发布移动App——这个群体已知使用单一移动操作系统。比如说,考虑这种场景:向员工发放黑莓设备的企业分发内部App。在这种情况下,支持多种平台也许不是优先事项:由于开发单一的Native App只需要一套有限的技能和工具,所以这种方法很有意义。

 

Native功能——有些App是围绕某一项功能开发的。就拿Skype来说,VOIP和访问用户的联系人信息是App的两大关键要素;考虑到现有的技术,只能采用Native方法来开发。对这类App而言,Web语言根本不够完善,根本无力获得所需的功能。

 

丰富用户界面的需求——有些游戏类App需要提供实时响应的丰富用户界面,对这类App而言,Web技术还无法提供足够有效的解决方案。对有这类需求的App而言,开发者采用Native开发方法仍然比较好。

 

二、Web开发方法的场景

 

直接分发——有些企业更喜欢以一种内部控制的方式来分发App,他们不喜欢受制于有时很漫长、很不确定的审批过程。这种情况下,使用纯粹的Web语言可以完全规开应用商店的审批过程,让企业可以完全控制App的定期更新和分发。

 

试点App——比较Native AppWeb App开发所需的成本和上市时间时,使用Web方法开发试点应用程序是一种引人入胜的、经济高效的方法。一旦概念得到了证明,企业可以决定从头开始创建新的App,或者充分利用Hybrid App中的部分现有代码。

 

可视性——除了前面提到的分发外,构建Web App的另一个优点是搜索引擎结果具有可视性;在许多情况下,搜索引擎结果将App展示给比仅仅通过应用商店获得的群体更庞大的群体。

 

三、Hybrid开发方法的场景

 

折衷考虑——如果企业使用Hybrid开发方法,就能集两者之所长。一方面,Native让开发者可以充分利用现代移动设备所提供的全部不同的特性和功能。另一方面,使用Web语言编写的所有代码都可以在不同的移动平台之间共享,使得开发和日常维护过程变得集中式、更简短、更经济高效。

 

内部技能——Web开发技能十分常见,许多企业都拥有这类技能。如果选择Hybrid开发方法,在合适解决方案的支持下,Web开发者只要仅仅运用HTMLCSSJavaScriptWeb技能,就能构建App,同时提供Native用户体验。

 

考虑未来——HTML5的可用性和功能都在迅速改进。许多分析师预测,它可能会成为开发前端App的默认技术。如果用HTML来编写App的大部分代码,并且只有在需要时才使用Native代码,公司就能确保他们今天的投入在明天不会变得过时,因为HTML功能变得更丰富,可以满足现代企业一系列更广泛的移动要求。

移动Web app与移动网站的比较

 

Compatible with HTML5

 

 

移动js API—sencha touch & jquery mobile

About jQuery Mobile

  • It’s a UI-only library,     which relies on jQuery and jQuery UI for DOM manipulation, Ajax and other     utilities
  • To create UI widgets, you     generally need to hand-code their html, and the library enhances their     look and feel
  • As it works by enhancing     the html you create, it allows you to re-use or re-purpose existing html
  • Some simple applications     can be created using only html, without having to write JavaScript code
  • It has a relatively small     object model, which makes it faster and easier to learn, specially if you     are familiar with jQuery
  • It does not impose a     coding discipline or structure, which gives you flexibility, but can lead     to applications that are difficult to maintain
  • Easier to integrate with     other frameworks
  • Targets more devices than     Sencha Touch
  • Not tied to a particular     vendor

About SenchaTouch

  • It’s a library that tries     to do it all: UI widgets, DOM manipulation, Ajax and other utilities
  • Does not depend on other     libraries
  • Follows a     JavaScript-centric approach, where you are required to write little html
  • Has a large object model,     which provides more features out of the box, but takes longer to learn
  • Imposes a coding     structure and discipline, which generally results in well-organized code
  • Provides built-in server     and local storage abstractions, which make it easier to perform CRUD     operations on relational data
  • Has built-in facilities     for creating iOS and Android native packages
  • Targets less devices than     jQuery Mobile

 

 

 

如何取舍

l  游戏娱乐类(NativeApp

l  新闻信息类(HybridApp

l  社交网络类(HybridApp

l  地图、旅游应用(NativeApp

l  预定、网购、银行业务(NativeApp

l  多媒体(NativeApp

 

 

 

 

 

 

参考:http://mobile.51cto.com/ahot-340633.htm

           http://www.worklight.com/assets/files/HTML5,%20Hybrid%20or%20Native%20Mobile%20App%20Development.pdf

### Hybrid Vue Framework Development and Usage Hybrid frameworks aim at combining the best features from different technologies or platforms into one cohesive system. In context of web development, hybrid solutions often refer to applications that can run on multiple environments such as desktop browsers, mobile devices, etc., while maintaining a single codebase. For **Hybrid Vue**, this concept typically involves integrating Vue.js with other tools or libraries designed for cross-platform compatibility like CapacitorJS or Cordova/PhoneGap when targeting native-like apps across iOS and Android[^1]. Such integration allows developers not only to leverage Vue's adaptable development environment but also extend functionalities through plugins specifically tailored towards enhancing performance within these ecosystems. #### Example Setup Using CapacitorJS alongside Vue CLI Project To demonstrate how easy it might be setting up a basic hybrid app using Vue along with Capacitor: ```bash npm install @capacitor/core @capacitor/cli --save npx cap init myAppId com.example.myapp ``` After initializing Capacitor in an existing Vue project, adding support for specific platforms becomes straightforward via commands provided by `@capacitor/cli` package: ```bash npx cap add android npx cap open android ``` This setup enables building APK files directly from your Vue-based frontend source code without needing separate teams specialized in each platform’s language stack[^2]. In terms of debugging and inspecting during development phase especially important given complexities introduced by multi-environment considerations; official extensions available make troubleshooting more manageable whether working inside Electron windows or emulated smartphone screens[^3]: - Utilizing Chrome DevTools Extension for detailed insights. - Employing DejaVue visualization tool which offers graphical representations helping understand data flow between components better than traditional methods alone could provide.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值