如何使用HTML / CSS / JavaScript开发桌面应用程序? [英] How to develop Desktop Apps using HTML/CSS/JavaScript?

查看:226
本文介绍了如何使用HTML / CSS / JavaScript开发桌面应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我不感兴趣这样做专业。我是一个Web开发人员,我最近离开了Spotify的同事,他说他将主要工作在JavaScript的Spotify桌面应用程序。他说它使用Chrome框架,其中的一切都像一个网络应用程序(HTML / JS / CSS)。



,这是个好消息。如果我可以使用我已经知道的技术,并在某种框架实现它们,仍然能够建立一个窗口或更好的跨平台应用程序。



我知道我没有提到任何关于数据库的东西,但即使一个简单的hello世界桌面应用程序与web技术将是伟大的去。



对这个?我需要/需要知道什么?

解决方案

另外,您还可以查看 Chromium Embedded Framework 。它基本上是一个基于chrome的web浏览器控件。



它是用C ++编写的,所以你可以做所有的低级操作系统的东西(咆哮,托盘图标,本地文件访问,com端口等)在你的容器应用程序,然后所有的应用程序逻辑和gui在html / javascript。它允许您拦截任何http请求以提供本地资源或执行一些自定义操作。例如,对 http://localapp.com/SetTrayIconState?state=active 的请求可能会被容器拦截,然后调用C ++函数更新托盘图标。



它还允许您创建可以直接从JavaScript调用的函数。



在CEF中直接调试JavaScript非常困难。不支持任何类似Firebug。



您也可以尝试 AppJS.com < a> (有助于使用HTML,CSS和JavaScript为Linux,Windows和Mac创建桌面应用程序)



brackets.io (Adobe)的团队使用Chromium Embedded Framework创建了一个令人敬畏的shell,使得更容易获取开始。它称为括号外壳: github.com/adobe/brackets-shell 在此处了解更多信息: clintberry.com/2013/html5-desktop-apps-with-brackets-shell


First, I'm not interested in doing this professionally. I am a web developer, a coworker of mine recently left for Spotify and said he will be working mostly in JavaScript for the Spotify Desktop app. He said it uses "Chrome frame" and everything inside is done like a web app (HTML/JS/CSS).

As a web developer who never built anything for Desktop, this is great news. If I can use the technologies I already know and implement them inside some sort of a "frame" and still be able to build a windows or better yet cross platform app.

I know I didn't mention anything about the database, but even a simple hello world desktop app with web technologies would be great to get going.

So how does one go about this? Exactly what do I need/need to know?

解决方案

You may start with Titanium for desktop dev. Also you may have a look at Chromium Embedded Framework. It's basically a web browser control based on chromium.

It's written in C++ so you can do all the low level OS stuff you want(Growl, tray icons, local file access, com ports, etc) in your container app, and then all the application logic and gui in html/javascript. It allows you to intercept any http request to either serve local resources or perform some custom action. For example, a request to http://localapp.com/SetTrayIconState?state=active could be intercepted by the container and then call the C++ function to update the tray icon.

It also allows you to create functions that can be called directly from JavaScript.

It's very difficult to debug JavaScript directly in CEF. There's no support for anything like Firebug.

You may also try AppJS.com (Helps to build Desktop Applications. for Linux, Windows and Mac using HTML, CSS and JavaScript)

Also, as pointed out by @Clint, the team at brackets.io (Adobe) created an awesome shell using Chromium Embedded Framework that makes it much easier to get started. It is called the brackets shell: github.com/adobe/brackets-shell Find out more about it here: clintberry.com/2013/html5-desktop-apps-with-brackets-shell

这篇关于如何使用HTML / CSS / JavaScript开发桌面应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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