Activate your free membership today | Log-in

Thursday, July 2nd, 2009

More than you ever want to see about encoding

Category: Tip, Utility

Paul Baukaus linked to jsescape, a little form that shows escaping and unescaping across a number of encodings.

Andrea Giammarchi had his own post on encodings in a different way…. as he talked about
en-code which you can check out in action here on the page that lets you do simple encodings, especially for source code, in short order.

Posted by Dion Almaer at 5:03 am
7 Comments

+++--
3.8 rating from 10 votes

Wednesday, June 10th, 2009

Web Developer Collection: Packaged up Firefox extensions

Category: Debugging, Firefox, Utility

Over the years we are have mentioned many Firefox, and Firebug plugins to aid us Web developers. Wouldn’t it be nice to subscribe to a bundle of these tools? The Firefox Add On team has now given us that ability with Add On Collections:

Today, we’re excited to introduce a new feature to our website that will expose the niche add-ons that can be hard to find, and gives users a more active role in helping outstanding add-ons bubble to the top. One thing we’ve learned as add-ons have grown in popularity over the years is that once a user finds an add-on they love, they become a fan for life. We see this all the time as people recommend add-ons to their friends and write great reviews.

You will notice the Web Developer collection that features:

What is missing? What should be on the list?

Posted by Dion Almaer at 5:22 am
28 Comments

++++-
4.1 rating from 18 votes

Monday, June 8th, 2009

Firefogg: Ogg Theora Encoding Plugin

Category: Utility, Video

Test Drive the latest Thusnelda theora encoder with in-browser Video Encoder Firefogg.

Firefogg is an open source extension written by xiph hacker Jan Gerber that lets web developers request ogg video from their users. Since Firefogg is a Firefox extension it allows users to stay up to date with the latest and greatest theora encoder improvements. Firefogg supports a rich api for enabling web applications to drive in-browser transcoding from any source footage to ogg theora video (and possibly other free formats in the future). Firefogg supports simultaneously uploading while its transcoding via resumable one meg post chunks. It also supports fall-back to HTTP POST all-at-once. Both methods include progress indicators.

Firefogg can also encode to a local file and an example local transcoding application is on the site. The sample application builds on jQuery UI so it supports custom themes. Integration for firefogg with wikimedia commons are in testing. With Firefoxs video tag support this should be a helpful extension for converting video to ogg theora or supporting ogg theora video contributions in your website.

Firefogg can minimize the need for costly server side transocding infrastructure. It also helps avoid the extra transcode problem that plagues net video where a user saves to a compressed format locally to save time uploading; then the server re-transcodes the video so others can view it with a flash plugin. With Fireofogg we can go strait from the high quality source to the format distributed on the web site.

Here is an example of using the API yourself to convert video:

JAVASCRIPT:
  1.  
  2. if(typeof(Firefogg) == 'undefined') {
  3.   alert('You dont have Firefogg, please go to http://firefogg.org to install it');
  4.   window.open('http://firefogg.org');
  5. }
  6.  
  7. var ogg = new Firefogg();
  8. if(ogg.selectVideo()) {
  9.   var options = JSON.stringify({'maxSize': 320, 'videoBitrate': 500});
  10.   var data = JSON.stringify({'title': 'example video'});
  11.   ogg.upload(options, 'http://example.com/addvideo', data);
  12.   var updateStatus = function() {
  13.     var status = ogg.status();
  14.     var progress = ogg.progress();
  15.  
  16.     //do something with status and progress, i.e. set progressbar width:
  17.     var progressbar = document.getElementById('progressbar');
  18.     progressbar.style.width= parseInt(progress*200) +'px';
  19.     progressbar.innerHTML = parseInt(progress*100) + '% - ' + status;
  20.  
  21.     //loop to get new status if still encoding or uploading
  22.     if(ogg.state == 'encoding' || ogg.state == 'uploading') {
  23.       setTimeout(updateStatus, 500);
  24.     }
  25.     //encoding sucessfull, state can also be 'encoding failed'
  26.     else if (ogg.state == 'done') {
  27.       progressbar.innerHTML = 'Upload done. You can close this window now';
  28.     }
  29.   }
  30.   updateStatus()
  31. }
  32.  

Posted by Dion Almaer at 7:04 am
8 Comments

