I’m a big fan of jQuery. This librarie is just the best and simplest one around. I really noticed it when I wanted to get rid of jQuery in TimmyOnTime and try to use prototype.js instead, just to be more “rails-oriented” (that’s a pretty lame excuse don’t you think?)
Why I didn’t like prototype.js
There was not […]
Read the complete article...
From time to time, I receive emails from desperate people who want help with their javascript problem. I also receive a lot of emails of people wanting to help me with my “manly problems”. It’s very nice from them to care about me and I take time to reply to each of them but I […]
Read the complete article...
Like most of you already knew, I’m working with Frank Lamontagne of Ruby Fleebie on a project called TimmyOnTime. We had the chance to present it at the last Barcamp Montreal and it went… really bad! If you want to know more about the whole adventure (and have a good laugh), click here to read […]
Read the complete article...
Since I have written Ajax and javascript don’t use thread, one of my reader (BK) told me that I was wrong. Here’s the final truth.
What I said
If javascript runs some code that takes 5 seconds to execute and an ajax response arrives at 2 seconds, it will take 3 seconds before it will be executed […]
Read the complete article...
Since ajax, a lot of people are thinking that asynchrone means “in a separated thread”. They are wrong!
Synchronous
The XMLHttpRequest object gives you the option to make a synchronous request to a server with the parameter async set to false. It means that when you call the server, all javascript executions will stop and wait for […]
Read the complete article...
I really don’t like the “non-destructive” expression but I couldn’t come up with a better one.
What?
You want to create a function but you will overwrite the old one. You just want to add some code before or after it.
Example, you create a javascript applet that can be added to web sites you do not own […]
Read the complete article...
I talked earlier about bookmarklets and how wonderful they are. In today’s web2.0 world, you can’t have a successful application without giving your users a cool bookmarklet. It can be easy to do sometimes (like the one of del.icio.us) but you always want to do more and it gets more complex… until the day you […]
Read the complete article...
The day I discovered it, I was really happy. Not happy as a fish in water but maybe happy as a cat having its meal (though it enormously depends of which cat we are talking about). Talking about bookmarklet to some of my friends, I saw that there were a lot of incomprehension about it. […]
Read the complete article...
I recently wrote about closures and how easier your javascript will be to maintain and how good it will look. Now is the time for me to be a Closure-Grinch.
Closures keep a reference to a variable, not a copy
[source:javascript]
// Create a Buy Viagra function
function buyViagra() {
var pills = 2;
// Create a closure […]
Read the complete article...
Now is the time. I can’t go forward if I don’t talk about closures. What are closures? Closures are your friend. That’s the first thing you need to know about them. They will help you keep your code clean, healthy and easy.
A closures is created every time you create a function in a function (they […]
Read the complete article...