ItsNat

Last updated
ItsNat
ItsNat.png
Initial releaseNovember 1, 2007
Stable release
1.4 / September 18, 2015 (2015-09-18)
Written in Java
Operating system Cross-platform: JVM
Type Ajax framework
License Dual license: LGPL, Proprietary [1]
Website www.itsnat.org

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

Overview

ItsNat simulates a virtual browser within a Java application running on the server. This virtual browser represents documents using the W3C's DOM Level 2 node tree, and documents can be changed at any time by external Java code running on the server. By means of AJAX, the real user's browser is kept in sync with the server's virtual browser, and can pass W3C DOM events to it. [2] This can for example be used for automatic testing of the real browser under the control of the server. [3]

As of version 1.3 [4] ItsNat provides a new stateless mode.

ItsNat focuses on server centric SEO compatible Single-page applications and web sites.

How it works

Stateful mode

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.

Stateless mode

In stateless mode, introduced in version 1.3, the client page sends the necessary custom data of the current state to the server usually through AJAX requests, the server with this data is able to reconstruct partially or fully the client DOM state going to be modified and generate the necessary JavaScript DOM code, returned to the client to bring it to a new state, usually modifying the client page DOM tree according to the action which motivated the request. This mode may be not so fine grane and performant than the stateful mode, however this approach is more easily scalable because there is no per client page data kept in server and therefore AJAX requests can be dispatched to different server nodes with no need of session data sharing or server affinity need in stateful mode.

Core features

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.

Requisites, platforms

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

Google App Engine is supported, including AJAX with some limitations.

Supported desktop browsers

Google Chrome, Firefox, Internet Explorer 6+ (including v9), Opera 12.12+, and Safari 5.1.7+.

Mobile browsers (all including AJAX)

SVG plugins (including AJAX): Adobe SVG Viewer v3 , Savarese Ssrc (adds XUL to MSIE too), SVGWeb , and Batik as applet.

See also

Related Research Articles

Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts that enabled creation of interactive and animated documents. The application of DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.

Java applet Discontinued way to run small Java programs in browsers

Java applets were small applications written in the Java programming language, or another programming language that compiles to Java bytecode, and delivered to users in the form of Java bytecode. The user launched the Java applet from a web page, and the applet was then executed within a Java virtual machine (JVM) in a process separate from the web browser itself. A Java applet could appear in a frame of the web page, a new application window, Sun's AppletViewer, or a stand-alone tool for testing applets.

An HTML element is a type of HTML document component, one of several types of HTML nodes. HTML document is composed of a tree of simple HTML nodes, such as text nodes, and HTML elements, which add semantics and formatting to parts of document. Each element can have HTML attributes specified. Elements can also have content, including other elements and text.

Web application Application that uses a web browser as a client

A web application is application software that runs on a web server, unlike computer-based software programs that are run locally on the operating system (OS) of the device. Web applications are accessed by the user through a web browser with an active network connection. These applications are programmed using a client–server modeled structure—the user ("client") is provided services through an off-site server that is hosted by a third-party. Examples of commonly-used web applications include: web-mail, online retail sales, online banking, and online auctions.

Jakarta Server Faces

Jakarta Server Faces is a Java specification for building component-based user interfaces for web applications and was formalized as a standard through the Java Community Process being part of the Java Platform, Enterprise Edition. It is also an MVC web framework that simplifies construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.

A user interface markup language is a markup language that renders and describes graphical user interfaces and controls. Many of these markup languages are dialects of XML and are dependent upon a pre-existing scripting language engine, usually a JavaScript engine, for rendering of controls and extra scriptability.

Dynamic web page Type of web page

A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts. In server-side scripting, parameters determine how the assembly of every new web page proceeds, including the setting up of more client-side processing.

Dojo Toolkit Open-source modular JavaScript library

Dojo Toolkit is an open-source modular JavaScript library designed to ease the rapid development of cross-platform, JavaScript/Ajax-based applications and web sites. It was started by Alex Russell, Dylan Schiemann, David Schontzler, and others in 2004 and is dual-licensed under the modified BSD license or the Academic Free License.

ASP.NET AJAX, formerly called Atlas, is a set of extensions to ASP.NET developed by Microsoft for implementing Ajax functionality. It is released under the Microsoft Public License (Ms-PL).

Comet is a web application model in which a long-held HTTPS request allows a web server to push data to a browser, without the browser explicitly requesting it. Comet is an umbrella term, encompassing multiple techniques for achieving this interaction. All these methods rely on features included by default in browsers, such as JavaScript, rather than on non-default plugins. The Comet approach differs from the original model of the web, in which a browser requests a complete web page at a time.

qooxdoo Open-source Ajax web application framework

qooxdoo is an open-source Ajax web application framework. It is an LGPL- and/or EPL-licensed client-side and server-agnostic solution, and includes support for professional JavaScript development, a graphical user interface (GUI) toolkit and high-level client-server communication.

jQuery is a JavaScript library designed to simplify HTML DOM tree traversal and manipulation, as well as event handling, CSS animation, and Ajax. It is free, open-source software using the permissive MIT License. As of May 2019, jQuery is used by 73% of the 10 million most popular websites. Web analysis indicates that it is the most widely deployed JavaScript library by a large margin, having at least 3 to 4 times more usage than any other JavaScript library.

Document Update Markup Language

Document Update Markup Language (DUML) is an XML specification created by Brian Kardell to enable server-side logic DOM manipulation outside the context of conventional JavaScript functions.

JsonML, the JSON Markup Language is a lightweight markup language used to map between XML and JSON. It converts an XML document or fragment into a JSON data structure for ease of use within JavaScript environments such as a web browser, allowing manipulation of XML data without the overhead of an XML parser.

A single-page application (SPA) is a web application or website that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of a web browser loading entire new pages. The goal is faster transitions that make the website feel more like a native app.

ZK is an open-source Ajax Web application framework, written in Java, that enables creation of graphical user interfaces for Web applications with little required programming knowledge.

Wt is an open-source widget-centric web framework for the C++ programming language. It has an API resembling that of Qt framework, also using a widget-tree and an event-driven signal/slot system.

JWt is an open-source widget-centric web application framework for the Java programming language developed by Emweb. It has an API that uses established GUI application development patterns. The programming model is component-based and event-driven, similar to Swing.

References

  1. ItsNat Commercial Licensing & Support
  2. ItsNat Overview
  3. http://www.automatedtestinginstitute.com/home/index.php?option=com_content&view=article&catid=49:functional-test-tools&id=411:itsnat-natural-ajax
  4. "ItsNat v1.3 release Notes" . Retrieved 2013-06-09.