Activate your free membership today | Log-in

Wednesday, December 16th, 2009

Scripty2 in the wiiiild

Category: Scriptaculous

Thomas Fuchs has some new controls and functionality to show us inthis scripty2 preview:

Try the scripty2 UI demos! (alpha version, so there are some kinks!)

Those controls are written with the super-nice Prototype class system and custom events, so they’re super-tweakable and make it a snap to create extensions and customized versions. More controls are in the works, and there should be a beta release this year (or grab the code from github).

They support full keyboard navigation and provide accessibility hooks through WAI-ARIA.

The best thing is that they’re compatible with Themeroller (from jQuery UI) themes! So you can just reuse/tweak existing themes very easily, plus scripty2 comes with a special scriptaculous theme, thanks to Samo Korošec.

Bonus– here are two new sightings of scripty2 in the wild:

Posted by Dion Almaer at 6:37 am
24 Comments

+++--
3.2 rating from 18 votes

Tuesday, December 15th, 2009

PastryKit: An iPhone Webdev Library from … Apple

Category: Library, Mobile, iPhone

John Gruber has spotted a library for iPhone web apps, from none other than Apple. This mysterious library, called PastryKit, seems to have flown under the radar as a Google search reveals precious little on it. In similar vein to other efforts, Apple's library provides support for native-feel websites - websites that run in Mobile Safari, but feel like native apps. (That's the objective anyway; some look-and-feel emulators are "good enough", while others get stuck in the uncanny valley).

To get hands-on with PastryKit:

  • Visit http://help.apple.com/iphone/3/mobile/ from your iPhone or iPod Touch. This is an official Apple site using PastryKit. If you're feeling lazy/iPhone-challenged, watch Gruber's screencasts.
  • Now with the same site in regular Safari (on your Mac/PC), open up the Develop Menu (if it's not there, enable it in Preference|Advanced). Choose User Agent > Mobile Safari 3.0 (or probably any other version number). And now you can see it in your browser. From Develop Menu, Web Inspector will let you view the script.

The HTML includes PastryKit as follows:

HTML:
  1.  
  2.     <!-- PastryKit -->
  3.     <link rel="stylesheet" href="dist/PastryKit-ug-compact.css">
  4.     <script type="text/javascript" src="dist/PastryKit-ug-compact.js" charset="utf-8"></script>
  5.  

PastryKit Javascript and PastryKit CSS are available. Unfortunately, they're a bit unclear due to compression, but Gruber nonetheless pored into the source:

PastryKit accomplishes all three of the aforementioned things — hiding the MobileSafari address bar, providing fixed-position toolbars, and providing scrolling with momentum — by disabling regular scrolling and setting up its own view hierarchy and implementing its own scrolling.

The whole question of native iPhone apps was a hot topic last month after PPK whipped up a storm on the question of web apps replacing iPhone apps. The really interesting thing here is Apple's stance. They launched the iPhone with web intended to be the platform for 3rd party apps, then switched over to native apps and haven't done much to facilitate native-style web apps since then. Is a change coming? As Gruber puts it:

The $64,000 question, though, is whether PastryKit is something Apple intends (or that a team within Apple hopes) to ship publicly. It seems like a lot of effort to build a framework this rich just for this iPhone User Guide, so I’m hopeful the answer is yes. Perhaps something integrated with the next major release of Dashcode? And, perhaps with integrated UI layout tools, along the lines of Interface Builder?

As well as apperaring in the user guide website, Chris Messina noted PastryKit apparently appears in the iTunes LP files.

Posted by Michael Mahemoff at 8:31 pm
6 Comments

++++-
4.8 rating from 18 votes

Weelya Announces Ajax Push Engine (APE) v1.0

Category: Comet

The team at Weelya announced v1.0 of the Open source APE JavaScript Framework & APE Server, their comet-based push engine created to ease the client/server communication.

New features in APE 1.0:

  • New and improved communication protocol :
    • Entirely using JSON and fully extensible.
    • Several commands can be nested in one request.
  • New transport methods :
    • XHRStreaming : A single connection is used to send and receive data. Better performance
      and reduced transfer delays.
    • JSONP : Allows to place «cross-domain» requests.
  • Support for BSD & Mac OS X (running the APE server) implemented by using KQueue
  • ServerSide JavaScript (SSJS) Implemented by using TraceMonkey (Mozilla SpiderMonkey)
  • Mootools support on the server side.
  • Complete Server-Side JavaScript API:
    • Handling of users, RAWs, Commands, Channels, Sockets
    • Use of non-blocking sockets (Client & Server)
    • MySQL connector module
    • API for doing external HTTP requests
    • WebHooks
  • Log files for errors, access and general information

They've also created an online comic book to get you familiar with what APE is all about.

ape10

Posted by Rey Bango at 10:40 am
8 Comments

++++-
4.6 rating from 19 votes

Downloadify – create downloads on the fly without server interaction

Category: Flash, JavaScript

Downloadify is an interesting solution to offer files as downloads without having to create temporary files and loop through a script that sets a force-download header.

As shown in the demo page offering a file for download and setting its content is as easy as this:

JAVASCRIPT:
  1. Downloadify.create('downloadify',{
  2.   filename: function(){
  3.     return document.getElementById('filename').value;
  4.   },
  5.   data: function(){
  6.     return document.getElementById('data').value;
  7.   },
  8.   onComplete: function(){
  9.     alert('Your File Has Been Saved!');
  10.   },
  11.   onCancel: function(){
  12.     alert('You have cancelled the saving of this file.');
  13.   },
  14.   onError: function(){
  15.     alert('You must put something in the File Contents or there will be nothing to save!');
  16.   },
  17.   swf: 'media/downloadify.swf',
  18.   downloadImage: 'images/download.png',
  19.   width: 100,
  20.   height: 30,
  21.   transparent: true,
  22.   append: false
  23. });

As you can see you have callbacks for all the possibilities and several parameters to style the flash movie overlaying the real "download this" button. The only issue I can see is that it doesn't work by sending the form via keyboard. This needs fixing.

Posted by Chris Heilmann at 8:54 am
8 Comments

+++--
3.5 rating from 17 votes

3D CSS Parallax Effect

Category: CSS, Showcase

Roman Cortes has a fun parallax effect using just CSS and HTML. Scroll over the bad boy above and see it at work.

Then view the source and have your eyes bleed :)

