Activate your free membership today | Log-in

Tuesday, May 31st, 2005

Toolkit: Toxic for PHP

Category: Ajax, Toolkit, PHP

Danne Lundqvist has released the first version of hsi Ajax toolkit for rich clients. It is lightweight and features automatic form validation and fields can be bound to method calls. Currently there is only a PHP backend available.

Example

myUser.bindParams(’save’, ‘User_id’, ‘User_login’, ‘User_firstname’,
‘User_lastname’, ‘User_email’, ‘User_group’, ‘User_age’);

myUser.execute(’save’);

PHP piece

<?php
// The PHP code
class User {
  public function save($id, $login, $firstname, $lastname,
                       $email, $group, $age)
  {
    if ($id == null || $id == 0)
      {
          // Code to save user
          return $newUserId;
      }
	
    throw new Exception(\"Updating a user is not implemented\");
  }
}?>

Read about the release

More info

Download

Posted by Dion Almaer at 11:43 am
1 Comment

++++-
4.2 rating from 19 votes

Utility: JavaScript Obfuscator

Category: JavaScript, Java, Utility

Shane Ng has releaed an open source JavaScript Obfuscator. The obfuscator is a Java program itself, and follows a set of rules:

  1. This JavaScript obfuscator removes all comments.
  2. In case there is a closure that does not end with a semi-colon, “;”, a line break will be inserted when “}” is encountered.
  3. Redundant whitespace characters (tab, space, new line) will be removed.
  4. Variable names and function names are replaced only if they are not the member of the class.
    1. this.x, document.write() will not be replaced.
    2. Generally, the name after a dot, “.”, will not be replaced.
  5. Variable names and function names will not be replaced if the token
    1. is a member of a class as mentioned at #4
    2. starts with a capital letter (assuming they are classes)
    3. is
      in the exception list. The exception list can be specified in a file
      delimiting the tokens with whitespace characters (tab, space), dot
      (”.”), comma (”,”), double-quote (”"”), and single-quote (”‘”)
  6. If specified, tokens in string literals will be encoded into \uXXX or \XXX format
  7. If a line is end with a JavaScript delimiter or a double-slash comment, it will merged with the next line to a single line

It is still pretty new, so you have to watch out for issues. For example, it really wants you to use semi-colons after statements.

Download the obfuscator Jar file

Posted by Dion Almaer at 11:33 am
20 Comments

+++--
3.5 rating from 39 votes

Monday, May 30th, 2005

Example: Dynamic Ajaxian Tasklist

Category: Ajax, JavaScript, Java, Examples

Jens Schumacher has come up with a nice example of an Ajaxian Dynamic Tasklist. It is implemented in a macro for the popular Confluence Wiki from Atlassian.

I like the green check, red cross icons, and the bar showing the % of the tasks done. Very Tada.

Posted by Dion Almaer at 5:47 pm
7 Comments

+++--
3.8 rating from 18 votes

CFAjax: Cold Fusion Ajaxian Toolkit

Category: Toolkit

CFAjax is the Ajax implementation for coldfusion. It makes coldfusion method calls on server directly from HTML page using JavaScript and return backs the result to the calling HTML page. CFAjax comes with simple to use JavaScript API and simple coldfusion implementation that marshal’s the response between your CF methods and HTML page. Using CFAjax you can create highly interactive websites with greater performance and usability.

Read more at CFAjax

Posted by Dion Almaer at 5:43 pm
1 Comment

++++-
4.3 rating from 10 votes

Friday, May 27th, 2005

Showcase: TIBCO shows their library / toolkit / IDE to Jon Udell

Category: Ajax, JavaScript, Screencast, Library, Toolkit, Showcase

Jon Udell of Infoworld has been publishing some very interesting screencases. His latest consists of TIBCO showing off a rich Ajaxian library / toolkit / IDE.

The IDE (or Visual Authoring Toolkit) eats their dog food, as it is built on their library itself.

As you watch the screencast, I think you will be impressed at how rich it is, and how responsive the browser base tool is. I would bet that many people would assume that this wasn’t JavaScript ;)

