I'm the father of ItsNat AJAX Java web framework, JNIEasy, LAMEOnJ, JEPLayer and JEPLDroid libraries (and very old stuff like XPDOM), supporter of the Single Page Interface (SPI) paradigm, writer of the SPI manifesto and currently Android native guy. Jose Maria has posted 28 posts at DZone. You can read more from them at their website. View Full User Profile

ItsNat v1.1 Removing nodes only in server, Improved Tolerance to external JS libraries

01.09.2011
| 1403 views |
  • submit to reddit

ItsNat v1.1 helps even more to build the next generation of Server-Centric Single Page Interface Web Sites, saving more server memory and improving tolerance to external JavaScript libraries and browser extensions.

* New feature "Disconnect Nodes from Client": this feature, complementary to node caching in templates to save server memory, allows removing nodes in server but not in client saving server memory, the client DOM subtree can be changed freely. Use this technique when you need to render in some way a DOM subtree (of course in server) not going to be changed anymore (or maybe fully replaced by other). Disconnection is reversible (client is again in sync with server) calling a method or adding a child node to the node which content was disconnected. This feature alongside user events allows development of Server-Centric and Single Page Interface web sites mainly stateless in server as shown in this example. On the other hand we get more options to hybrid programming server-centric y client-centric because of freely modification of client DOM below disconnected nodes in server. 

   - New related methods:

  ItsNatDocument.disconnectChildNodesFromClient(Node)
  ItsNatDocument.reconnectChildNodesToClient(Node)
  ItsNatDocument.isDisconnectedChildNodesFromClient(Node)

   - Online demo of this new feature at ItsNat Feature Showcase.


* Added tolerance to intrusive nodes inserted alongside HEAD and BODY elements by non-ItsNat JS libraries (usually browser extensions). In previous version of ItsNat, extraneous elements were automatically removed (now are ignored/tolerated).

* Added tolerance to intrusive nodes inserted in the end of HEAD and BODY elements by non-ItsNat JS libraries (usually browser extensions and other JS libraries).
In previous version of ItsNat, only elements introduced by FireBug were ignored.

* Improved speed in server when detecting whether innerHTML can be used generating JavaScript code (notably when inserting big subtrees).

* BlackBerry Browser of JDE 6.0 (Torch 9800) is officially supported in spite of it worked on v1.0. This new browser is now WebKit based very different to previous versions.

* Supported SVGWeb 2010-08-10 (Owlephant), previous version deprecated. ItsNat also adds a workaround for a SVGWeb bug (event listeners are not correctly removed in removeEventListener).

* Fixed bug (regression): events in Batik applet are not working.

* Workaround for a Chrome bug: Event.timeStamp is not an integer in Chrome.

* Changes in Reference Manual:

  - Added "6.23 SAVING SERVER MEMORY: DISCONNECTED NODES".
  - Because of improved tolerance to DOM modifications in client by non-ItsNat JavaScript code, the chapter "6.42 EXTERNAL JAVASCRIPT LIBRARIES AND BROWSER EXTENSIONS" has been rewritten.

Release Notes

Web: http://www.itsnat.org
Online demo: http://www.innowhere.com:8080/itsnat/
GAE demo: http://itsnatfeatshow.appspot.com

 

0
Published at DZone with permission of its author, Jose Maria Arranz.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)