HTML:
  1.  
  2. <style type="text/css">
  3.                 a#a96:hover img {left: 224px}a#a96:hover b.d1 {background-position: 224px 0; width: 224px}a#a96:hover b.d2 {background-position: -449.6px 18px;}a#a96:hover b.d3 {background-position: -32px -216px; width: 368px}a#a96:hover b.d4 {background-position: -64px -74px;}a#a97:hover img {left: 223px}a#a97:hover b.d1 {background-position: 223px 0; width: 223px}a#a97:hover b.d2 {background-position: -449.7px 18px;}a#a97:hover b.d3 {background-position: -32.3333333333px -216px; width: 367.666666667px}a#a97:hover b.d4 {background-position: -64.6666666667px -74px;}a#a98:hover img {left: 222px}a#a98:hover b.d1 {background-position: 222px 0; width: 222px}a#a98:hover b.d2 {background-position: -449.8px 18px;}a#a98:hover b.d3 {background-position: -32.6666666667px -216px; width: 367.333333333px}a#a98:hover b.d4 {background-position: -65.3333333333px -74px;}a#a99:hover img {left: 221px}a#a99:hover b.d1 {background-position: 221px 0; width: 221px}a#a99:hover b.d2 {background-position: -449.9px 18px;}a#a99:hover b.d3 {background-position: -33px -216px; width: 367px}a#a99:hover b.d4 {background-position: -66px -74px;}        </style>
  4.  
  5.         <a href="#" id="a0"><img src="meninas_bg2.jpg" width="80" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a1"><img src="meninas_bg2.jpg" width="81" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a>
  6.         <a href="#" id="a2"><img src="meninas_bg2.jpg" width="82" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a3"><img src="meninas_bg2.jpg" width="83" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a4"><img src="meninas_bg2.jpg" width="84" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a5"><img src="meninas_bg2.jpg" width="85" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a6"><img src="meninas_bg2.jpg" width="86" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a7"><img src="meninas_bg2.jpg" width="87" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a8"><img src="meninas_bg2.jpg" width="88" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a9"><img src="meninas_bg2.jpg" width="89" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a10"><img src="meninas_bg2.jpg" width="90" height="455" alt="" /><b class="d1"></b><b class="d4"></b><b class="d3"></b><b class="d2"></b><span>&nbsp;</span></a><a href="#" id="a11"><img src="meninas_bg2.jpg" width="91" height="455" alt="" /><b class="d1"></b>
  7.  