There is a LOT of drag and drop support going on here. Very impressive indeed. As Jon puts it:

“You have really done some rocket science here”

Their entire SOAP stack was written in JavaScript :)

Posted by Dion Almaer at 12:17 am
6 Comments

++++-
4.4 rating from 5 votes

Example: Cojax, an ajax style code viewer

Category: Ajax, JavaScript, Showcase, Examples

Scott Watermasysk and co put together a nice example of Ajax called Cojax. Cojax is an ajaxian source code viewer which consists of:

  • Left hand tree structure which represents the source code files/directories
  • On demand retrieval of particular source code, which is color coded nicely
  • Firefox “Loading *” usability pattern

It would be nice to have the header and left hand site sticky, with the code itself scrolling.

Posted by Dion Almaer at 12:07 am
2 Comments

+++--
3.9 rating from 11 votes

Example: Ajax Advocates show rich widgets

Category: Ajax, JavaScript, Library, Component, Examples

A new site, Ajax Advocates, has a nice example of some rich Ajax. They put together “BlahBlah Finance!”, which consists of a rich UI component containing:

  • Pure HTML running on Apache
  • Object Oriented Javascript
  • AJAX techniques to refresh Stock price
  • Drag-drop column headers to move position of columns
  • Excel-style grid navigation, with Undo functionality
  • Ability to disable, enable, and validate cell entry. Tab navigation

An upcoming whitepaper will explain the code behind it.

Posted by Dion Almaer at 12:05 am
4 Comments

++---
2.8 rating from 23 votes

Article: Errors and Ajax

Category: Ajax, JavaScript, Articles

O’Reilly’s XML.com has a piece that discusses the magic of try {} catch(e) {} finally {}, and window.onerror = handleError.

The article shows examples in the realm of Ajax, and XMLHttpRequest, but it is more generic than that (and even has Perl code ;)

Posted by Dion Almaer at 12:01 am
1 Comment

+++--
3.8 rating from 4 votes

Thursday, May 26th, 2005

WICK: Web Input Completion Kit

Category: JavaScript, Library, Examples

This is WICK, the Web Input Completion Kit, an evolving framework that leverages web standards such as JavaScript, DOM and CSS to facilitate textual input in form UI elements assisted by local and remote data sources. This framework strives to remain unobtrusive and preserve a form’s semantics and accessibility.

The sample page shows text input boxes. If you start to type in there, you get a GMail/Yahoo Mail address lookup affect.

The author has a view:

I would describe this framework’s autocompletion implementation as “at least as good as GMail’s, not quite as pretty as Google Suggest’s but ought to be extended to get there, far better than Yahoo’s, pretty darn cross-browser compatible, mostly standards-compliant”. Most importantly, it has plenty of room for improvement and derivatives, which is part of my motivation for releasing it to the Open-Source Community under a BSD-style License. Which means you pretty-much can do whatever you want with it as long as you keep the copyright in place.

One key requirement I strive to meet is to allow an HTML document to load and be usable right-away while the library may take an extra few seconds to load without getting in the way of the user experience. Even if the script hasn’t loaded, an HTML form is to remain usable and accessible as it previously was. When the script is finally done loading, and the “collection” array populated, event handlers get registered, at which point an end-user starts seeing suggestions for what they’re in the middle of typing, if and only if the input field they’re typing in, has a class attribute with a special value.

Ajax support isn’t there yet.

Posted by Dion Almaer at 9:10 am
4 Comments

++---
2.7 rating from 3 votes

SACK: Simple Ajax Code Kit

Category: Ajax, JavaScript, Toolkit

Gregory Wild-Smith has written about Ajax, and other toolkits such as SAJAX and Dojo weren’t for him:

