简体   繁体   English

跨平台HTML应用程序选项

[英]Cross-platform HTML application options

I'd like to develop a stand-alone desktop application targeting Windows (XP through 7) and Mac (Tiger through Snow Leopard), and if possible iPhone and Android. 我想开发一个针对Windows(XP到7)和Mac(从Snow Leopard到老虎)以及可能的iPhone和Android的独立桌面应用程序。 In order to make it all work with as much common code as possible (and because it's the only thing I'm good at), I'd like to handle the main logic with HTML and JS. 为了使它们尽可能多地使用通用代码(并且因为这是我唯一擅长的事情),我想使用HTML和JS处理主要逻辑。 Using Adobe AIR is a possibility. 有可能使用Adobe AIR。 And I think I can do this with various application wrappers, using .NET for Windows XP, Objective C for iPhone, Java for Android and native "widget" platform support for Mac and Windows Vista & 7 (though I'd like to keep the widget in the foreground, so the Mac dashboard isn't ideal). 而且我想我可以使用各种应用程序包装程序来做到这一点,使用Windows XP的.NET,iPhone的Objective C,Android的Java和对Mac和Windows Vista&7的本机“窗口小部件”平台支持(尽管我想保留小部件放在前台,因此Mac仪表板并不理想)。 Does anyone have any suggestions on where to start? 有人对从哪里开始有什么建议吗? The two sticking points are: 两个关键点是:

  1. I'll certainly need some form of persistent storage (cookies perhaps) to keep state between sessions 我当然需要某种形式的持久性存储(也许是cookie)来保持会话之间的状态
  2. I'll also probably need access to remote data files, so if I use AJAX and the hosting HTML file resides on the device, it will need to be able to do cross-domain requests. 我可能还需要访问远程数据文件,因此,如果我使用AJAX并且托管HTML文件驻留在设备上,则它将需要能够执行跨域请求。 I've done this on the iPhone without any problems, but I'd be surprised if this were possible on other platforms. 我已经在iPhone上做到了这一点,没有任何问题,但是如果在其他平台上可以做到这一点,我会感到惊讶。

For me, Android and iPhone will be the easiest to handle, and it looks like I can use Adobe AIR to handle the rest. 对我来说,Android和iPhone将是最容易处理的,看起来我可以使用Adobe AIR来处理其余的内容。 But I wanted to know if there are any other alternatives. 但是我想知道是否还有其他选择。 Does anyone have any suggesions? 有人建议吗?

You might be interested in Appcelerator's Titanium . 您可能对Appcelerator的Titanium感兴趣。 It's an alternative to Adobe AIR that lets you build native mobile and desktop apps using HTML and JS (with the WebKit rendering engine, so you can take full advantage of HTML5 and CSS3). 它是Adobe AIR的替代产品,可让您使用HTML和JS(使用WebKit渲染引擎来构建本地移动和桌面应用程序,因此您可以充分利用HTML5和CSS3)。 It also satisfies your two sticking points: 它还满足您的两个关键点:

  1. SQLite is available for persistence storage. SQLite可用于持久性存储。
  2. There are no restrictions on cross-domain requests. 跨域请求没有任何限制。

I used Titanium Desktop for a recent project and it was a relatively smooth development process. 我在最近的项目中使用了Titanium Desktop,这是一个相对平稳的开发过程。 It's also open source so you have access to the full application at all times. 它也是开源的,因此您可以随时访问完整的应用程序。

Check it out and let me know if it works for you. 检查一下,让我知道它是否适合您。

You can create a desktop application with HTML, CSS & Javascript using either of the following two frameworks 您可以使用以下两个框架之一使用HTML,CSS和Javascript创建桌面应用程序

For mobile you can use the similar HTML and Javascript using PhoneGap 对于手机,您可以通过PhoneGap使用类似的HTML和Javascript

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM