Activate your free membership today | Log-in

JavaScript


Tuesday, May 5th, 2009

A Better Javascript Memoizer

Category: JavaScript, Performance

We have covered memoizers in the past, but John Hann has posted on a nice implementation that takes advantage of closures, arity, and recursion -- 3 concepts/features that Javascript was meant to use. It leads to this generic version: PLAIN TEXT JAVASCRIPT:   // memoize: a general-purpose function to enable a function to use memoization Read the rest...

Posted by Dion Almaer at 5:16 am
4 Comments

++++-
4.1 rating from 30 votes

Monday, May 4th, 2009

Extension wars – NoScript vs. AdBlockPlus

Category: JavaScript, Security

One of the dirtiest secrets of the Internet is that it runs on ads for monetization. All of us who surf the web and use systems had lots and lots of free lunches because of advertisements being shown on web sites. The only difference to TV is that they are less obtrusive and you can Read the rest...

Posted by Chris Heilmann at 11:04 am
19 Comments

+++--
3.2 rating from 26 votes

Rico 3.0 now runs on multiple libraries; LiveGrid with a jQuery theme for example?

Category: JavaScript, Library

Ah Rico. It was a big shot when Ajax jumped on the scene and Bill Scott was lashing up the accordion landscape. Now time has moved on, and Bill keeps feeding us with usability goodness, but what about Rico? Well, Matt Brown is now on the case and has an early preview of Rico 3.0 Read the rest...

Posted by Dion Almaer at 7:04 am
2 Comments

++++-
4 rating from 24 votes

No love for the module pattern?

Category: JavaScript

There was a cheer when Doug showed people that the module pattern could nicely give you somewhat "private" access in JavaScript. At least, the Java folk definitely cheered. Jonathan Snook on the other hand has no love for the module pattern and, after using it for some time, now avoids it: Avoiding the Module Pattern Read the rest...

Posted by Dion Almaer at 6:22 am
17 Comments

++---
2.6 rating from 33 votes

Friday, May 1st, 2009

Deep Leap: Teasing John Resig

Category: Fun, Games, JavaScript

John has been working on a very fun scrabble typing game called Deep Leap and although he hasn't finished it yet, people found it (John, time to learn about .htaccess ? ;) Just to tease him a little more and get the word out before it is finished, check it out!

Posted by Dion Almaer at 4:33 pm
9 Comments

++---
2.7 rating from 49 votes

Francisco Tolmasky Starts Blogging and Jump-starts Profiling

Category: Cappuccino, Debugging, JavaScript, WebKit

It's no secret that we're mightily impressed with the fine work of the 280 North crew, what with 280 Slides, Cappuccino, Atlas, working with SOFA to make Aristo free for other projects to use, and that whole Objective-J thing which we'll never use but we love nonetheless. ;-) Francisco Tolmasky, one-third of the team, started Read the rest...

Posted by Ben Galbraith at 1:08 pm
6 Comments

+++--
3.8 rating from 14 votes

Thursday, April 30th, 2009

YQL execute now allows you to convert scraped data with server side JavaScript

Category: Examples, JavaScript, Yahoo!

I am a big fan of YQL, a terribly easy and fuss-free way to access APIs and mix data retrieved from them in a simple, SQL style language. Say for example you want photos of Paris,France from Flickr that are licensed with Creative Commons attribution, you can do this with a single command: PLAIN TEXT Read the rest...

Posted by Chris Heilmann at 9:28 am
11 Comments

+++--
3.9 rating from 28 votes

Tuesday, April 28th, 2009

vice-versa: the noble act of getting the best of all browsers

Category: JavaScript

Andrea Giammarchi has a vision to have the best of all browsers available to him in JavaScript land. He has created vice versa as a project to explore this ideal and incredibly hard vision to attain: Studying the DOM, which is notoriously a mess, I often "travel" between the MDC and the MSDN to solve Read the rest...

Posted by Dion Almaer at 6:18 am
10 Comments

++---
2.7 rating from 37 votes

Monday, April 27th, 2009

CiteDrag: Cool library that groks the new drag and drop model

Category: HTML, JavaScript, Library

Elijah Grey has a very cool new script CiteDrag that "adds automatically citation (ie. blockquotes, text quotes, ect.) to any dragged content off of the website which is using the script. CiteDrag requires no additional setup other than include the script somewhere on your website." I just dragged that above text from my blog post Read the rest...