I hope he used a tool ;)

Posted by Dion Almaer at 6:40 am
16 Comments

++++-
4.6 rating from 52 votes

Monday, December 14th, 2009

Text to Speech via HTML5 Audio

Category: Accessibility

html5texttospeach

Weston Ruter has created a nice mashup that marries HTML5 Audio support in modern browsers with the new Google Translate API that does text to speech (for them):

Recently Google Translate announced the ability to hear translations into English spoken via text-to-speech (TTS). Looking at the Firebug Net panel for where this TTS data was coming from, I saw that the speech audio is in MP3 format and is queried via a simple HTTP GET (REST) request: http://translate.google.com/translate_tts?tl=en&q=text. Google Translate notes that the speech is only available for short translations to English, and it turns out that the TTS web service is restricting the text to 100 characters. Another restriction is that the service returns 404 Not Found if the request includes a Referer header (presumably one that is not for translate.google.com).

In spite of the limitations of the web service which certainly reflect the intention that the web service is only to be used by Google Translate, thanks to the new HTML5's Audio element and rel="noreferrer", the service may be utilized by client-side web applications

Others have been playing with text to speech too, such as this French Ubiquity command. I hope that Google makes it a public API of translate!

Posted by Dion Almaer at 6:24 am
5 Comments

+++--
3.6 rating from 17 votes

Saturday, December 12th, 2009

Performance of data URIs

Category: Performance

Rob Flaherty has done a little experimenting with data URIs and performance. The study only looked at Firefox 3.5 with empty cache, but the results were interesting for the questions they raise as much as the answers the provide.

He used a CSS file with 31 images and converted them all to data URIs using Nick Zakas's CSSEmbed. For an extra variant, he used DURIS to extract the data URIs to a separate CSS file so that the basic CSS in <head> becomes much smaller and therefore loads much faster.

All three scenarios yielded similar performance - with HTTPWatch, the times were 1.35s, 1.13s, and 1.13s. So the two data URI scenarios were only marginally better. But more interestingly, a commenter from South Africa chimed in with wildly different results (using Firebug): 4.04s, 1.44s, 1.92s. The implication is clear: latency can be a big factor in some cases, and round-tripping to fetch 31 images is going to bring that out.

Another interesting factor is perceived speed. This is, after all, arguably the most important thing when it comes to performance. Although the two data URI scenarios completed in the same speed, the second setup felt faster because it got the images out of the way and allowed the main stylesheet to load fast. The data URI images were then loaded in a stylesheet at the bottom of the page, after a script had been loaded.

The study also raises questions about data URI loading. A commenter posted a waterfall showing the data URI images take significantly longer to load than regular downloaded images. This is the kind of thing that needs more research and why the study is interesting because of the questions it raises.

Rob also posted a study recently on background-image performance in various browsers.

Posted by Michael Mahemoff at 7:46 pm
6 Comments

++++-
4.4 rating from 18 votes

Friday, December 11th, 2009

Official Firefox Add-On Store?

Category: Firefox, Mozilla

http://www.theregister.co.uk/2009/12/11/mozilla_add_on_marketplace/

According to The Register, Mozilla may soon build a marketplace for add-ons:

