Jea*_*ent 5 architecture frontend android cross-platform ios
我计划在iOS,Android和AngularJS网站上创建一个应用程序.
但是,由于不必在每个应用程序上重写业务代码,我希望尽可能多地重用代码.
为了能够在任何平台上执行项目的核心,我必须使用Web语言.
通过不同的文章,我计划一个通用的架构来分离项目的业务逻辑 - 核心 - 与将为每个系统重新实现的UI(UIKit for iOS,AngularJS和Polymer for webapp等)
该体系结构的目标是通过分解模块中的需求,DRY和SOLID来尊重重要的软件工程原理,例如信息隐藏
Here for iOS (almost the same for Android):
The code of "core" will be executed through a virtual machine as this article shows us: http://www.skyscanner.net/blogs/developing-mobile-cross-platform-library-part-3-javascript
Here for AngularJS:
Now that you know everything about the architecture, here are my questions.
I don't have enough experiences and feedback on the web-langages to be able to make a smart choice. After few researches, I found that there are various options:
Dart:
Javascript ES6: Event if it's not fully implemented in browsers yet, it's possible to start using ES6 with Traceur compiler.
谢谢你的阅读.
我知道这不是您列出的选项之一,但不会自动排除 C++。例如,这就是 Dropbox 使用的方法,他们甚至为此目的开源了他们的工具:
C++ 到 Java/Objective-C API 生成器:
https://github.com/dropbox/djinni
适用于 Android/iOS 的示例“本机”应用程序:
关于该主题的有趣文章有更多链接:
http://oleb.net/blog/2014/05/how-dropbox-uses-cplusplus-cross-platform-development/
更新答案:
如果您确实不想使用 C++ 并且可以接受非本地语言带来的臃肿,那么您可以尝试以下操作:
https://github.com/MobileChromeApps/mobile-chrome-apps
该项目是 Google 的 Cordova 分支,并添加了许多新功能和优点。
这里有一个 Chrome API 的 Dart 包装器:
https://github.com/dart-gde/chrome.dart
基本上,您可以使用纯 HTML5 技术在 Dart 中编写应用程序,然后对于某些事情您可以使用 Chrome API(设备状态等)。然后您可以部署:
归档时间: |
|
查看次数: |
403 次 |
最近记录: |