(HTML + JS)桌面客户端框架 [英] Framework for (HTML + JS) Desktop Client

查看:522
本文介绍了(HTML + JS)桌面客户端框架的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算为Windows和Mac编写一个桌面客户端。它将通过网络技术(HTML + JS)提供支持。因此它应该在用户桌面上的WebKit引擎上运行。



最近,我看到了一个针对此问题的有趣方法: Appcelerator
我喜欢它的基本概念,但我不想依赖他们的服务。相反,我想完全控制WebKit程序,它加载我的应用程序。



是否有任何体面的开源WebKit框架用于构建桌面应用程序?桌面集成功能,比如Growl-support以及其他东西。赞助。

问候,



Stefan






更新:我不搜索Adobe Air; - ) 除了Appcelerator,我知道两个桌面GUI框架有一个浏览器组件包装了webkit:GTK +和Qt。您可以使浏览器组件填充应用程序的窗口,并使用HTML + CSS编写大部分(或全部)应用程序。如果你喜欢Python语言或者它是非常重要的标准库,你可以使用python绑定pyQt或pyGTK。



如果你喜欢Python语言,重新愿意使用Gecko引擎,是XULRunner( https://developer.mozilla.org/En/ XULRunner的)。虽然Prism是一组用于Web应用程序的桌面轻量级绑定,但XULRunner允许您构建完整的应用程序,如Firefox本身或Thunderbird等。尽管许多XULRunner应用程序都是用XUL编写的,但使用XUL编写整个应用程序很容易HTML / CSS在一个单独的XUL WebBrowser组件中 - 而你的javascript仍然具有原生桌面应用程序的所有功能。



我已经使用XULRunner编写了几个桌面应用程序。几乎所有应用程序的代码都是HTML / CSS / Javascript,但是我已经包含了Python框架(通过pyXPCOM和pyXPCOMext),并且已经编写了一个向Python公开一些Python功能的薄层。 XULRunner附带的Mozilla组件为您提供了大量免费的功能,但如果您发现自己需要更多的功能或全功能的编程库,Python将会有所斩获。还有对Java的绑定。或者,如果您想使用C或C ++库,则可以从头开始构建XULRunner。



更新:最初在2009年撰写了上述内容。其中之一是,Prism项目从Mozilla实验室中删除,随后在2011年下半年完全停止( http://www.salsitasoft.com/2011/09/08/discontinuing-webrunner/ )。值得一看的另一个选择是 https://github.com/rogerwang/node-webkit

2014年12月更新:另一个选项是GitHub的Atom Shell。它使用Chromium的内容模块,就像node-webkit和Chromium Embedded Framework(并将其作为独立的lib发布: https://github.com/brightray/libchromiumcontent )。与node-webkit的一个主要区别是,Atom不是将节点的事件循环与Chromium的事件循环合并,而是在不同的进程中启动它们,并使用混合的同步和异步进程间消息来进行通信。



如果您有兴趣将Chromium嵌入到C ++或.Net应用程序中,还可以 Awesomium


I plan to write a Desktop Client for Windows and Mac. It will be powered by web techniques (HTML + JS). Therefore it shall run on a WebKit engine on the user's desktop.

Recently, I saw an interesting approach for this issue: Appcelerator I love its basic concept, but I don't want be dependent on their services. Instead I want to have full control on the WebKit program, which loads my app.

Are there any decent open source WebKit frameworks for building desktop apps? Desktop integration features, such as Growl-support and stuff are appreciated.

Regards,

Stefan


Update: I'm not searching for Adobe Air ;-)

解决方案

Besides Appcelerator, I'm aware of two desktop gui frameworks that have a browser component that wraps webkit: GTK+ and Qt. You can make the browser component fill your application's window and write most (or all) of the application in HTML+CSS. If you like the Python language or it's very significant standard library, you can use the python bindings pyQt or pyGTK.

A more "beefy" alternative to Prism, if you're willing to go with the Gecko engine, is XULRunner (https://developer.mozilla.org/En/XULRunner). While Prism is a set of lightweight bindings to the desktop for a web app, XULRunner allows you to build a complete app like Firefox itself or Thunderbird, etc. While many XULRunner applications are written with XUL, it is easy to write the whole app using HTML/CSS inside a single XUL WebBrowser component - and your javascript still has all the power of a native desktop application.

I have written a couple desktop applications using XULRunner. Almost all of the applications' code is HTML/CSS/Javascript, but I have included the Python framework (via pyXPCOM and pyXPCOMext) and have written a thin layer that exposes some Python functionality to the Javascript. The Mozilla components that come with XULRunner gives you a decent amount of functionality for free, but if you find yourself in need of more functionality or a full-featured programming library, Python will do the trick. There are also bindings to Java. Or, if you want to use C or C++ libraries, you can build XULRunner from scratch.

Update: A few things have changed since I originally wrote the above in 2009. For one, the Prism project was dropped from Mozilla Labs and subsequently discontinued altogether in late 2011 (http://www.salsitasoft.com/2011/09/08/discontinuing-webrunner/). One alternative worth looking at is https://github.com/rogerwang/node-webkit.

Dec 2014 Update: Another recent option is GitHub's Atom Shell. It uses Chromium's "content" module, just like node-webkit and Chromium Embedded Framework (and publishes it as a standalone lib: https://github.com/brightray/libchromiumcontent). One major difference from node-webkit is that instead of merging node's event loop with Chromium's event loop, Atom launches them both in separate processes and uses a mixture of sync and async inter-process messages to communicate between them.

If you're interested in embedding Chromium in a C++ or .Net app, there's also Awesomium.

这篇关于(HTML + JS)桌面客户端框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