Mozilla has said it will "probably" open a marketplace for Firefox add-ons sometime next year.

Add-ons product manager Justin Scott (reluctantly) announced the news this morning at an add-on-happy conference in Mozilla's home town of Mountain View, California. "We'll probably be doing a marketplace pilot in 2010," he said.

Scott did not provide details. But earlier in the morning, he did say that Mozilla has no intention of using DRM - not that you would have expected anything else. "I don't know what we'll do, but we won't do DRM," he said.

It wouldn't be too surprising to see Moz bolt in a payment model to the existing add-on repo, which already has a review process. Of course, once you start paying developers to build add-ons, many more add-ons will need to be reviewed and Mozilla will have to make tough decisions about to what extent add-ons will be reviewed, if at all, and what kind of charge, if any, will be imposed on add-on providers.

There are already some browser extensions that come with a price tag. This happens in both IE and Safari, both browsers lacking a vibrant extension community; and it also happens with Firefox, where there is a vibrant community of typically free, open-source, extensions.

An add-on marketplace would formalize the payment model and add a big incentive for developers to build seriously useful add-ons, given the possibility of reaching a market in the hundreds of millions. The flipside is that we might no longer see free versions of some of our favorite add-ons. Given its open-source DNA, it might be nice to see a "donate" button beside any of the free offerings in the store. (Update: Ryan Doherty points out in the comments there's already an add-ons contibution feature, pilot launched in July.)

It's also interesting to consider how an app store might open up a marketplace for new types of add-ons. For example, if you see the browser as a convenient sandbox to drop small desktop apps into, we could end up with simple games and utilities which might otherwise be released as shareware. Print-on-demand might be another application.

This is all hypothetical for now, but it's still fun to speculate on what could become of AMO!

Posted by Michael Mahemoff at 10:59 pm
1 Comment

++---
2.4 rating from 19 votes

MooTools Gets a Plugin Repo, Makes Finding the Right Code Easier

Category: MooTools

Plugins are a fact of life when it comes to JavaScript libraries. These user-contributed code snippets provide tremendous features & functionality and save developers time by not having to re-invent the wheel. The hard part, though, is trying to filter out which ones are actually useful and compatible with your current library. Finding the right plugin can at times be a crap shoot. The MooTools team is trying to solve this issue for their community. Yesterday, the MooTools team launched the official MooTools plugin repository called MooTools Forge which aims to simplify finding the right MooTools plugin for your project.

For people trying to find plugins, we wanted a simple interface with visual focus on what’s available. Going through lists of plugins whose names are not always that intuitive or descriptive is both boring and inefficient. You might find yourself opening dozens of tabs just to see what the plugin can potentially offer. We want to try and put all the information you need to make a choice right in one place.

Focus has been given to making it easy see a demo, download plugins, and understanding how plugins actually work along with integration with GitHub to allow developers to easily manage their code.

mtforge_screenshot

Check out the video below for an overview of the MooTools Forge:

Posted by Rey Bango at 11:17 am
6 Comments

++++-
4.8 rating from 45 votes

Doug Crockford and the Online Booty Call Saga

Category: JavaScript

The golfing world had the Tiger Woods saga. Now our hero Doug Crockford, finder of the Good Parts, has gotten involved in some Online Booty Call drama.

If you went to the online booty call site (as Steve Souders obviously does) you would have seen this yesterday:

Doug added an alert() to line 1 of his json.js files (DON'T HOT LINK TO THAT :)

I was talking to Doug about his keynote at Add-on-Con tomorrow, and asked him what the motivation was for this alert message. It turns out his webhosting service had contacted him about the unusually high amount of traffic on json.org. Doug investigated and discovered that OnlineBootyCall was linking directly to http://json.org/json.js, in spite of this statement in the file:

USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO NOT CONTROL.

Linking directly to http://json.org/json.js is bad. Certainly, it puts a load on Doug’s webhosting company that shouldn’t be there. But more importantly, it exposes the content site to security and performance vulnerabilities. Loading third party scripts into the parent window gives that third party access to cookies and other potentially confidential information in the page. Accessing that script from a third party domain requires an additional DNS lookup (which can be costly). Also, if the script is at the top of the page (which it is in this case) and the third party site is slow or not responding, the entire page is left blank for thirty seconds or more.

It’s best to reduce the number of third party scripts on your site. That was the reason Doug added the alert message to the top of json.js.

Of course, we hot link all the time. To Google Analytics. To the Yahoo/AOL/Google CDNs. Etc. The Web needs better mechanisms for packaging and running code. Doug likes to fight for just that. On one hand you can kinda snigger at the Online Booty Call situation, but I do admit to feeling a bit bad about the innocent folk that were harmed. I keep thinking of Bob Harris. The little JS guy that hotlinked. He is on vacation right now. He has no idea that his small site is alert'ing all of its users and they are all pissed. I feel sorry for him when he gets home to figure that out.

Posted by Dion Almaer at 12:57 am
15 Comments

++++-
4 rating from 24 votes

Thursday, December 10th, 2009

Holiday reading? WebGL Draft Available

Category: Standards

The first WebGL specification is here for your holiday leisure reading. The awesome Arun of Mozilla just posted this to the W3C device API group:

Today, the WebGL WG at Khronos released a public draft of the WebGL specification, and we really welcome (and need) wide review. Along with Mozilla folks, the WebGL WG has representatives from Opera, Google, and Apple, and nightly builds of Firefox, Chromium, and Safari have support for the draft specification. You can read a bit more about it in a blog post I wrote here. Essentially, WebGL is an HTML Canvas context. So you'd invoke it for now using:

JAVASCRIPT:
  1.  
  2. // obtain canvas handle
  3. var canvas = document.getElementById("canvas");
  4. gl = canvas.getContext("experimental-webgl");
  5. // Now do cool stuff
  6.  

The specification is still in draft status, so stuff will change, and your feedback is welcome :) We've already seen some compelling use of JavaScript libraries that straddle WebGL come out, such as X3DOM [4]. I expect to see more of that going forward, since WebGL is a pretty low level API that wraps OpenGL ES 2.0, with some concessions made for how JavaScript works (since OpenGL ES 2.0 is essentially a C API). The WebGL Wiki [5] has details on how you can test it in the browsers that support it.

I expect we'll want to have technical discussions about the Canvas API in general following this release, but for now this is an informative heads-up.

More info

What do you think of WebGL? This is a good time to get involved as the Kronos group isn't as open as some would like.

Posted by Dion Almaer at 6:16 pm
Comment here

++++-
4.7 rating from 32 votes

Dojo 1.4 is out with Significant Improvements to Performance, Stability, and Features.

Category: Dojo

The Dojo team announced today the release of Dojo 1.4, the culmination of 9 months of hard work by the crew.

While this release is primarily a stability and performance release, we managed to sneak quite a bit of great new functionality into the various projects. All the significant changes have been outlined in the 1.4 release notes (including migration issues), and are far too numerous to list here: ranging from simple convenience changes, like dojo.Animation callbacks now being passed the node being animated, to completely new APIs like dojo.cache providing build interning outside of of dijit._Templated. Some changes are simply exposing long standing "private" API's: dojo._Animation is public as dojo.Animation now and dojo._contentHandlers has become dojo.contentHandlers exposing Ajax transport configuration for advanced users and giving an official commitment to the preservation of those APIs.

Dojo team member Dylan Schiemann said that:

Dojo 1.4 has substantial improvements yet again in performance, developer productivity, experience, and features. The community has come together to make this release well worth the upgrade

Key updates mentioned are:

  • IO Pipeline topics
  • dojo.cache
  • dojo.contentHandlers
  • dojo.hash with native HTML5 onhashchange event support where available
  • Traversal and manipulation for NodeLists (the return value for dojo.query)
  • dojo.ready (easier to type than dojo.addOnLoad)
  • Hundreds of refinements to the Dijit API and collection of Dijits, and a few new widgets in DojoX
  • DataChart widget and other improvements to charting
  • dojox.drawing lands!
  • Editor improvements and new plug-ins in both Dijit and DojoX
  • Grid is faster, and the EnhancedGrid lands!
  • ForestStoreModel for the TreeGrid
  • GFX improvements
  • dojox.jq, a very experimental module aimed at trying to match the jQuery API as close as possible, but using Dojo underneath
  • Dojo build system optionally supports the Google Closure Tools compiler
  • Significant speed improvements, especially in IE

The release notes go into great detail about the update so check it out for the full scoop.

With 1.4 out the door, the Dojo team is already looking at v1.5 which is slated for release on Q2 2010.

Posted by Rey Bango at 2:16 pm
4 Comments

++++-
4.4 rating from 44 votes

New jQuery Podcasts

Category: jQuery

A couple of feature-packed jQuery podcasts have appeared in the past month or so: YayQuery (iTunes), a laid-back video podcast from folks in the jQuery community; and the official jQuery podcast (iTunes), hosted on the official jQuery blog and aiming to be a mix of news and interviews, hosted by Elijah Manor and Ralph Whitbeck.

Paul Irish sent the following about YayQuery:

It's a video podcast hosted by myself and three others, featuring laid-back discussions about current news and library/plugin releases; recently we've covered Brian LeRoux's Lawnchair script, JSON serialization options, dependency management and front-end performance techniques. We've just released our fifth episode.

Besides news, we also do a few segments where we dive deeper into particular areas of jQuery; we try to have a range of topics that will appeal to newbs and veterans alike.

- "Hiddenhancements", handy tricks inside jQuery you might not know about
- "Anti-Pattern for Performance of the Week" - Common coding practices that can get you into trouble, and how to avoid them
- "Plugin of the Week" - a new and/or awesome jQuery plugin that needs some evangelisin'
- "Beginner's Corner" - Things we wish we'd known when we were getting started with JavaScript and jQuery
- "nayQuery" - When to *not* use jQuery, and what options exist outside the $

The yayQuery hosts (Paul Irish, Rebecca Murphey, Alex Sexton and Adam J. Sontag) have years of experience being neck-deep in their own jQuery development, as well as providing support and training to the community

The official jQuery podcast has thus far interviewed jQuery creator Jon Resig, jQuery UI release manager Richard D. Worth, and none other than YayQuery host Paul Irish.

There's also Remy Sharp's jQuery For Designers, which has been publishing a video podcast feed of screencast tutorials since the start of the year.

Posted by Michael Mahemoff at 9:25 am
2 Comments

+++--
3.5 rating from 16 votes

A busy Chrome week: Extensions, Web Sockets, and more

Category: Chrome, Google

It has been a busy work for Chrome, with some interesting features hitting the various "channels".

Web Sockets

First up, we have Web Socket support being turned on by default on the developer channel. If you want to be a really cool JS h4x0r you should write a server app using node.js. If you want it to work on older browsers, try out the old favourite shim tale of use Flash to degrade, and Mozilla support should be coming soon and surely IE9 will support it too ;)