Posted by Dion Almaer at 8:21 am
5 Comments

++---
2.4 rating from 5 votes

Friday, April 24th, 2009

Blackberry Storm using Raphael (SVG/VML) and SoundManager

Category: JavaScript, jQuery, Showcase, SVG

Brad Neuberg pointed me to a Blackberry Storm site that uses Raphael, jQuery, and SoundManager to offer an SVG / VML (for IE) experience. PLAIN TEXT HTML:   <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/jquery-ui.min.js"></script> <script src="/js/soundmanager2-nodebug-jsmin.js"></script> <script src="/js/raphael-min.js"></script> <script src="/js/trig-min.js"></script>  

Posted by Dion Almaer at 6:48 am
2 Comments

+++--
3.1 rating from 24 votes

Thursday, April 23rd, 2009

myPatterns: XPath / RegEx for JS Objects

Category: JavaScript, Library

Nic Volanschi pointed us to myPatterns: myPatterns is a new library adding custom notations for data structures in JS (and also C). It's really useful for writing elegant programs using general pattern matching. To explain myPatterns, let's introduce a standard JavaScript object: PLAIN TEXT JavaScript: {   name: { firstname: "John", lastname: "Smith" },   Read the rest...

Posted by Ben Galbraith at 8:00 am
5 Comments

++---
2.5 rating from 32 votes

How many ways can you iterate over an array in JavaScript?

Category: JavaScript, Tip

Myk is one of the nicest chaps that I have had the pleasure to sit closely to in Mozilla building "S". He has a nice little tip on the many syntaxes that you can use to iterate over arrays in various JavaScript implementations and standards. Some folks had some interesting points on the various approaches: Read the rest...

Posted by Dion Almaer at 4:29 am
18 Comments

+++--
3.4 rating from 40 votes

Wednesday, April 22nd, 2009

Dynamically Generated PDFs… with JavaScript?

Category: JavaScript

In the "it-had-to-be-done-at-some-point" category, we give you James Hall's latest project: I have started working on jsPDF, an entirely Javascript-based PDF generator. Currently the demo serves up the generated PDF as a Data URI, but it could be used on the server side or within browser extensions. It currently only supports simple text, but I'm Read the rest...

Posted by Ben Galbraith at 9:30 am
18 Comments

++++-
4.6 rating from 53 votes

Tuesday, April 21st, 2009

Persevere’s JavaScriptDB: Impressive JSON Performance

Category: Database, JavaScript, JSON

Kris Zyp recently posted about an intriguing new chapter in the application persistence space: The latest beta of Persevere features a new native object storage engine called JavaScriptDB that provides high-end scalability and performance. Persevere now outperforms the common PHP and MySQL combination for accessing data via HTTP by about 40% and outperforms CouchDB by Read the rest...

Posted by Ben Galbraith at 1:00 pm
4 Comments

++++-
4.6 rating from 50 votes

Browsing on the Couch

Category: Database, JavaScript, JSON, Library

Atul Varma, a fantastic colleague in Building "S" at Mozilla, has been playing with a JavaScript implementation of CouchDB called BrowserCouch: BrowserCouch is an attempt at an in-browser MapReduce implementation. It's written entirely in JavaScript and intended to work on all browsers, gracefully upgrading when support for better efficiency or feature set is detected. Not Read the rest...

Posted by Dion Almaer at 6:34 am
1 Comment

+++--
3.8 rating from 21 votes

Friday, April 17th, 2009

Thumbnails.js: Screenshots via Page Glimpse

Category: JavaScript, Library

Eric Ferraiuolo, inspired by the deprecation notice of Alexa, wrote a webpage thumbnails JavaScript library that lets you grab web page thumbnails via Page Glimpse: PLAIN TEXT JAVASCRIPT:   var container = document.getElementById('container'),     thumbs = Thumbnails({ devkey:'xxx' });   thumbs.get('http://google.com', append); thumbs.get([     'http://eric.ferraiuolo.name/',     'http://925html.com',     'http://oddnut.com' ], append); Read the rest...

Posted by Dion Almaer at 4:03 am
1 Comment

++---
2.8 rating from 26 votes