jqApp: an application framework built on top of jQuery

jqApp is about building full-fledged applications using JavaScript, using the amazing jQuery as the underlying basis. jqApp is not a jQuery plugin, but is a framework which uses jQuery as its core. It is not inherently incompatible with jQuery plugins, it just isn't one.

jqApp is an experiment and is likely to undergo much change as it evolves. Here's a demo of the current state:
  • jqApp demo (requires a Damned Fine Webbrowser).
  • Console-style jqApp demo (requires a Damned Fine Webbrowser).
  • The JSONMessage sub-framework provides a uniform JSON-based request/response API.
  • jqApp is a more generic form of an application called BYOO, and that app might give you an idea of what direction i'm headed with jqApp.

About jqApp

  • Author: Stephan Beal
  • License: this has no simple answer. The core parts are Public Domain, but parts which depends on, or a derived from, other libs (e.g. jQuery) might inherit viral licensing terms (e.g. the GNU GPL, depending on how your jQuery is licensed).
  • It is still very young (it was born sometime in July 2009), and only the most basic services are currently implemented (see below).

What's currently implemented

  • High-level JS-side object (jqApp) providing a few common application services.
  • High-level PHP5-side API (also called jqApp) providing a few common server-side services.
  • A plugins/module system which allows coders to extend jqApp in several different ways, both on the JS- and PHP-sides. It provides a uniform API for loading prerequisite modules and emitting JS- or CSS code for a particular module.
  • Loading (from remote) and running (locally) jqApp "widgets" (or "applets"). Widgets have a well-defined (but minimal) interface and a "view" object which the client can plug into the UI.
  • Has a simple-to-use mechanism to pack all required client-side script code, including that for all add-on modules, via a single (and compressed) HTTP request. This same mechanism can be used to request the JS code for any given module during runtime. It is also used for loading CSS and jQuery plugins.
  • Custom event handling. Clients can create their own or listen to those emited by the jqApp core (e.g. to direct status/error message to a status line or dialog box).
  • A rather cool JSON-based request/response system, where clients send requests via high-level Request objects, the server dispatches that to a handler depending on the message type, and responds using a uniform JSON grammar. Adding new handlers is done server-side, but the client interface for placing requests is the same regardless of the event type. See the demo page for several demonstrations of this.

Some notable TODOs

  • Generic support for application data objects (in particular, those which pull their data in from JSON sources). i've got a prototype in another source tree, but need to genericize it for jqApp.
  • Certainly lots more.


jqApp is basically a fat wrapper around jQuery, and as such it supports, in theory, any browser supported by jQuery. i have had good luck with Firefox 3, Opera 9, Epiphany, Google Android, and sometimes (but sometimes not) Google Chrome. i have had very poor luck with any flavour of MSIE and Opera Embedded for the Nintendo Wii and GameBoy DSi.

jqApp requires a PHP-capable web server (PHP 5.2 or higher), but no special configuration of the server is needed, nor are any special rights required. Most of it will work just fine without PHP, but the PHP parts allow some features we cannot get in pure JS mode, like dynamically amalgamating all required JS files into a single request.


If someone is honestly interested, get in touch and i will package up the sources. But be aware that it's all a big experiment and may change at any moment.
Last modification: Sun, 09 Aug 2009 02:09:15 GMT