Mitch Pronschinske is a Senior Content Analyst at DZone. That means he writes and searches for the finest developer content in the land so that you don't have to. He often eats peanut butter and bananas, likes to make his own ringtones, enjoys card and board games, and is married to an underwear model. Mitch is a DZone Zone Leader and has posted 2569 posts at DZone. You can read more from them at their website. View Full User Profile

ItsNat 0.7 Focuses on SVG and HTML5

02.12.2010
| 8915 views |
  • submit to reddit
Its been over two years since the first release of the ItsNat server centric Java Ajax web framework.  Since then, the framework has experienced significant evolution, but the focus has remained the same: Define templates using pure X/HTML/SVG/XUL files with no logic.  ItsNat's view logic is coded in pure Java using Java W3C DOM APIs.  It is also known for its "Browser is the Server" approach, in which a Universal W3C Java Browser is simulated in the server.  Client events are sent (Push model) to the server via AJAX where they are converted into W3C Java DOM Events.  Finally, changes in the DOM server are sent automatically to the client as JavaScript, updating the client DOM.  ItsNat has recently arrived at version 0.7 with a greater focus on supporting the Flash-like capabilities in SVG and HTML5.

Thanks to a high level of browser support and projects like Google's SVGWeb, HTML5 and SVG are well on their way to standardizing many rich web capabilities that were at one time only possible through plugins.  SVG is now more of a first-class citizen in ItsNat 0.7.  The framework adds more support for SVG in native browsers and even Internet Explorer, with new plugins including Adobe SVG Viewer (v3 and v6), Renesis 1.1, Savarese Ssrc, SVGWeb, and Batik as applet. 




SVG along with any other non-XHTML namespace can now be embedded inline with XHTML that is served with MIME "text/html" using a browser with native SVG support.  The new SVGWeb and Adobe SVG Viewer plugins can both embed MSIE and MIME SVG code inline in XHTML with dynamic DOM behavior.  This feature with Adobe SVG Viewer is only available in ItsNat and it is useful on a single page interface application where there is no page navigation.  The support for SVGWeb in ItsNat is special because the SVGWeb API is hidden and many problems with it are avoided because SVG DOM is managed on the server-side.

A few more things that have been added to ItsNat 0.7 include better (X)HTML support, MSIE with the Savarese Ssrc plugin, XUL including Ajax in Gecko browsers, and some support for Google App Engine including Ajax.  ItsNat, Vaadin, and ZK are the only server centric frameworks with built-in Ajax support running GAE.

Below are some excepts from Geertjan Wielenga's interview with Jose Maria Arranz, the author of ItsNat.  They give some insight into the motivations behind ItsNat's creation.

When I read about these web frameworks, I usually thought: “Oh my God, what a ton of artifacts! Java web development is becoming a nightmare, I think another web framework should be possible”. When I say “artifacts”, what I mean is the custom tags and tag libs that are mixed with tons of XML-based programming, language expressions, XML based navigation, XML descriptors for bindings, and so on.

Arranz was influenced by Wicket, but wanted a truly pure HTML component:

ItsNat was motivated partially by Wicket. But the pure HTML promise is broken in Wicket too, with custom tags like <wicket:extend> <wicket:link> <wicket:panel> and < wicket:head>. And, when you see some components, for instance the tree component, the HTML content of the component is missing in the template and is generated as a typical black boxed component. This is not very different to custom tags generating markup. I am not railing against Wicket, this is the correct way to improve web frameworks (I would do the same) and is a direct consequence of the traditional techniques of templating, that is "dead markup", where the template is basically raw text and only custom "marks" like custom tags and custom attributes are the live elements.

He explains why it is important to keep control of the HTML layout:

Because that is the web culture: the web is an amazing place of visual innovation, including web applications.  When anyone develops a Swing application, there is not very much space for visual design, unless you are Romain Guy or Chet Haase... in the web space, anyone can change the visual appearance of a web application. Furthermore, on the web it is not difficult to create a list or a table containing complex forms, while in Swing the JList or JTable is not so easy to customize.

To summarize his message, Arranz says:

ItsNat doesn't want to be all things to all people, and technically it can't be that anyway. For instance, if you need highly interactive components, you may need some cool JavaScript framework on the client, such as Dojo, prototype, YUI, and so on. Many people talk about there being "too many Java web frameworks" and it is true that there are many web frameworks out there. However, when you analyze their "development styles", there aren't very many. This speaks to the greatness of Java: you can select the style you like the most, because every style has pros and cons. I think ItsNat introduces a new web development style, that of DHTML programming on the server.

