SnipShot: Ajax editing fights back

Snipshot is an intuitive picture editor produced with Mochikit and Twisted.

snipshot.jpg

 

 

 

Probably one of the best features I like about this app is that you don’t have to upload or download anything. You can open an image from your computer or you can specify a URL of an image and you’re off and running. Once you’re done editing the image you can save it to your Flickr or WebShots account. Very cool!

Another great feature is that they provide an API so you can use the technology in your own website! The API uses simple form posts and callbacks with the request parameters in JSON format. Nothing language specific there which is great.

Snipshot is one of the best implementations of an Ajax application I’ve seen in quite a while. Great job guys! Continue reading

The Business of Ajax – Google’s Ajax Search API

Google actually relies on our users to help with our marketing. We have a very high percentage of our users who often tell others about our search engine. — Sergey Brin

So spake one of the co-founders of Google. But what happens when your users start to tell others about your search engines in ways that you don’t like? When they present your search results in ways that hurt or confuse your brand? You would probably try to control how those users used those results. That seems to be what Google has done with the release of their new Google Ajax Search API.

Somewhat lost in the hype around the release of the Ajax API was the discontinuation of the Google SOAP Search API. It’s still available to existing subscribers, but no new ones are being signed up. To see why this discontinuation is an exercise in brand discipline, you just have to look at the terms of use for the Ajax API:

You agree that you will not, and you will not permit your users or other third parties to: (a) modify or replace the text, images, or other content of the Google Search Results, including by (i) changing the order in which the Google Search Results appear, (ii) intermixing Search Results from sources other than Google, or (iii) intermixing other content such that it appears to be part of the Google Search Results; or (b) modify, replace or otherwise disable the functioning of links to Google or third party websites provided in the Google Search Results.

The key terms here are that the order and appearance cannot be modified. And that is the essence of the Google brand: the order of the search terms. Fortunes are made and lost based on Google search position. Business plans are build around it. Millions of people around the world use the top ten results to find information, guide purchasing decisions, and so on. Mess with that order in some consistent way — in some, god forbid, way that people find valuable — and you’ve lost control of your brand, who you are, and likely your ability to advertise. Continue reading

YUI Version 2.2.0 Released: Browser History Manager, DataTable, and Button Components, New Versioning, and More

YUI 2.2.0 has been released one year after YUI was released into open source.

The major changes are:

  • Versioning: 0.12.2 to 2.2.0: The new version syncs up the internal and external release numbers
  • Browser History Manager: The YUI Browser History Manager supports all A-grade browsers in managing the back/forward button navigation and bookmarking
  • DataTable Control: The DataTable control allows you to present tabular data and allow your user to engage that presentation by modifying/enhancing the data, sorting and searching through it, and adjusting the presentation itself.
  • Button Control: Buttons are essential parts of most graphical interfaces, but the visual constraints of buttons in their various form-control implementations (submit buttons, radio buttons, check boxes, etc.) diminish their effectiveness in some applications. The Button Control provides a platform for implementing visually impactful buttons that range from standard click-to-navigate buttons to radio buttons and checkboxes to advanced split-buttons that can operate as both a button and a menu.
  • New YAHOO.* properties: such as YAHOO.lang, YAHOO.env, and a YAHOO_config global

Congrats on the new release. Continue reading

AJForm and ReJax Reloaded

Brendon Crawford has updated both of his products, AJForm and ReJax.

AJForm:

AJFORM is a JavaScript toolkit which simply submits data from any
given form in an HTML page, then sends the data to any specified
JavaScript function. AJFORM degrades gracefully in every aspect. In
other words, if the browser doesn’t support it, the data will be sent
through the form as normal. Continue reading

JSONRequest Proposal

Douglas Crockford of Yahoo, a pioneer of JSON, presented “JSON: The X in Ajax” at The Ajax Experience Tuesday afternoon.

In the presentation, Douglas discussed his proposal for native support of a new JavaScript object named JSONRequest. The object would provide a simple API for issuing Ajax requests to exchange JSON data using the following methods:

var request = JSONRequest.post(url, data, callbackFn);
var request = JSONRequest.get(url, callbackFn);

Other key points about the proposed object included:

  • Requests are transmitted in order
  • Requests can have timeouts
  • Requests can be cancelled
  • Connections are in addition to the browser’s ordinary two connections per host

Douglas has published more information about his proposal. The object itself is also available for download.

source: ajaxian.com

SJAX: AJAX option for automated in-browser testing

Vitaliy Shevchuk has proposed SJAX: AJAX option for automated in-browser testing which makes testing of Ajax apps simpler with Selenium that having to waitForAjax and friends.

The Problem

However, things are getting more complicated with AJAX. No page is loaded, but the content has changed. And it hasn’t changed instantly; AJAX is asynchronous by its definition. Setting a bug interval is a bad solution: it makes build cycle very slow without really solving the problem.

Some guys suggest using a “waitForCondition” command. In other word, every time AJAX is in action you need to manually add a waiting condition. This is much better then nothing; at least it is a real working solution. However, test creating is much longer and less fun.

Another option would be to extend Selenium to make it aware the underlying AJAX framework, so that the test case would pause until XMLHttpRequest is satisfied. Well, it requires extending Selenium, which is not very simple task neither. And there is a multitude of AJAX frameworks available, it would be impossible to adapt Selenium to every of them. And there are other in-browser testing solutions, not only selenium: both open source and commercial ones.

Solutions?

And the ideal scenario would be the following:

  • Test, application itself or the in-browser testing framework raises a flag to mark the current session as the one of automated testing.
  • AJAX framework detects the flag and passes to synchronous mode.
  • In this case, a method of user action simulation (click/type) of Selenium will not return until the AJAX data is successful fetched and processed. So Selenium will not be able to continue before the page content is updated, and it’s exactly what the user expects from his macros.

source: ajaxian.com

JsHttpRequest: Low level Ajax library

Dmitriy Koterov has written JsHttpRequest a light wrapper on top of XHR and friends that features:

  • Cross-browser compatibility. Library works with IE5.0+, Mozilla 1.7+, FireFox 1.0+, Opera 7.3+, Safari (”+” means “in specified and newer versions”). By this token, code could work without ActiveX and XMLHttpRequest support (but if these capabilities are available, they are used automatically).
  • File uploads from user browser to the server without page reloading.
  • Full support of PHP debug features. If server-side script fails on an error (including fatal error, e.g., call of undefined function), client-side script can handle it correctly and show diagnostics. Besides response data, it is passed the output flow of server-side script which contains PHP error messages.
  • Multi-dimensional data structures exchange (JSON analog) in client request and server response. At that, are used the standard PHP instruments — multi-dimensional associative arrays (request data available at $_REQUEST, response data may be saved to $_RESULT), as well as JavaScript standard capabilities — nested objects and properties. No XML in the level of API: you work with “native” language variables.
  • PHP session support using usual way.
  • Optimal data loading method choosing (XMLHttpRequest, Microsoft.XMLHTTP,
  • Interface is compatible with XMLHttpRequest.

Downloads

Prototype 1.5, new Documentation

Prototype

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.

It is documentation Friday. The new site prototypejs.org has launched, and the call for documentation help rang through to some people.

This new documentation includes: