Web Info & Tutorials

November 13th, 2007

EYE-FI: DO YOU WANT WEB 2.0 WITH YOUR 2GB?

I can just picture Dylan and Alex in a meeting with someone pitching:

So, we want to have a flash memory card, and put an Ajax application on it.

Well, they did it. Eye-Fi has launched and it combines WiFi with a 2GB card.

With Eye-Fi, your photos can be automatically sent to any number of popular online photo services (Shutterfly, Flickr, Facebook, SmugMug, etc.) and to your computer all via wifi. No need to dock your camera, sync the photos to your computer and then upload your photos to the various photo services. Just configure the wifi and start taking pictures! It’s that easy!

SitePen helped develop the application, using their trusty Dojo. Worlds are colliding.

November 13th, 2007

HTML5 MEDIA SUPPORT: VIDEO AND AUDIO TAGS AND SCRIPTABILITY

WebKit keeps on trucking and has added support for the HTML 5 media tags such as <video> and <audio>.

You can add video to a page as easily as:

HTML:
  1.  
  2. <video src="sample.mov" autoplay></video>
  3.  

That is a lot cleaner than the mess of embed/object/JavaScript wrappers that we have today. Also, there is nice scripting support so you can play/pause a video:

HTML:
  1.  
  2. function playPause() {
  3.   var myVideo = document.getElementsByTagName('video')[0];
  4.   if (myVideo.paused)
  5.     myVideo.play();
  6.   else
  7.     myVideo.pause();
  8. }
  9. </script>
  10. <input type=button onclick="playPause()" value="Play/Pause"/>
  11.  

You can also tie into events:

JAVASCRIPT:
  1.  
  2. myVideo.addEventListener('ended', function () {
  3.   alert('video playback finished')
  4. } );
  5.  

and programatically do your thing:

JAVASCRIPT:
  1.  
  2. new Audio("song.mp3").play();
  3.  

One key issue has always been the codec game and royalties to mpeg.

November 13th, 2007

MOZILLA HUNTING FOR MEMORY

Firefox used to be the lean mean fast browser. Well, definitely fast. People flocked to it, in part, due to its speed. These days it seems like it is falling back and people are jumping on WebKit nightly, Opera, and even IE 7 as faster alternatives.

Mozilla is a little flummoxed by the birds memory appetite, and is going on a crusade to hunt down the issues, which are even more of an issue in mobile.

Stuart Parmenter, a Moz developer, has been doing some painful hard work for us. He started out discussing the memory fragmentation issue:

I've been doing a lot of work trying to figure out why after loading a lot of pages much of your memory seems to disappear. I've tested all sorts of things -- disabling extensions, plugins, images, etc. I've run leak tools over and over looking for things we might be leaking. Occasionally I'll find something small we're actually leaking but more often than not I don't see any real leaks. This lead me to wonder where our memory went. Firefox has a lot of caches internally for performance reasons. These include things like the back/forward cache (which helps speed up loading pages when you hit back), the image cache (keeps images in memory to help load them faster), font cache, textrun cache (short lived, but used to cache computed glyph indicies and metrics and such), etc. We also introduced in Gecko 1.9 the cycle collector which hopes to avoid cycles in XPCOM objects that we might hit. We've also got the JS garbage collector. All of these things mean we could be holding on to a bunch of objects that could be taking up space so we want to eliminate those from the picture. I released the RAMBack extension earlier this week which clears most of these things.

So, if it is none of these things, what is going on? Why after a while do we end up using more memory than we should be if we aren't leaking and our caches are clear? At least part of it seems to be due to memory fragmentation.

At this point he tests the browser by opening up the browser on certain sites and taking them off. He then takes a peak at the heap:

He just followed up this post with another on Windows Low Fragmentation Heap which has some surprising results.

Knowing that someone is actively working on the issue is psychologically huge, so kudos to Stuart for sharing some of his initial findings, and good luck hunting!

November 13th, 2007

DEBUGBAR 5: NEW CSS DEBUGGING FOR IE

Jean-Fabrice Rabaute, communicator of Companion.JS, has place discover a newborn DebugBar as he aims to intend IE developer tools on par to Firebug.

In this newborn version, on a designated surroundings in the DOM Tree, the DebugBar crapper today pass maker code, practical call (with css details), computed style, layout, and attributes.