Now you can code like this:

JAVASCRIPT:
  1.  
  2. if ("WebSocket" in window) {
  3.   var ws = new WebSocket("ws://example.com/service");
  4.   ws.onopen = function() {
  5.     // Web Socket is connected. You can send data by send() method.
  6.     ws.send("message to send"); ....
  7.   };
  8.   ws.onmessage = function (evt) { var received_msg = evt.data; ... };
  9.   ws.onclose = function() { // websocket is closed. };
  10. } else {
  11.   // the browser doesn't support WebSocket.
  12. }
  13.  

Chrome Extensions Beta

Although I curse at the weak support on Chrome Mac (coming by end of week though!), other Chromers can use the new beta extension system pioneered by the awesome Aaron Boodman and team:

Today, we're really happy to release a beta of extensions that begins to deliver on our initial vision. Extensions are as easy to create as webpages. Users can install and uninstall them quickly without restart, and extensions have a great polished look that fits in with Google Chrome's minimalist aesthetic. When developers upload an extension it is available to users immediately, with limited restrictions and manual reviews only in a few situations.

On the technical side, we've been able to use Google Chrome's multiprocess architecture to help keep extensions stable and safe. And Chromium's extensive performance monitoring infrastructure has helped us ensure extensions affect Google Chrome's speed as little as possible. You can learn more details about the internals of our system in the videos below.

I am excited about the new extension systems of Chrome and Jetpack, and wrote up thoughts on how we are jumping out of the page and into the runtime as Web developers.

rel="noreferrer" and target="_blank"

I missed the fact that in Chrome you can opt-in to a new process from a link. This is important as every tab is NOT necessarily in its own process. People assume that is the case (a one to one mapping) but it isn't (and has interesting security implications):

In many cases, though, Google Chrome needs to keep pages from related tabs in the same process, since they may access each other's contents using JavaScript code. For example, clicking links that open in a new window will generally cause the new and old pages to share a process.

In practice, web developers may find situations where they would like links to other pages to open in a separate process. As one example, links from messages in your webmail client would be nice to isolate from the webmail client itself. This is easy to achieve now, thanks to new support in WebKit for HTML5's "noreferrer" link relation.

To cause a link to open in a separate process from your web page, just add rel="noreferrer" and target="_blank" as attributes to the tag, and then point it at a URL on a different domain name. For example:

Posted by Dion Almaer at 6:07 am
2 Comments

++++-
4.1 rating from 10 votes

Wednesday, December 9th, 2009

Three search engines, one interface – 25 minutes live code

Category: Screencast, Tutorial, YUI, Yahoo!

It is amazing how much easier it is these days to build pretty sweet mashups by using hosted services. Here's a screencast of using Yahoo, Bing and Google to build a search interface in under 25 minutes without having to read any API docs or installing SDKs by using YQL:

Building a search mashup with YQL using Google, Yahoo and Bing - live :) from Christian Heilmann on Vimeo.

