News Roundup: iOS 4.2 Accelerometer and WebSockets support, Colour.js, W3C drops Web SQL

iOS 4.2 brings Accelerometer and WebSockets support

custom writing services

The recently released iOS 4.2 brings some major additions to mobile Safari, including accelerometer and gyroscope support (through the DeviceOrientation API, WebSockets support, and TrueType fonts support.

For acceleration, there’s now a new “ondevicemotion” event to tinker around with. For the gyroscope (for devices that support it), the data can be captured from the existing “ondeviceorientation” event.

It’s good to see some major progress in mobile Safari, which is now trying to keep pace with the rapid advances Android is making. Mobile Safari, as far as I can tell, is the first mobile browser to implement WebSockets. We’ll see if the impending (and overdue) release of Android 2.3 Gingerbread will do the same.

Colour.js

Colour.js is a small simple library for converting between CSS color formats. What this means is that it can handle anything from named colors (”black”, “white”, etc.) and hexadecimal colors to the newer RGB/RGBA and HSL/HSLA formats.

If you’re already familiar with HSL (hue, saturation, lightness), you’ll know it’s relatively simple to lighten an existing color. For instance, when looking at a prototype of the page you’re working on and deciding that the color hsl(0, 50%, 50%) should be lightened, all you do is increase the lightness value a bit: hsl(0, 50%, 60%)

I know what you’re thinking: “I thought I was reading JavaScript news, not CSS news?” Here’s where Colour.js comes in. Say you’re working with RGB (red, green, blue) color formats instead, and you want to lighten the color rgb(0, 100, 150) a little bit. Oh no, that’s almost humanly impossible! Colour.js can compute this value for you with a little bit of magic:

Colour("rgb(0, 100, 150)").lighten(10).toRGBString(); //"rgb(0,134,201)"

W3C drops the Web SQL Database specification

During the summer the W3C stopped work on the Web SQL spec and slapped this notice on the page: “This document was on the W3C Recommendation track but specification work has stopped. The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path.”

In other words, all the browsers implementing the spec chose to use Sqlite to implement the spec, but the W3C felt it was necessary for at least one browser to implement the spec with another database. The W3C didn’t want to tie the spec to a particular SQL implementation.

Now just last week the W3C put up a bigger and scarier-looking announcement on the page: “Beware. This specification is no longer in active maintenance and the Web Applications Working Group does not intend to maintain it further.” To me this looks indistinguishable from a big old “DEPRECATED” banner at the top of the page, and reactions on Twitter have been similar.

What’s now unclear is how the browsers currently supporting Web SQL databases will handle this. There’s undoubtedly many applications that have now been written that depend on the Web SQL database, and it wouldn’t exactly be pretty having the rug pulled out from under them by removing support. In any case, what is now clear is that the indexedDB spec, just recently implemented in Chrome, is now king.

Upcoming Events

Mobile Monday Silicon Valley (Dec 6, 2010 in San Francisco)
D: Dive Into Mobile (Dec 6-7, 2010 in San Francisco)
Node.js Camp SF (Dec 14, 2010 in San Francisco)

New Releases

Prototype 1.7 released
SproutCore 1.4.4 released
CoffeeScript 0.9.5 released (via Badass JavaScript)
Processing.js 1.0 released (via Badass JavaScript)

Tidbits

JS1k #2, Xmas edition
Preview: Enyo app framework for webOS, an upcoming cross-platform JavaScript UI framework developed by Palm/HP (check out the video as well)
förbind: a service for connecting users, running on node.js with socket.io (by Remy Sharp)
Book: Pragmatic Guide to JavaScript (Christophe Porteneuve)
The new BlobBuilder() interface enables Web Workers without external files (and saving HTTP requests!).
Video: Survey of 3rd-Party (Mobile) JavaScript Toolkits from the folks at Palm/HP
Playing with Audio Visualization
Arrhythmia.js, a new take on rhythm validation
xc.js, a framework for 2D canvas games
Dataview.js is a JavaScript library connecting data objects to selected view
Announcing cssess: The Bookmarketlet That Finds Unused CSS Selectors
How to Detect Nudity with Javascript
Paren-Free (Brendan Eich’s blog
Kinect + Javascript hack shows potential for web interfaces

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Reddit
  • TwitThis
  • Simpy
  • StumbleUpon



© webdevpublishing 2011