javascript 如何进行混合移动应用程序的想法?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22168381/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 22:35:55  来源:igfitidea点击:

How to proceed with Hybrid Mobile Application Idea?

javascriptangularjscordovaionic-frameworkloopbackjs

提问by Rohit Kondekar

We have monetizable Mobile Application Idea, and will be building our first mobile Hybrid application.

我们有可获利的移动应用程序创意,并将构建我们的第一个移动混合应用程序。

I looked into few things and figured out that to achieve my end-to-end goal I would need:

我研究了几件事,并发现要实现我的端到端目标,我需要:

  1. Front End UI Framework : possible options: Ionic / AngularGap [but documentation seems parse].

  2. Then I think we need to wrap it up with PhoneGap for various platforms.

  3. Have a BackEnd framework - Loopback / Parse

  1. 前端 UI 框架:可能的选项:Ionic / AngularGap [但文档似乎解析]。

  2. 然后我认为我们需要将它与各种平台的PhoneGap一起包装起来。

  3. 有一个后端框架 - Loopback / Parse

I have yet to look into specific documentations, but it would be very helpful to have a experienced suggestion if the path is right.

我还没有研究具体的文档,但如果路径正确,有经验的建议会很有帮助。

What I don't know right now:

我现在不知道的是:

A. What I am thinking is right and how I should proceed.

A. 我的想法是对的,我应该如何进行。

B. Ionic is an UI framework and how do I connect it with Phonegap, like how to access native features. I think I have to use angular to call Phonegap apis ?

B. Ionic 是一个 UI 框架,我如何将它与 Phonegap 连接起来,比如如何访问原生功能。我想我必须使用 angular 来调用 Phonegap apis 吗?

C. If I get the front end part set, how do I call backend apis like that of loopback? through REST calls? or there are other more efficient ways to do that?

C、如果我拿到了前端部分,如何像loopback一样调用后端api?通过 REST 调用?或者还有其他更有效的方法来做到这一点?

Are there simpler ways to achieve this?

有没有更简单的方法来实现这一目标?

采纳答案by Lucas Garcia

I am also trying to study Ionic framework to use with an Android app. Ionic seems to be a very good framework, but the lack of documentation is blocking me from advancing.

我也在尝试研究 Ionic 框架以与 Android 应用程序一起使用。Ionic 似乎是一个非常好的框架,但是文档的缺乏阻碍了我的进步。

From what I have seen so far, it looks like Ionic+Angular already integrates Cordova. So you don't need to create a Cordova app anymore, just create an Ionic app and it has Cordova underneath it:

从我目前看到的情况来看,Ionic+Angular 似乎已经集成了 Cordova。所以你不再需要创建 Cordova 应用程序,只需创建一个 Ionic 应用程序,它下面有 Cordova:

Did it using Ionic CLI, which uses ionic-angular-cordova-seed

使用Ionic CLI 做的,它使用ionic-angular-cordova-seed

About the backend, Angular provides $http and $resource for AJAX requests, take a look at the Angular documentation, I assume Ionic didn't change the way Angular makes these calls.

关于后端,Angular 为 AJAX 请求提供 $http 和 $resource,看看 Angular 文档,我认为 Ionic 没有改变 Angular 进行这些调用的方式。