Give it a lick of paint and you have a pretty sweet little tool:

GooHooBi - search Google, Yahoo and Bing in one go!

All the source code is available on GitHub.

Posted by Chris Heilmann at 12:44 pm
9 Comments

+++--
3.3 rating from 19 votes

W3C Capture API our in draft

Category: Standards, W3C

A draft of the W3C Capture API has been put out there by the editors.

The Capture API defines a JavaScript API for accessing the microphone and camera of a hosting device.

When I look at the API for getting pictures from a camera I got a little scared at the amount of DOM fluff around the edges:

JAVASCRIPT:
  1.  
  2. // Create a container div element and append it to the document body.
  3. var container = document.createElement("div");
  4. document.body.appendChild(container);
  5.  
  6. // The browser viewport width in pixels.
  7. var screenWidth = window.innerWidth;
  8.  
  9. function successCallback(data) {
  10.   for (var i in data) {
  11.   var img = document.createElement("img");
  12.   img.src = data[i].uri;
  13.   // If the image width exceeds that of the browser viewport, the image
  14.   // is scaled to fit the screen keeping the aspect ratio intact.
  15.     if (data[i].format.width> screenWidth) {
  16.       img.style.width = screenWidth + "px";
  17.       img.style.height = (data[i].format.height/data[i].format.width)*screenWidth + "px";
  18.     }
  19.     container.appendChild(img);
  20.   }
  21. }
  22.  
  23. function errorCallback(err) {
  24.   alert(err.message + " (" + err.code + ")");
  25. }
  26.  
  27. // Launch the device camera application and invoke the callback once
  28. // the user exits the camera application.
  29. transactionId = navigator.device.captureImage(successCallback, 1, errorCallback);
  30.  

A lot of fluff for the transactionId = navigator.device.captureImage(successCallback, 1, errorCallback); meat.

What do you think of the API proposed?

Posted by Dion Almaer at 12:43 pm
11 Comments

++++-
4.6 rating from 11 votes

Next Page »