Feature Showcase : Feature Set & Examples

Use joystick mode

Introduction to ItsNat

Overview

Welcome to the ItsNat's Feature Showcase, this is a special Single Page Interface Java AJAX web application using ItsNat to show its capabilities with many examples and the source code used.

ItsNat is an innovative open source GNU Lesser General Public License v3 (LGPL v3) licensed Java AJAX Component based Web Framework, it offers a natural approach to modern web development.

Why natural? ItsNat leverages the old tools to build the new AJAX based Web 2.0 applications: pure (X)HTML and pure Java W3C DOM for the view logic!

ItsNat is server centric using a unique approach called TBITS, "The Browser Is The Server". ItsNat simulates a Universal W3C Java Browser at the server, with ItsNat the server mimics the behavior of a web browser, containing a W3C DOM Level 2 node tree and receiving W3C DOM Events.

ItsNat virtually supports 100% of browser market including mobile devices with AJAX support (previous versions may work):

  • Desktop Browsers:

    Google Chrome, FireFox, Internet Explorer v6,7,8, Internet Explorer v9, Opera 12.12+, Safari 5.1.7+.

  • Mobile Browsers:

    Android 2.1+, BlackBerry JDE 4.6+ (Flip, Bold, Storm... including JDE 6.0 Torch), IE Mobile 6 (since Windows Mobile 6.1.4), iPhone/iPad/iPod iOS 6.1+, Opera Mini 4.x, Opera Mobile 12.12+, S60WebKit (since S60 5th v1), S40WebKit (since S40 6th)

  • SVG plugins:

    Adobe SVG Viewer v3, Savarese Ssrc SVG (adds XUL to MSIE too), SVGWeb, and Batik as applet.
How ItsNat works

When the Java user code modifies the server DOM tree this modification is detected (using DOM mutation events) and automatically sent to the real web browser as JavaScript DOM based code, synchronizing the client DOM with the server. This approach fits perfectly well with AJAX! AJAX is not an addition is a core part of ItsNat.

From server the developer can register W3C DOM Event listeners listening for W3C DOM events. This registry is automatically propagated to the client, when the user, for instance, clicks a "listened" element the real browser event is sent to the server using AJAX, converted to a W3C DOM event and received by the server based listener(s).

The DOM is used to modify the original tree/layout on loading time or as a response of a AJAX event, this original layout is defined using pure (X)HTML based templates with absolutely NO logic! (extreme separation of view and logic). If the modification is big ItsNat provides "template fragments", a template fragment is a piece of (X)HTML (or XML) markup that can be inserted (included) as DOM into the main tree statically or dynamically (typically as a response of a user/AJAX event).

In addition to AJAX, events can be transported by auxiliary SCRIPT elements.

Do not worry about the memory size of a DOM tree, ItsNat provides a smart DOM tree cache in a serialized form (pure text not DOM). For instance this text you are reading (the "explanation box") is saved in memory once and as pure text not DOM.

Core features

These are the basics, ItsNat provides many more things: client to server synchronization, web-continuations (continue events), user defined event types, timers, long running server tasks, COMET, DOM utils (to simplify DOM manipulation), resolution of ${} based variables in markup, ElementCSSInlineStyle support in server, automatic page remote/view control of other users/sessions!!, XML generation, non-HTML namespaces support like SVG embedded in XHTML or pure SVG and XUL documents with AJAX/SCRIPT events, JavaScript generation utilities, server-sent events (events fired by the server sent to the client) simulating user actions for instance to test the view using the server, custom pretty URLs, previous/forward document navigation (pull and push referrers) with back button support, degraded modes (events disabled and JavaScript disabled modes), automatic synchronization of server forms with client etc.

A Component System

Previous features are defined in the ItsNat Core level, ItsNat provides a Component system (constructed over the Core level) too. These components are event (AJAX or SCRIPT) based from the scratch inspired in Swing and reusing Swing as far as possible such as data and selection models (but ItsNat does not want to be a Swing forced clone in web, is not a pixel based web framework). ItsNat provides several button types, text based components, labels, lists, tables and trees (all of them with content editable "in place").

The most interesting feature is: any element can be a component, for instance any element can be a normal button, a check box, a radio button, any element list may be a combo or a list component, for instance a group of SVG circles may be a multiple selection list component. Furthermore components can be used to generate XML!!

ItsNat components are not intrusive, they are not "black boxes", you can customize and control every element used, every attribute. Components are highly extensible and customizable, for instance there is no default decoration when selection ItsNat tells you when and what has been selected, ItsNat may be seen as a meta-framework.

To do user defined components, for instance compound components, is amazingly easy.

Furthermore: you can specify that server form controls are updated when the client changes automatically without components! (components are used behind the scenes configured as "markup driven"). This way client-server synchronization is bidirectional and the server fully simulates a web browser including client state simulation of form controls.

What ItsNat is NOT, what is MISSING (deliberately)!

No XML configuration (use Spring or the configuration technique you like more), no declarative navigation, no JSP, no custom tags, no declarative programming, no view-Java bindings, no logic mixed with view, no new (expression or templating) languages, no "pull/active views" (ItsNat pushes data/markup to the view), not page based development (ItsNat is event based), not highly closed not customizable and intrusive components, not obscure HTML and JavaScript generation, not fully programmatic view definition (ItsNat uses pure HTML/XHTML/SVG/XUL/XML templates), not JavaScript centric, no big and obscure JavaScript libraries hard to debug and maintain open to modifications by malicious users in runtime, not AJAX as a forced add-on, not oriented to tools (use your favorite X/HTML designer and pure Java IDE), not developer/designer substitution by the framework, no loss of developer control.