-
Yahoo! UI better dragdrop constructors
peter.michaux.ca (Nov 1 2008) YUI Explore Article
I like the Yahoo! UI dragdrop library. It does many great things. Unfortunately, the class hierachy, constructors and inheritance do not allow for proper encapsulation or easy subclassing. (Read Full Article)
Comment on Article Mentions: Javascript
-
How I write JavaScript Widgets
peter.michaux.ca (Oct 24 2008) Explore Article
Improving the structure of the code I write is an ongoing concern. Over the last while, I feel I've settled in to how I write HTML/CSS/JavaScript widgets and find the pattern repeating itself over and over again. The code example below is a simple little logger widget. It appends messages to a list and has a clear link to delete all the recorded messages. (Read Full Article)
-
Xpkg: Generic Package Managment Software
peter.michaux.ca (Aug 27 2008) Explore Article
Many projects benefit from package-based distribution with dependencies. Famously, Perl has CPAN and Debian has apt. It can be argued these two projects are alive and successful because of CPAN and apt. Various packages can be downloaded from central server package repositories and installed on a local machine. If one package has declared dependencies on other packages then those other packages are installed also. Many package management systems are quite ... (Read Full Article)
-
Comment on Simple Effects Plugins by Peter
Learning jQuery (Aug 21 2008) jQuery Explore Article
Simple Effects Plugins jQuery has a nice selection of core animation effects, such as .show('speed') and .hide('speed'), .slideUp() and .slideDown(), and .fadeIn() and .fadeOut(). It even has a couple methods for toggling effects — the aptly named .toggle('speed') and .slideToggle(). All of these methods have optional speed, easing, and callback arguments — although a couple are special cases. The .show() and .hide() methods, when used without a speed, will immediately ... (Read Full Article)
-
Fork v0.2 client-side JavaScript planning discussions
peter.michaux.ca (Jul 29 2008) Explore Article
I've been working on version 0.2 of the Fork client-side JavaScript library. I released version 0.1.1 almost a year an a half ago and have been using it in production without incident ever since. Along with some API changes, the truly fundamental goal for version 0.2 is making it easier to use robust feature testing at the application levels built on top of the Fork library. The mainstream client-side JavaScript ... (Read Full Article)
-
An Important Pair of Parens
peter.michaux.ca (Jul 3 2008) Explore Article
Every single time I read code like the following it seems like someone has particularly gone out of their way to trick me and waste a little bit of my time. var f = function() { // function body code // ... // ... }(); (Read Full Article)
-
Module Pattern Provides No Privacy...at least not in JavaScript(TM)
peter.michaux.ca (Jun 26 2008) Explore Article
The module pattern has been discussed many times and has shown how ECMAScript has the ability to encapsulate data as "private" variables by using closures. Today, in a comment on my blog, a reader, haysmark, points out that Mozilla's JavaScript(TM), the implementation in Firefox, has a second argument extension to eval that allows external code to spy on otherwise private variables. Try the examples below in Firefox. (Read Full Article)
Comment on Article Mentions: Javascript Firefox
-
Don't Choose Your Middleware Language or Architecture: they are consequences
peter.michaux.ca (Jun 21 2008) Explore Article
I'm writing web applications and need to decide on every piece of technology involved. What are a logical set of choices? (Read Full Article)
Comment on Article Mentions: Javascript
-
"JavaScript: The Good Parts", built-in object augmentation and namespacing
peter.michaux.ca (Jun 18 2008) Prototype Explore Article
I've read and am rereading Douglas Crockford's JavaScript: The Good Parts. It is a thought provoking book. I think he has achieved one of his stated goals to "start you on process of discovering the ways those components can be put together" where "those" refers to the good parts of JavaScript. If you have followed Douglas' writing online and watched his videos you will likely be familiar with the majority ... (Read Full Article)
Comment on Article Mentions: Javascript Douglas Crockford
-
JavaScript OOP: encapsulation, durable objects, parasitic inheritance and the decorator pattern
peter.michaux.ca (Jun 16 2008) Explore Article
I've been working to eliminate this and its associated complexity from my JavaScript vocabulary. I haven't written an articulate blog post about the difficulties this causes but there are many and perhaps I will write that article some day. I've gone on and off with my quest over time and made another push this past week to rid my life of this. I think that after just over two years ... (Read Full Article)
Comment on Article Mentions: Javascript Douglas Crockford
-
JavaScript Widgets Without "this"
peter.michaux.ca (Jun 14 2008) Explore Article
I put this on my list of JavaScript Warning Words and raised some eyebrows. I have been working to eliminate this from my code both as an exercise to understand closures better and also because this does causes problems. This article shows programming a toggle widget both with and without this (Read Full Article)
-
JavaScript Namespacing
peter.michaux.ca (Jun 14 2008) Explore Article
There are many ways to safely namespace your objects in JavaScript. This article discusses common practices I have seen. (Read Full Article)
Comment on Article Mentions: Javascript Macromedia
-
JavaScript Warning Words
peter.michaux.ca (Jun 13 2008) Explore Article
When I see any of the following words in JavaScript, I worry things could be written much better some other way. case constructor default eval instanceof navigator new prototype switch this typeof void with (Read Full Article)
Comment on Article Mentions: Javascript
-
Xjs 0.0.2 Release
peter.michaux.ca (May 31 2008) Explore Article
Work on xjs continues. This week I chose certain core modules, added missing bits of API that will be generally useful, added documentation and unit tests. A few of the modules are virtually finished and if they were stand alone would be almost ready to be tagged 1.0. The whole xjs package is not there yet but things are moving along well. (Read Full Article)
Comment on Article Mentions: Douglas Crockford
-
Google Libraries API
peter.michaux.ca (May 28 2008) Explore Article
Google Libraries API now serves common libraries like Dojo and jQuery all minified and gzipped and ready to go. Yahoo has been doing this with YUI for quite a while now and AOL with Dojo. The idea is that if enough sites are using the centralized Google libraries then when a user arrives to your site there is a chance the library is already cached in the user's browser. This ... (Read Full Article)
Comment on Article Mentions: Google Javascript
-
Xjs 0.0.1 Release
peter.michaux.ca (May 24 2008) Explore Article
This week I enhanced the xjs documentation system. I've also made a clear separation between the core xjs distribution and the community contributed modules. The install instructions have been updated for the xjs 0.0.1 release. (Read Full Article)
-
"hello, world" pure JavaScript xjs Module Tutorial
peter.michaux.ca (May 18 2008) Explore Article
Suppose you want to write your own pure JavaScript xjs module that prints "hello, world". Here is how you do it. (Read Full Article)
-
Xjs 0.0.0 "Feet Wet" Release
peter.michaux.ca (May 18 2008) Explore Article
This week I've worked on the module system: automatically packaging modules for distribution, indexing modules on a central CPAN-like site, and easily installing a module and its dependencies from the central site. To do this I had to separate the core distribution of xjs (e.g. JavaScript shell, xmake, File) from the extra modules (e.g. Synergy, PostgreSQL, YUICompressor). This decoupling is a great step in getting ready for other developers to ... (Read Full Article)
-
Xjs Mailing List
peter.michaux.ca (May 14 2008) Explore Article
I've added a xjs-talk group on Google Groups. (Read Full Article)
-
module management: Cpan, Gems, and xjs
peter.michaux.ca (May 14 2008) Explore Article
The past few evenings, I've been working on an xjs module management and distribution system. There is no question in my mind that CPAN is the gold standard and the reason that Perl persists today. But Perl and CPAN are a getting a little older and newer systems have come along to try to improve on CPAN so it is worth looking at what these newer systems have to offer. ... (Read Full Article)
-
ParseArgs xjs module
peter.michaux.ca (May 11 2008) Explore Article
I've added a new xjs module called ParseArgs for parsing arguments to a script. Parsing arguments, even with argument parsing libraries in other scripting languages, is not fun. I think that the ParseArgs Module should make the process relatively painless in most situations. (Read Full Article)
-
xmake: A JavaScript make-like utility
peter.michaux.ca (May 10 2008) Explore Article
xmake is a make-like utility modeled after Ruby's Rake. xmake is an xjs module. If you've been following along the xjs saga you can cd xjs; svn up; make install;. If you haven't installed xjs yet, the start of this article will help. After it is installed you can run xmake from the command line xmake [-f filename] taskname (Read Full Article)
-
Client-Server Code Sharing: putting the "synergy" in Synergy
peter.michaux.ca (May 9 2008) Explore Article
Developing the client and server sides of a web app in two different languages is a well recognized problem. Many people would like to develop both sides in the same language. This allows developers to think in one language without needing to switch programming paradigm gears constantly (e.g. class-based to prototype/functional-based). Another goal is sharing code between the client and server. Form validation and something like a blog comment preview ... (Read Full Article)
Comment on Article Mentions: Javascript Firefox Opera
-
xjs, Synergy and YUICompressor together
peter.michaux.ca (May 8 2008) Explore Article
Last night I added the YUICompressor as an xjs module. This was trickier than I thought as the YUICompressor monkey patches the Rhino parser files. So I had to renamespace all the Rhino code and create a custom build of the YUICompressor jar so it can coexist with the normal Rhino jar. (Read Full Article)






Recent Comments
joew » Partial Functions in JavaScript
This is a fascinating article, partial function application is a really useful technique John's ...
pawan » Google
Here are two other similar products which I bookmarked in the past: http://www.maani ...
See all recent comments