ItsNat is a dual licensed under the Affero General Public License v3 for open source, and a commercial license for closed source projects.

Comments

Arek Stryjski replied on Fri, 2010/02/12 - 10:32am

Is Adobe SVG Viewer project still alive?
I was thinking they lost interest in SVG after they bought Macromedia Flash.

Jose Maria Arranz replied on Fri, 2010/02/12 - 11:10am in response to: Arek Stryjski

No, ASV is discontinued, you can find EOL notice here:

http://www.adobe.com/svg/eol.html

Aanyway is good enough and now it has unexpected new uses:

http://www.innowhere.com:8080/itsnat/feashow_servlet?itsnat_doc_name=feashow.main&feature=feashow.core.otherns.svgInHTMLMimeASV.ex

I'm sure Adobe will provide a security patch if some security hole is discovered, otherwise ASV would be removed from Adobe's web site.

In ItsNat is not a problem because there are many more SVG options for MSIE including "installation-free" options like SVGWeb (based on Flash 9) or Batik (if a modern JVM is already installed), and because view logic is coded in Java in server, SVG management is very plugin/browser agnostic.

In spite of SVG inline in XHTML in MSIE is just supported by SVGWeb and ASV, again is not a problem because ItsNat provides the child document auto-binding feature, child document and parent documents are automatically bound in server providing something similar to one DOM document. This auto-binding works with SVG plugins loaded with iframes, objects, embeds or applet (Batik) including in remote views.

Auto-binding info/examples:
http://www.innowhere.com:8080/itsnat/feashow_servlet?itsnat_doc_name=feashow.main&feature=feashow.core.ioeaauto.doc

Remote views example:
http://www.innowhere.com:8080/itsnat/feashow_servlet?itsnat_doc_name=feashow.main&feature=feashow.core.misc.remoteCtrl.ex

Note: sorry for the links DZone's spam filter is too strict

Ravindranath Akila replied on Fri, 2010/02/12 - 11:27am

ItsNat is an exceptional framework in the sense that it can completely delink the role of a software developer and a web designer and still promote RAD. Going further, we were able to utilize Blueprintcss to improve ItsNat templating. ItsNat, along with Blueprintcss, works ideally with JQuery. So, to summarize, ItsNat, is a completely non-intrusive, role-friendly framework. ItsNat documentation does give us some insight on Pretty URLs. Well, we had to go a bit further with SEO. It is a common thing that when JS frameworks and WEB 2.0 come into place, Web Crawlers, basically still WEB 1.0, see websites Greek (if ever they see anything). Well, going ahead a bit with ItsNat, we discovered that we could easily render SEO needy components on the server before a page is sent to the client, and leave the non-SEO dynamics to be triggered by the user. As you see, this introduction to ItsNat now is getting very hazy, simply owing to the fact that it is all that you need from a framework. We should note that it can be easily made to work with Spring (we use EJB) or other frameworks and architectures without much hassle.

One undocumented feature, and a good one, which you will eventually realize, is that ItsNat HTML pages can be edited while a system is running live, provided you use a local(non server) path to the pages. If you are careful with element ids, you can do any site modification without troubling the deployment team with another deployment cycle. That is it for now. You can either go for ItsNat right away(download and run the demo 1st), or do the research like us with... JSF(PPR)... My Faces Triniad(PPR)... Wicket... Wicket XT(JQuery Support)... GWT... Spry... ExtJS Client Mode... ExtJS Server Mode.... etc... etc... and then decide ItsNat is the best option:-)

Jose Maria Arranz replied on Fri, 2010/02/12 - 1:24pm in response to: Ravindranath Akila

Well, going ahead a bit with ItsNat, we discovered that we could easily render SEO needy components on the server before a page is sent to the client

Ravindranath is talking about templates configured in "fast load" mode (the default mode), this mode is SEO friendly because initial rendering (on page loading) is done in server and the DOM tree is serialized as the initial HTML page *after* user code is sent to the browser.

Configuration methods:

ItsNatServletConfig.setFastLoadMode(boolean)

ItsNatDocumentTemplate.setFastLoadMode(boolean)

Fast load mode is also interesting for AJAX bookmarking.

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.