++++-
4.7 rating from 15 votes

Friday, June 5th, 2009

Page Speed: New open source Firebug performance extension from Google

Category: Google, Performance, Utility

Richard Rabbat and Bryan McQuade have introduced a new tool called Page Speed that is a fully open source (e.g. it has a public bug database, process for accepting code contributions, roadmap, etc) performance Firebug plugin:

Page Speed is a tool we've been using internally to improve the performance of our web pages -- it's a Firefox Add-on integrated with Firebug. When you run Page Speed, you get immediate suggestions on how you can change your web pages to improve their speed. For example, Page Speed automatically optimizes images for you, giving you a compressed image that you can use immediately on your web site. It also identifies issues such as JavaScript and CSS loaded by your page that wasn't actually used to display the page, which can help reduce time your users spend waiting for the page to download and display.

People will obviously compare it to YSlow (I wish they called it GFast ;) but there are some differences beyond the fact that it is Open Source which will hopefully allow a community to grow:

  • Not only will the tool note that images can be optimized, but it will do the work for you!
  • It automatically minifies your JavaScript for you and outputs it so you can use that
  • Profile Deferrable Javascript option will automatically identify candidates for lazy loading
  • An enhanced net panel with a better into cache hits and misses. I believe this is written in C++, so it gets around the "in process" limitations of Firebug's Net Panel.
  • Many different rules and checks

A must see performance tool to add to your belt. You can check out all of the rules and enjoy the tool!

Posted by Dion Almaer at 12:53 am
11 Comments

++++-
4.4 rating from 44 votes

Wednesday, June 3rd, 2009

Importing and Exporting HTTP data with Firebug

Category: Debugging, Utility

Jan Odvarko of the Firebug team has created a new plugin and site that allows you to export data from Firebug in the HTTP Archive Format and then also view the JSON data via a HTTP Archive Viewer.

The format will look a little like this:

JAVASCRIPT:
  1.  
  2. ({
  3.   "log":{
  4.     "pages":[{
  5.         "startedDateTime":"Fri, 29 May 2009 23:19:08 GMT",
  6.         "id":"page_0",
  7.         "title":"Facebook | Home"
  8.       }
  9.     ],
  10.     "entries":[{
  11.         "pageref":"page_0",
  12.         "startedDateTime":1243639103761,
  13.         "time":3503,
  14.         "sent":0,
  15.         "received":65978,
  16.         "overview":[],
  17.         "request":{
  18.           "method":"GET",
  19.           "path":"/home.php?",
  20.           "prePath":"http://www.facebook.com",
  21.           "port":-1,
  22.           "httpVersion":"HTTP/1.1",
  23.           "cookies":[{
  24.               "name":"login_x",
  25.               "value":"idontthinkso"
  26.             },
  27. ...
  28.  

Firebug Export

Hopefully we will see other tools sharing the same format so we can go in between!

Posted by Dion Almaer at 7:14 am
2 Comments

++++-
4.4 rating from 18 votes

Tuesday, June 2nd, 2009

CSS Gradient Tool; Build the Apple Navigation Bar

Category: CSS, Utility

John Allsop has created a very cool CSS gradient exploration tool that lets you get the gradient you need, with the resulting sample and code right there.

You could use it to do what he did, and recreate the Apple navigation bar in pure CSS instead of using images.

John didn't stop there, and has already created tools for Box Shadows Shadows and Radial Gradients.

Posted by Dion Almaer at 8:25 am
5 Comments

+++--
3.5 rating from 19 votes

Friday, May 22nd, 2009

Firefinder: Quick access to what you are looking for

Category: Debugging, Firefox, Utility

Robert Nyman has a new Firebug extension called Firefinder.

The idea is to quickly text CSS selectors/XPath in a document to see what will match, or how many instances of a certain element there are (thinking certain type of heading, for instance).

It offers:

  • A quick way to filter HTML elements via CSS selector(s) or XPath
  • Highlight them in the document
  • List them in the Firebug panel in a collapsable list
  • A count of the total matching number of elements

Posted by Dion Almaer at 7:23 am
10 Comments

++++-
4.3 rating from 33 votes

Thursday, May 14th, 2009

Monadic Parser in JavaScript

Category: JavaScript, Utility

Jens Schmidt pointed us to an interesting project by "Mu Dynamics Research Labs" called p4js:

p4js is a monadic parser library that provides the basic monadic operators return and bind

The announcement blog post explains some of the motivations behind the project:

After exploring Haskell for some time, I find myself often adopting functional concepts in my daily work. The exposure to functional programming has even affected the set of tools and frameworks I use. For example, having to parse a custom data format I first tend to search for a Parsec clone implemented in the currently used language. This time it was for JavaScript, but a quick Google search did not reveal any relevant projects. Therefore following is the initial attempt to a probably first general purpose parser library for JavaScript, 'p4js'.

For the uninitiated to monadic styles and syntax, the introduction blog post has a short tutorial explaining the basics; the key bits to understand are that:

  • The function $P() creates a parser object that can be executed on an input using the parse(input) function
  • Each function on the parser (called combinators) returns an instance of the parser to make invocation chaining easy
  • Once you define an interesting chain, you can register it with the parser for easy reference, as in p.register(’nat’) and use it from now on as $P().nat()

The current library provides only a dozen combinators, but it is enough to have quite some fun already. Following are few examples:

* a CSV parser,
* a small calculator and
* the tiny math processor that uses the parser not only to parse the input into expression tree, but also to perform expression evaluation and function derivation on the tree, and to draw function graphs (on browsers that support the canvas tag).

In the comments of the announcement post, a couple of people also point at Chris Double's implementation of the same concept.

Posted by Ben Galbraith at 10:32 am
3 Comments

++++-
4.1 rating from 22 votes

Thursday, April 30th, 2009

960 Gridder: Easy to use layout design tool

Category: CSS, Design, Utility

Andrée Hansson has created 960 Gridder, a grid layout tool for web developers that you can either use as an integrated component to layout your websites or use it as a bookmarklet. The grid is fully customizable but it defaults to the "960px grid standard".

960 Gridder will automatically identify if jQuery is present at the website and if it is not, it will include it.

It injects your website of choice and you can then work with this tool to help you out with whichever layout/design task you find it useful for.

By default, it is set to work with 12 columns, 60 pixel wide columns with a 10 pixel spacer left and right of the column, making it a 20 pixel wide gutter (which actually is the ones this gridder renders).

You can see and read about the "960 standard" at http://960.gs.

Posted by Dion Almaer at 8:16 am
3 Comments

+++--
3.8 rating from 36 votes

Tuesday, April 21st, 2009

Common HTTP Tracing Export Format

Category: Performance, Utility

There are many tools that can track HTTP at various levels, but they each have their own format. What if we lived in a world where there was a common format which would enable the following:

Steve Souders: "Hey Dion, Facebook is doing something wacky on their category pages. Take a look at the waterfall that you see in this data that I exported from AOL PageTest"

Dion Almaer: "Interesting. I just imported it into Firebug, and I see what you mean."

Well, Jan Odvarko of the Firebug team is working on just that:

There is currently several existing tools that can be used for HTTP tracking. To name a few:

They have various advantages over each other. For example, in-browser tools can easily group requests by page and analyze browser-cache usage while network-level tools can easily gather low level detailed info (e.g. HTTP compression). But in general, they all can be used to track HTTP traffic.

It would be obviously very beneficial to have a common export/import format that is used across all HTTP tracing tools and perhaps other projects. This would allow effective processing and analyzing data coming from various sources.

I have put together a document (fist draft) that represents a proposal for HTTP Trace Data export/import format (based on HTTPWatch's structure, but designed for JSON). Any comments and suggestions are greatly appreciated!

I hope this happens.

Posted by Dion Almaer at 5:39 am
5 Comments

++++-
4.4 rating from 13 votes

Wednesday, April 8th, 2009

CSS Sprite Creator

Category: CSS, Utility

Chris Brainard wrote in to tell us about his new CSS Sprite Creator:

Cool!

Posted by Ben Galbraith at 8:29 am
6 Comments

+++--
3 rating from 35 votes

Tuesday, March 24th, 2009

A New Memory Tool for the Web

Category: Utility

Over at the Mozilla Developer Tools Lab, we're starting work on a new tool to help web developers understand what's going on with the memory management of their application:

So how does a developer troubleshoot memory problems? There’s only one way good way to do it: use the operating system’s tools. Unfortunately, this option doesn’t provide the right level of detail; you can either see how much memory the browser is consuming in aggregate (which is fine to let you know that your memory use is increasing, but doesn’t tell you why) or you can see which data structures in the browser itself are consuming the memory (which is fine if you understand the guts of the browser, but it’s pretty hard for anyone else to understand how this maps into the web application they’ve developed).

What’s missing is a tool targeted at web developers that makes it easy to understand what’s happening with their application’s memory usage. We propose to create such a tool.

Check out the full entry over at my blog for more on the motivations inspiring us to tackling this problem and for details on the first phase of this approach. Let us know what you think!

Posted by Ben Galbraith at 11:07 am
2 Comments

++++-
4.2 rating from 25 votes

Thursday, March 19th, 2009

Observe Dojo Events

Category: Bookmarklets, Dojo, Utility

Speaking of bookmarklets, in a recent blog post Nathan Kurtyka discusses a scenario familiar to many Ajax developers:

However, I can’t even begin to think about how much time I’ve wasted hunting through source code hoping there might be some event I can subscribe to (e.g. “What event is published when someone clicks on a Tree widget node?”).

So naturally, he created a little something to scratch that itch:

I created a Dojo bookmarklet that can be used to log all events to the console.

So to not only see how rich Dojo is with event publishing (you probably haven’t been leveraging either), but to also see the bookmarklet in action, head on over Dojo Campus. Just enable Firebug, give the bookmarklet a click, browse the demos.. and behold — events everywhere!!

Check out the blog for the bookmarklet.

Posted by Ben Galbraith at 8:00 am
3 Comments

++++-
4.5 rating from 28 votes

Wednesday, March 18th, 2009

SuperPreview: No need to fire up VMs for IE 6, 7, and 8 testing, oh and other browsers

Category: IE, Utility

MIX '09 has kicked in and "The Gu" just had someone show SuperPreview something that does what we saw with Meer Meer.

SuperPreview let's you do the same onion peel overlays to see differences across browsers, and you can have everything run in the server (same as Meer Meer). This means that you don't need to run VMs with various browsers to get your testing in. On Windows and want to see what your app looks like in Safari Mac? No problem.

The demo also showed the nice visualization of seeing where DOM nodes actually are, allowing you to see how the CSS is different. Promising!

Posted by Dion Almaer at 11:49 am
27 Comments

+++--
3.3 rating from 21 votes

KeyTable: Instant keyboard navigation in a table

Category: JavaScript, Library, Utility

Allan Jardine is up to his old tricks again (his tricks are: creating helpful small tools!). This time he has created KeyTable, a library that adds the ability to use the keyboard to navigate around an HTML table.

Events can be bound (and unbound) to cells as required by the developer, allowing increased accessibility to Javascript enhanced tables. This library is somewhat similar to QFocuser that was posted on Ajaxian back at the start of the month, but specialises in table navigation. KeyTable also integrates nicely with DataTables, such that paging and sorting is taken into account.

To get started you just need to var keys = new KeyTable(); and then you can add init params for fine grained work, and you can also add events:

JAVASCRIPT:
  1.  
  2. /* Example event listener */ 
  3. keys.event.focus( 1, 3, function() { 
  4.     /* processing on cell 1,3 ... */ 
  5. } )
  6.  
  7. /* this is exactly the same as */ 
  8. keys.event.focus( $('#example tbody tr:eq(3) td:eq(1)')[0], function() { 
  9.     /* processing on cell 1,3 ... */ 
  10. } );
  11.  

The front page has an example that uses jEditable allowing you to mouse around, hit enter, change a field, and go back:

Posted by Dion Almaer at 12:16 am
9 Comments

++++-
4.5 rating from 10 votes

Friday, March 13th, 2009

JavaScript API Viewer: Client-side parsing with Dojo

Category: Dojo, Utility

The uxebu folks have put together a really nice JavaScript API viewer that is entirely written in JavaScript a la Code Illuminated.

The docs are very impressive, and it is indeed cool to do this all on the client, so it works offline just as easily as online. The team talked about the various documentation formats and how they came to the conclusion on what they were going to use. Nice stuff!

Posted by Dion Almaer at 5:52 am
5 Comments

++++-
4.3 rating from 26 votes

Next Page »