Archive for April, 2007

* JavaScript Flash Integration Kit

Posted on April 20th, 2007 by Dave Johnson. Filed under AJAX, Flash, Uncategorized.

For those of you out there that are thinking of using the JavaScript Flash Integration Kit for building an application watch out for this little bug.

In the FlashTag.addFlashVars(string) function it just sets the internal variable this.flashVarsStr. However, in the FlashTag.toString() method it checks if the this.flashVars variable is null or not to determine if it should write the flash variables into the Flash HTML tag. To fix it, I just changed it from this:

FlashTag.prototype.addFlashVars = function(fvs) {
  this.flashVarsStr = fvs;

to this:

FlashTag.prototype.addFlashVars = function(fvs) {
  this.flashVarsStr = fvs;
  if (this.flashVars == null)
    this.flashVars = new Object();

Other than that it seems to work pretty nicely.

Tags: .

* Complete UI Java Updates - Struts, Eclipse and Taglib

Posted on April 20th, 2007 by Dave Johnson. Filed under AJAX, Components, Eclipse, Nitobi, Uncategorized, java, jsp.

I posted some of our initial JSP taglib support for the Nitobi Complete UI and yesterday we posted some more good stuff!

Mike has been hard at work making a plugin for Eclipse WTP so that you can drag and drop your Nitobi components in the Eclipse IDE. He has also put together a plugin for Stuts 2. And for those that just want plain old JSP support he has also updated the JSP taglib. Go check out Mike’s post for the details of just download it below and give it a go!

Eclipse Plugin 0.8 (This is plugin uses the trial versions of the components)
Struts 2 Plugin 0.8
Nitobi Taglib 0.8 (some small kinks worked out)
Nitobi Server Library 1.0.1 (This updated library (used to be called nitobicomponents.jar) is needed for the Struts 2 plugin)

Tags: , .

* RobotReplay Beta is Live

Posted on April 15th, 2007 by Dave Johnson. Filed under AJAX, Web2.0, analytics, robotreplay.

We have finally released the public Beta of our RobotReplay service. What RobotReplay does is it records the mouse movements, clicks, and key presses and allows you to play them back. The service is completely Ajax based with no special plugins. Right now we don’t have much in the way of features but we are going to be constantly adding more and listening to our users about what they want to see.

First take a look at Andre’s screencast.

Otherwise, just sign up now and see what your users are doing.

Tags: , , .

* Declarative Google Maps

Posted on April 7th, 2007 by Dave Johnson. Filed under AJAX, Components, Declarative Programming, Google, Map, Web2.0, XML.

We are pretty big fans of the declarative approach to Ajax. Our up and coming Complete UI Ajax component product line is firmly based around declarative programming. The idea behind this is that the developer can use HTML like markup to define the majority of the component functionality while still being able to write a little bit of JavaScript to get the extra 20% of custom functionality that they need.

As an example of this I have put together a declarative Google Map. Currently it only supports a few declarative tags but it at least serves to give you an idea of how a regular JavaScript component could be wrapped declaratively. It could also be simplified quite a bit by building a JavaScript component from the ground up with declarative programming in mind - as the Nitobi framework enables of course :)
If you went about putting a Google Map into a web page imperatively, it would look something like this:

var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(49.290327, -123.11348), 12);
var polyline = new GPolyline([
    new GLatLng(49.265788, -123.069877),
    new GLatLng(49.276988, -123.069534),
    new GLatLng(49.276988, -123.099746),
    new GLatLng(49.278108, -123.112106),
    new GLatLng(49.2949043, -123.136825),
    new GLatLng(49.3029641, -123.145065)
    ], “#ff0000″, 10);

The result of this is a nice Google Map that shows part of my daily bike ride to work. If you view the source of the web page you will see just that same code.

On the other hand, we could make that same web page declaratively meaning that we don’t have any extra JavaScript code to write but instead define our Google Map through custom HTML markup. This has the advantage, on top of the many advantages (and disadvantages) of declarative programming in general, that most web developers are familiar with HTML markup though might not be as comfortable with writing JavaScript code. So the equivalent declarative Google Map might look like this:

<g:map id="map" width="370px" height="380px" smallmapcontrol="true" maptypecontrol="true">
  <g:center zoom="12">
    <g:point lat="49.2853" lng="-123.11348"></g:point>
  <g:polyline color="#FF0000" size="10">
    <g:point lat="49.265788" lng="-123.069877"></g:point>
    <g:point lat="49.276988" lng="-123.069534"></g:point>
    <g:point lat="49.276988" lng="-123.099746"></g:point>
    <g:point lat="49.278108" lng="-123.112106"></g:point>
    <g:point lat="49.294904" lng="-123.136825"></g:point>

All the same elements are there as the imperative JavaScript version but there is no code to worry about. And, of course, the result is also the same. Here is a direct link to the source code - the top 1/3 of the code is the only interesting stuff, the rest is just helper functions that poached from the Nitobi Ajax Toolkit.

Take a look at the source code if you are interested in the details. Btw it currently has only been tested in Firefox 1.5 and IE 6/7.

This will be some of what I talk about in my session at XTech.


* Complete UI JSP Taglib

Posted on April 5th, 2007 by Dave Johnson. Filed under AJAX, Components, Declarative Programming, Web, completeui, jsp.

We’ve had a number of customers request a JSP Taglib for our components and we can finally say here it is in all its fabulous glory - thanks to the great work of Mike. A nice thing with the taglib is you don’t have to worry about including the required javascript and stylesheet files, which I hope will be a boon for those using templates. The tag will automatically add the needed scripts and styles to your page (but you can use the toolkitjsurl, componentjsurl, and componentcssurl attributes to change where to find them). Plus, you don’t have to worry about forgetting the namespace declaration - shock horror! And of course, in Eclipse (and no doubt other IDEs) you get good ol’ code completion for free. Huzzah.

Like any other taglib, just put the jar file in your WEB-INF/lib and include it in your web.xml file, like so:


Suggestions are, of course, very welcome. So pipe up if you’ve got some in the comments below or on the forum! We’d love any sort of feedback about the taglib and more generally how you think we can improve our components for use in a Java EE environment.

Next in the pipeline is integration with Eclipse and Netbeans and we’ll also have some tutorials detailing how to use our components in Struts and Spring real soon.


* Sweet CompleteUI Screencast Goodness!

Posted on April 3rd, 2007 by Dave Johnson. Filed under AJAX, Components, JavaScript, Nitobi, completeui.

So I finally got around to putting together some screencasts of all the components in the CompleteUI Ajax suite we released in March. These are not highly technical, they are meant to highlight the UI features that will benefit the end users so they’re applicable to both a developer and non-geek audience alike. The first one is an overview of all the components (~15min) the rest compiled to show individual components. Andre was even nice enough to edit them all together for me. They’re all at native resolution to make everything as clear as possible so it’ll be nice on a monitor bigger than 1024×768.

  • Nitobi CompleteUI Overview
  • Grid
  • ComboBox
  • Tree
  • TabStrip
  • Fisheye Menu
  • CallOut
  • Ajax Shipment Tracking Application



* Securing Ajax Mashups

Posted on April 3rd, 2007 by Dave Johnson. Filed under AJAX, Flash, JSON, security.

I just had a chance to read a good article from Brent Ashley over on IBM developerWorks about how to build secure Ajax mashups. He does a quick refresher on the Ajax and Mashup basics and then discusses current and future techniques for ensuring that your Mashup is a secure one.

Today we have little choice aside from including a cross domain JavaScript file in our web page like when making a Google Maps mashup that requires the Google JavaScript to be included in the page. For a secure mashup Brent suggests using the URL fragment identifier with hidden IFrames - this can be a good solution yet both sides of the IFrame need to agree on a protocol and it is limited to less than 256 bytes of data.

Brent also discusses the future solutions that are proposed from the JSONRequest object to the <module> HTML tag.

It will be interesting to see which proposal actually comes to fruition to enable more secure Ajax Mashups. I like the JSONRequest idea though I am still weary of such a proposal even if it doesn’t send cookies and only accepts valid JSON content. Since the proposal comes from Douglas Crockford I understand why it would be called JSONRequest but it would be pretty silly not to have it also accept XML IMHO - XML doesn’t even have any problems with being “exectuted” in the unsuspecting browser like JSON does. Otherwise, I am a big fan of the Flash approach with their cross-domain XML file that lives on the server and specifies to a Flash movie what domains it can load content from.