Skip to content

Specification

candycode edited this page May 24, 2012 · 11 revisions

Goal: to develop command line and GUI desktop applications with languages that compile to JavaScript, command line applications shall not have any dependency on QtGUI.

##Use cases

Quick development of stand-alone applications with JavaScript e.g. create a data analysis application displaying local data with HighCharts.

Flash-like/Silverlight environment: Create a player application that executes scripts inside the LoCO environment; a few options available:

  1. everything packed inside a compressed binary Qt resource file
  2. zip/gz archive
  3. single script accessing resources from the network

Standalone application: same as previous configuration but with scripts embedded into player's executable.

Online library: create iTunes-like client to browse applications/libraries/scripts with automatic download of dependent resources; the download of dependent resources can happen at application/module download time or just-in-time during application execution.

Ad-driven application: easy to include any standard on-line ad service when using a web-based gui for a desktop application; note that it is also possible to create local caches of ads to be displayed while offline or use a custom network access manager/protocol handler to display ads dependent on specific network requests. In general many of the context-sensitive techniques used by Google should be available.

Embedded web application: using a custom network access manager or custom protocol handler it is possible to automatically forward all requests to an in-process request handler.

##Specification list

  1. target platform: Windows 7, MacOS >= Snow Leopard, Ubuntu Linux >= 11.04, priority given to 64bit platforms
  2. the development workflow should be something like
  3. develop or wrap existing C++ code with a QOject exposing the public interface with slots or Q_INVOKABLE
  4. implement the application in JavaScript/CoffeScript... directly invoking C++ methods, connecting C++ slots to JavaScript callbacks or JavaScript functions to C++ methods
  5. connect different C++ modules through JavaScript: It shall be possible to pass a QObject* from one C++ module to another e.g. var visitor = scenegraphFilters.create("count-textures-visitor"); scenegraph.apply(visitor); where visitor and scenegraph are both references to QObjects
  6. it shall be possible to use all the available JavaScript toolkits(namely Knockout, jQuery, MooTools, ExtJS, Dojo + the various MVC frameworks) for developing GUI applications through QtWebKit
  7. it shall be possible to use any language that compiles to JavaScript, top priority is CofeeScript
  8. native(Qt) widgets shall be supported to allow for things like creating a real Mac OS top menu or embed a web gui inside a Mac OS drawer.
  9. ability to specify an entire GUI layout through JSON including event callbacks, this is similar to QML, except from the fact that it is standard JSON.
  10. [needs research] ability to access native widgets from DOM: e.g. associate specific css classes to native widgets, note that Qt already has some support for styling widgets through a css-like language, so it should also be possible to convert from standard css to Qt's flavor
  11. implement custom protocol handlers and network access managers to allow full control over navigation in WebKit
  12. implement basic access control for filesystem and network
  13. it shall be possible to distribute applications as a single standalone executable with all the resources stored within the executable; this is fairly easy with Qt since there is direct support for reading from the virtual "qrc:/" filesystem
  14. allow the creation of HUD-type interfaces by layering QtWebKit on top of a QGraphicsWebView(i.e. do what Awesomium and Berkelium do)

Also investigate using frameworks other than Qt e.g. wxWidgets with wxWebKit and/or Chromium embedded framework.

Clone this wiki locally