Anyhow, as I’m using AJAX a lot these days — both for side projects and at work — I thought I would develop a nice simple wrapper for it that does exactly what I want from it; namely to be easy to use, yet very flexible in implementation.

A small example of using SACK:

var mydata = ‘myvar=’ + myvalue;
ajax = new sack(’mypage.php’);
ajax.element = ‘myexamplediv’;
ajax.runAJAX(mydata);

Read more about SACK

Download SACK 1.0.1

Posted by Dion Almaer at 8:51 am
1 Comment

++++-
4 rating from 20 votes

Showcase: Netflix using more and more Ajax

Category: Showcase

Netflix has a nice clean web UI. Now, they are using some Ajax, with more and more usage coming all the time.

Posted by Dion Almaer at 8:47 am
Comment here

+++--
3.5 rating from 8 votes

Wednesday, May 25th, 2005

Messaging with Ajax and ActiveMQ

Category: Ajax, Java, Server

There is more afoot with messaging and Ajax. ActiveMQ is an open source MOM, and it now has support for Ajax.

Ajax support in ActiveMQ builds on top of the REST connector for ActiveMQ which allows any web capable device to send or receive messages over JMS.

Client side view

On the client the web browser uses a simple JavaScript library which uses XmlHttpRequest to make calls on the REST API to send or receive messages.

This means that the DHTML client can send or receive messages asynchronously from the users interaction and can easily databind XML messages received with the HTML DOM to produce some revolutionary applications all with standard DHTML technologies.

The web browser can then render active views of information which can update in real time.

Server side view

Here each HTTP GET or POST is just a regular use of the REST API and so doesn’t particularly care what the client is; whether its JavaScript or C or Ruby/Python whatever.

We use a MessageServlet on the server side to handle the HTTP traffic; together with an optional NIO based servlet engine (Jetty) for handling large numbers of concurrent clients.

On a site note: LogicBlaze is a new company that recently got funded by Simula Labs to offer support and services around Active* products.

Posted by Dion Almaer at 10:02 am
1 Comment

+++--
3.5 rating from 4 votes

Ajaxifying the Address Bar Interface

Category: Ajax

A lot of people are finding that the browser address bar is the new command line. Some people embed an address bar in their start menu, which means it is always there.

Michael Mahemoff talks about taking this to the next level, and
Ajaxifying the Address Bar Interface.

Personally, I would love a QuickSilver-esque system.

Posted by Dion Almaer at 9:37 am
5 Comments

+++--
3.5 rating from 14 votes

Example: Spell Check

Category: Ajax, Examples

Garrison Locke has put up an Ajax Spell Checker. This is another good use of client/server. You wouldn’t want to download an entire data dictionary down to the client, and now you don’t have too :)

Posted by Dion Almaer at 9:32 am
3 Comments

+++--
3.7 rating from 3 votes

Tuesday, May 24th, 2005

Ajax Slashdotted Again

Category: Ajax, JavaScript

Good ole /. has another posting claiming that the AJAX Buzzword Reinvigorates Javascript.

Typically, the usual suspects are on the thread jumping up and down :)

Posted by Dion Almaer at 3:35 pm
1 Comment

+++--
3 rating from 1 votes

JavaScript Threading and Continuations

Category: JavaScript

Coming from a world such as Java, developers sometimes wish they had rich threading constructs. The f(m) project has gone ahead and implemented a threading construct / library for you to use.

Threading is a double edged sword though. It is very easy to shoot yourself in the foot, and it brings in a lot of complexity. This is why many want to stay away from this road.

The HailiWiki folks (clone of TiddlyWiki) have been playing with client-side JavaScript continuations to make the Ajax async programming model better.

If you look at Microsoft’s COmega, you see creative concurrency models that we could learn from too.

Any thoughts on Threading in JavaScript? Have you ever wanted something richer?

Posted by Dion Almaer at 2:42 pm
23 Comments

+++--
3.4 rating from 32 votes

Next Page »