ItsNat

From Wikipedia, the free encyclopedia
Jump to: navigation, search
ItsNat
ItsNat.png
Initial release November 1, 2007
Stable release 1.2 / May 24, 2011; 8 months ago (2011-05-24)
Written in Java
Operating system Cross-platform: JVM
Type Ajax framework
License Dual license: LGPL, Proprietary [1]
Website itsnat.sourceforge.net

ItsNat Natural AJAX, is an open source Java component-based Ajax framework.

Contents

[edit] Overview

ItsNat is server centric using an approach called the browser is the server (TBITS). ItsNat simulates a Universal World Wide Web Consortium (W3C) Java Browser at the server containing a W3C DOM Level 2 node tree and receiving W3C DOM events.[2]

[edit] How it works

When the server DOM tree is modified using Java W3C DOM APIs by the developer, this modification is detected (firing DOM mutation events) and automatically sent to the real web browser as JavaScript DOM based code, synchronizing the client DOM accordingly, usually as response of an AJAX event (ItsNat is heavily based on AJAX).

The developer code in the server can register Java W3C DOM Event listeners listening for W3C DOM events, this listener registration 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 original page layout is defined using pure HTML, XHTML, SVG, or XUL based templates with no logic. If the modification is big ItsNat provides "template fragments", a template fragment is a piece of markup that can be inserted (included) as DOM into the main tree statically or dynamically (typically as a response of a user/Ajax event).

To save server memory ItsNat provides a DOM tree node cache in a serialized form (as plain text not DOM) and DOM subtrees no longer used can be removed manually only in server saving memory (the client DOM remains untouched).

Despite same client-server DOM contract, ItsNat provides some tolerance to DOM nodes introduced by non-ItsNat JavaScript code, static zones in server can be managed by non-ItsNat JavaScript code, DOM subtrees removed only in server can be changed freely in client, and in some locations (between and at the end of head and body elements), "intrusive" nodes are tolerated.

[edit] Core features

  • Automatic client synchronization from server
  • Some support of automatic server synchronization from client
  • Web-continuations: "continue" events
  • User defined event types
  • AJAX timers
  • Long running asynchronous server tasks: client is notified when finished
  • Comet without special (NIO or similar) Servlet engines
  • Server side DOM utils: to simplify DOM manipulation like lists, trees, ElementCSSInlineStyle support etc
  • Resolution of ${} based variables in markup: helps keep Java DOM code as agnostic as possible of the concrete layout
  • Markup fragments: dynamic parts of the page to be inserted in any time very useful in Single Page Interface
  • SVG, and other namespaces, embedded inline on XHTML and application/xhtml+xml MIME
  • SVG, and other namespaces, embedded inline on X/HTML and text/html MIME on
    • Browsers with native SVG
    • MSIE with Adobe SVG Viewer (v3.0 or v6.0 beta) plugin including dynamic processing of SVG DOM
    • Any browser with Flash support using SVGWeb
  • Pure SVG documents including AJAX in browsers with native SVG or MSIE with Adobe SVG Viewer or Renesis Player v1.1 or Savarese Ssrc plugin.
  • Pure XUL documents including AJAX in Gecko browsers (like FireFox) or MSIE with Savarese Ssrc plugin.
  • XML generation
  • IFrame/Object/Embed/Applet Auto-Binding: in server child documents opened by IFRAME, OBJECT, EMBED or APPLET tags are automatically bound to the parent document in server. This feature works with:
    • X/HTML loaded by an IFRAME
    • SVG loaded by an IFRAME/OBJECT/EMBED in browsers with native SVG or MSIE with Adobe SVG Viewer or Renesis or Savarese Ssrc: only OBJECT and EMBED
    • SVG loaded by Batik applet (custom version for ItsNat) in an APPLET/OBJECT/EMBED
  • Java to JavaScript generation utilities
  • Server-sent events (events fired by the server sent to the client simulating user actions) with the real browser or simulated for instance to test the client view simulating user actions or simulating the client in server
  • Referrers: in page navigation, the prior document in server can be obtained to copy any data avoiding session data in page based applications: navigation includes back/forward/reload support; two modes: push and pull
  • Degraded modes: AJAX disabled and JavaScript disabled modes
  • Extreme Mashups
  • AJAX bookmarking: or bookmarking in Single Page Interface applications
  • Pretty URLs
  • Automatic page remote/view control of other users/sessions
  • Remote Templates

[edit] Component system

ItsNat provides an optional Component system built using the core features of the framework. These components are AJAX based and inspired in Swing, reusing Swing as far as possible such as data and selection models, but ItsNat is not a Swing clone in the web and is not a pixel based web framework.

ItsNat provides several button types, text based components, labels, lists, tables, trees usually with content editable "in place".

Any HTML 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. Components can be used to generate XML too.

ItsNat components are not intrusive because the component view (markup) is provided by the developer and attached to the component.

[edit] Requisites, platforms

ItsNat is pure Java and runs in any Java Virtual Machine v1.4 as the minimum configuration and virtually any servlet compliant container.

Google App Engine is supported including AJAX with some limitations.

Supported desktop browsers: Adobe AIR HTML Component, Arora, Google Chrome 1+, Firefox 1+, Internet Explorer 6+ (including v9), Moblin 2.0, Opera 9+, QtWebKit and QtJambi (Qt 4.4), Safari 3+.

Mobile browsers (all including AJAX): Android since 1.0 r2, BlackBerry JDE 4.6+ (Bold, Storm etc), Bolt, Fennec (a.k.a Firefox Mobile)Internet Explorer Mobile 6 of Windows Mobile 6 and 6.1 (Pocket IE) and IE Mobile of WM 6.1.4 (6 on 6 browser), iPhone/iPod Touch 2.0+, Iris Browser 1+, Minimo 0.2, Motorola Symphony 1.1 [1] (ROKR EM35, MOTO VE66 phones), NetFront 3.4+ (WinMob and included in some SonyEricsson phones), Opera Mini 4.x and 5.x, Opera Mobile 8.6x (WinMob and UIQ), 9.5, 9.7 and 10, S60WebKit (since S60 3rd), S40WebKit (since S40 6th), Palm Pre webOS, QtWebKit of Qt for Embedded Linux and Windows CE (Qt 4.4), Skyfire 1.0 and UCWEB 6+ (Java and WinMob).

SVG plugins (including AJAX): Adobe SVG Viewer v3 [2] and v6 beta [3], Renesis Player v1.1, Savarese Ssrc [4] (adds XUL to MSIE too), SVGWeb [5], and Batik as applet.

[edit] See also

[edit] References

[edit] External links

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export