Web Info & Tutorials

April 7th, 2008

SPKET IDE 1.6.11 RELEASED

The team at Spket Studio continues to enhance their Eclipse-based Spket IDE announcing today the release of Spket IDE 1.6.11. The updates include:

Spket IDE 1.6.11 is immediately available for download.

April 7th, 2008

FLINGING APIS IN THE HIGHLANDS

Gareth Rushgrove has been talking a lot about API design; a true art amid the science of CSci. He gave a presentation at the highland fling (our own Christian Heilmann was there too) and starts out by walking through thoughts on the various ways that we (or robots, or rabbits) interact with the Web.

Then he gets on to the API design where he takes a look at some of the popular ones (e.g. Flickr, Twitter) and tries to find some general truths:

Make Your API

  • Prodable
  • Hackable
  • Multilingual
  • Open
  • Transparent
  • Obvious


April 7th, 2008

ADOBE RELEASES AIR FOR LINUX, JOINS LSF

Adobe continues to expand its support for the Linux platofrm by announcing the release of the Adobe AIR runtime for Linux. This expands the ability to deploy AIR desktop applications to the three major operating systems (Windows, OS X & Linux) while still using the standard web technologies developers have become accustomed to.

This release of AIR for Linux will be supported on the following distributions:

  • RedHat Desktop Linux 4
  • RedHat Enterprise Linux v5
  • Novell Desktop Linux 9
  • SUSE Linux Enterprise Desktop 10
  • Ubuntu 6.06

and the following features are available with this release:

  • Runtime/Application Install/Update and Uninstall.
  • HTML Loader with JS support to render HTML within AIR applications.
  • Local Database APIs
  • File system support with support for user folders like Desktop/Documents etc.
  • Desktop Integration with Drag and drop, clipboard support
  • Windowing support with System chrome none/standard
  • Basic transparency
  • Menu support with context menu, menu bar, pop up menus and menu events.
  • Networking
  • Network change detection (Event.NETWORK_CHANGE )
  • System wide idle detection (userIdle Event)
  • NativeApplication APIs
  • Capabilities (OS) API
  • Mouse events
  • Detection of running application (InvokeEvent.INVOKE)

Adobe has posted a FAQ to provide detailed information about this new product release.

Adobe Joins Linux Foundation

In addition to releasing AIR for Linux, Adobe has also joined the Linux Foundation to “collaborate on the advancement of Linux as a leading platform for rich Internet applications (RIA) and Web 2.0 technologies.

“Adobe’s decision to join the LF is a natural extension of its commitment to open standards and open source, which demonstrates its leadership and foresight in the software industry,” said Jim Zemlin, executive director at The Linux Foundation. “Adobe’s membership will contribute to our goal of increasing even more application development on Linux with a specific emphasis on Web 2.0 applications.”

“Adobe delivers key RIA technologies for Linux users, such as Adobe® Flash® Player and now Adobe AIR™, to deploy RIAs in the browser and on the desktop,” said David McAllister, director of standards and open source at Adobe. “The Linux Foundation is a valuable resource, providing a forum where we can work with the community to ensure Adobe RIA technologies are compatible across the Linux software platform.”

This announcement further solidifies Adobe’s commitment to the linux community, having already released server-side products that work natively on the Linux platform.

April 7th, 2008

WINDOW.CRYPTO: WANT CRYPTO PRIMITIVES IN THE BROWSER? YOU MAY ALREADY HAVE IT

Enigma Machine

It seems to make sense to add crypto helpers to the browser, for use by us, the humble JavaScript developer. I have called out to this in the past and people bring it up often on various lists.

Brad Neuberg found that Gecko actually has built-in crypt primitives via window.crypto!

Mozilla defines a special JavaScript object to allow web pages access to certain cryptographic related services. These services are a balance between the functionality web pages need, and the requirement to protect users from malicious web sites. Most of these services are available via the JavaScript window object as window.crypto. For instance, to obtain a ten byte random number using the cryptographic engine, simply call:

JAVASCRIPT:
  1.  
  2. var myrandom = window.crypto.random(10);
  3.  

Services are provided to enable: smart card events, generating certificate requests, importing user certs, generating random numbers, logging out of your tokens, and signing text.

April 7th, 2008

JAVASCRIPT SAX BASED PARSER

Gregory Reimer fancies SAX, and wished that a SAX parser was given to us by the JavaScript host environment. You can't blame him for not living DOM, but how about E4X? Or, StAX? Anyway, Gregory decided to build a SAX based parser in JavaScript itself, using simple search and replace:

After reading Search and Don't Replace over at John Resig's blog, it got me wondering if you could use that technique as the basis for a SAX parser in JavaScript. Of course there's nothing stopping you from building a SAX parser from scratch in JavaScript, but (methinks) the string tokenizer part of it would be a bit of a beast. However, by taking advantage of the optimization built into JavaScript's RegExp replacement engine, you might just be able to work a nice little souped-up tokenizing engine out of the deal.

So I thought I'd give it a try. What I came up with is nowhere near anything resembling a real-world, valid XML parser. All it knows how to deal with are elements, text nodes and character entities. And not all of the error messages are as helpful as a real world implementation should be. And I'm sure there are plenty of bugs since I banged this out in less than an afternoon. But it ran like scalded cats on a 422kb file

You get to use the simple SAX modules a la:

JAVASCRIPT:
  1.  
  2. function doStartTag(name){alert("opening tag: "+name);}
  3. function doEndTag(name){alert("closing tag: "+name);}
  4. function doAttribute(name,val){alert("attribute: "+name+'="'+val+'"');}
  5. function doText(str){
  6.     str=str.normalize();
  7.     if(!str){str='[whitespace]';}
  8.     alert("encountered text node: "+str);
  9. }
  10.  

Downlaod the SAX parser.