1. Overview
Jitsu is an integrated set of tools that enable developers to build and deploy sophisticated user interfaces for web applications.
These divide into two major pieces: the Jitsu Compiler, and the Jitsu Runtime.
The Jitsu Compiler
The Jitsu Compiler (jitsu.exe) provides these set of tools required to build Jitsu applications. These tools are invoked by running jitsu.exe from the command line. jitsu.exe is implemented as a C# console application. It runs under both Microsoft Windows .NET and Mono (for Linux/Mac OS X users).
Jitsu.exe contains the Page Compiler and other tools, illustrated by this block diagram:
The Page Compiler
The heart of the Jitsu Compiler is the Page Compiler, which turns XHTML and Xml markup into a JavaScript. It defines:
- Jitsu UI Markup - an XHTML/Xml/CSS markup language for defining pages and controls.
- Jitsu Data Markup - a data language for describing application data types and data sets.
- A JavaScript processor, offering features like #if/#endif conditional compilation, #class and #method macros to make it easier and less error-prone to define new classes and methods, and a "cruncher" for removing whitespace and renaming long variable names with short names.
The output of the page compiler is a set of JavaScript, HTML, CSS files that can be deployed to a standard web server, e.g. Apache or Microsoft IIS.
See The Jitsu Approach for more on the page compilation process.
Project System
The Jitsu Compiler (jitsu.exe) includes a lightweight project system, which lets you specify project settings in an project.xml. Alternatively, if you have an external build system, you can simply treat jitsu.exe as an external task. See Projects for more on the project system.
Puny Web Server
The Jitsu Compiler (jitsu.exe) also contains a mini embedded web server we call Puny. Puny is a barebones web server that watches files in a Jitsu project, and automatically runs the page compiler when they change, presenting any compile errors in your web browser.
With Puny, you can edit files in a text editor, and hit reload in a browser, and quickly see the compiled results, or respond to any compiler errors. Puny also lets designers work on Jitsu markup locally, without having to install a full web server.
Finally, Puny makes it easy to access the documentation and samples bundled with the developers kit. See Projects for more on working with Puny.
The Jitsu Runtime
The Jitsu Runtime contains a set of services written in JavaScript, defining a powerful but relatively compact (under 100k when crunched) JavaScript framework.
Jitsu applications load the Jitsu Runtime via a <script> tag in their <head> section.
The core runtime components are illustrated in this block diagram:
The runtime offers:
- Core Controls, including Button, RadioButton, CheckBox, ComboBox, List (a templated list control), DockPanel, CardDeck, Popup, and Details.
- Control Services such as animation, drag and drop, validation, etc.
- Foundation classes that define a property and event system, and DataSet and DataObject classes.
- A client-side data binding engine, with full two-way hierarchical data binding, all in the client's browser.
- Data marshalling to and from JSON.
- Cross platform services, such as XPlatform, XPlatformEvent, XPlatformHttp, to isolate the differences between browsers.
- A handful of added JavaScript language classes and methods to fix gaps and omissions.
In addition, a number of developer aids are built into the application when it is compiled in "debug" mode. These include:
- A browser-based graphical inspector, that lets you explore the hierarchy of controls in the browser, view console output, and run simple debugging tests.
- A data "snapshot" capability, which lets you export datasets loaded into a page to a text file which can then be reloaded at a later time - enabling you to create test cases, or to create views that you can send to an offsite designer.