My conclusion:I think when Ionic becomes a more mature framework (which won't take long) with better documentation, it will be the best UI framework. From what I have seem, it looks very native with very good performance. And I still plan to keep going with it for having no better option, although it is taking me some time because there are things I still can't understand.

我的结论:我认为当 Ionic 成为一个更成熟的框架(不会花很长时间)和更好的文档时,它将成为最好的 UI 框架。从我看来,它看起来非常原生,性能非常好。而且我仍然计划继续使用它,因为没有更好的选择,尽管这需要我花费一些时间,因为有些事情我仍然无法理解。

回答by Gaurav Dhiman

I am also working on mobile app for last few months. Tried lot many UI frameworks for hybrid app developmet, tried lot many server side and NOSQL DB technologies and below is my learning for UI frameworks from my experience.

最近几个月我也在开发移动应用程序。为混合应用程序开发尝试了很多 UI 框架,尝试了很多服务器端和 NOSQL DB 技术,下面是我从我的经验中学到的 UI 框架。

  • Sencha Touch- Early entrant in hybrid app space, most known till date, best cross device support but steep learning curve as they have their own framework rules. Moreover app is bulky and run all JS to build HTML at run time which hits performance to some extent. Surely not a good idea to build whole app IN JS, if compared to HTML5.

  • jQueryMobile- Poor performance on mobile

  • BootStrap - Good UI but poor performance on mobile. It was not dev at first place with mobile in mind

  • PhoneJS- Neat / clean UI but not free for non-open-source apps.

  • Chocolate-chip UI- Light weight, native look and feel, but not well supported in cross device cases, new player and not much adoption. Surely the work done is good and hopefully it will improve in future as its backed by company.

  • Ionic Framework- Great UI framework in dev. As of now in alpha and I would not recommend or prod apps. Did some quick tests and found few issues on Android like slider does not work properly, you need to tweak something. I think, its developing fast (recently got investors funding too), so hopefully it will soon be a matured UI framework and best out of lot, but till then its just good for prototyping not prod apps.

  • LungoJS- Light-weight UI framework. Good transition, native look and feel, Good cross-phone support (Android + iPhone), Bad tab support (have UI issues on tab), Not actively maintained as developer is busy creating some new framework.

  • Sencha Touch- 混合应用程序领域的早期进入者,迄今为止最为人所知,最好的跨设备支持,但由于他们有自己的框架规则,所以学习曲线陡峭。此外,应用程序体积庞大,在运行时运行所有 JS 来构建 HTML,这在一定程度上影响了性能。如果与 HTML5 相比,在 JS 中构建整个应用程序肯定不是一个好主意。

  • jQueryMobile- 移动端性能不佳

  • BootStrap - 良好的用户界面,但在移动设备上的性能不佳。考虑到移动设备,它首先不是开发人员

  • PhoneJS- 整洁 / 干净的 UI,但对于非开源应用程序不是免费的。

  • Chocolate-chip UI- 轻量级、原生的外观和感觉,但在跨设备情况下没有很好的支持,新播放器和没有多少采用。当然做的工作是好的,希望这将在未来提高其后盾的公司

  • Ionic Framework- 开发中很棒的 UI 框架。截至目前处于 alpha 阶段,我不会推荐或生产应用程序。做了一些快速测试,发现在 Android 上很少有问题,比如滑块不能正常工作,你需要调整一些东西。我认为,它的发展速度很快(最近也得到了投资者的资助),所以希望它很快就会成为一个成熟的 UI 框架并且是最好的,但在那之前它只适合原型设计而不是生产应用程序。

  • LungoJS- 轻量级 UI 框架。良好的过渡,原生的外观和感觉,良好的跨手机支持(Android + iPhone),糟糕的标签支持(标签上有 UI 问题),由于开发人员忙于创建一些新框架而没有积极维护。

For my app, I picked up LungoJS and will eventually move to Ionic once it get matured and have decent adoption.

对于我的应用程序,我选择了 LungoJS,并且一旦它成熟并得到适当的采用,最终将转向 Ionic。

All of these can be used with PhoneGap/ Cordovato access native device APIs and package it as mobile app.

所有这些都可以与PhoneGap/ Cordova一起使用以访问本机设备 API 并将其打包为移动应用程序。

Advice on jQuery vs Angular - Surely Angular is better option over jQuery, it makes performance (UI transitions) faster on mobile app when compared with jQuery implementation.

关于 jQuery 与 Angular 的建议 - 与 jQuery 实现相比,Angular 肯定是比 jQuery 更好的选择,它使移动应用程序的性能(UI 转换)更快。

Hope it help.

希望有帮助。

Gaurav

高拉夫

http://www.linkedin.com/in/gauravdhiman

http://www.linkedin.com/in/gauravdhiman

回答by Miroslav Bajto?

C. If I get the front end part set, how do I call backend apis like that of loopback? through REST calls? or there are other more efficient ways to do that?

C、如果我拿到了前端部分,如何像loopback一样调用后端api?通过 REST 调用?或者还有其他更有效的方法来做到这一点?

Most backend-as-a-service solutions offers REST APIs these days. Both Parse and Loopback provide SDKs for javascript clients, wrapping the REST calls in a more friendly API.

如今,大多数后端即服务解决方案都提供 REST API。Parse 和 Loopback 都为 javascript 客户端提供 SDK,将 REST 调用包装在更友好的 API 中。

LoopBack

环回

If you decide to use LoopBack for your backend and AngularJS for your front-end, then you can use the loopback-angularproject to automatically generate $resource services for your Models. It comes with a Grunt plugin too.

如果您决定为后端使用 LoopBack,将 AngularJS 用于前端,那么您可以使用loopback-angular项目为您的模型自动生成 $resource 服务。它也带有一个 Grunt 插件。

Check out loopback-example-access-controlapp, it is built on LoopBack + AngularJS + Ionic.

查看loopback-example-access-control应用程序,它建立在 LoopBack + AngularJS + Ionic 之上。

Parse

解析

I am not very familiar with Parse, a quick search revealed these links:

我对 Parse 不是很熟悉,快速搜索发现以下链接:

Disclaimer: I am one of the LoopBack developers.

免责声明:我是 LoopBack 开发人员之一。

回答by khemry

If you are looking for developing a hybrid app (phonegap + angularJS + backend), I would like to recommend Monaca. I've just recently discover it. It is very cool since it has phonegap inside its framework and its own backend. Moreover, it also has a UI framework called OnsenUIwhich is based on Topcoatand AngularJS.

如果您正在寻找开发混合应用程序(phonegap + angularJS + backend),我想推荐Monaca。我最近才发现。它非常酷,因为它的框架和后端都有 phonegap。此外,它还有一个名为的 UI 框架,该框架OnsenUI基于TopcoatAngularJS.

It also provides native components to use in your hybrid apps. What is impressive about it, you don't even need to build and install your app to your device everytime during development. That's what I love the most about this.

它还提供了可在您的混合应用程序中使用的本机组件。令人印象深刻的是,在开发过程中,您甚至不需要每次都构建应用程序并将其安装到您的设备上。这就是我最喜欢这件事的地方。

I hope it helps since I think it is just like what you are asking for. I'm just a novice developer and I find it is very easy to use.

我希望它有所帮助,因为我认为它就像您所要求的那样。我只是一个新手开发人员,我发现它非常易于使用。