JavaScript to be updated, strict mode finally in sight
This interview of Brendan Eich, CTO of Mozilla Corp, talking about ECMAScript Fifth Edition (next generation of JavaScript) made me really happy.
There are times where most JavaScript developers would kill to get a strict mode and to finally stop creating browser specific workarounds. Even to this day I have to implement some kind of browser checking for certain functions. Luckily this is usually only for IE 6 and below.
I also have to mention that most of the next generation browsers will have improved their JavaScript engines to give us some well deserved speed.
So as this post comes to an end I plead to anyone still using Internet Explorer 6, Firefox 2 or below; please upgrade :)
The sooner the better, and the cooler web apps you will be able to use.
Mess with your co-workers. April Fool’s Greasemonkey script
Whenever I leave my work computer unattended I always end up with a new status message on Facebook or MSN. Now with April fool's day approaching I feelt it was time to take revenge.
I have conjured up a Greasemonkey script that you can install on your co-workers computer (if they use Firefox), you can download / install the user script from here.
What the script does:
Every time the user clicks a link there is a 1/3 chance that the link is replaced with a quote from the LOLcat bible
There is also a 1/3 chance that the link just disappears
The rest of the times the link works as usual.
This script will only work during April Fool's day so you can install it today and your co-worker won't be the wiser.
System Developers that don’t want to learn JavaScript? Look no further
I have a bunch of friends that are system developers that from time to time has to deal with the "horrors" of web development. The non-strict format of JavaScript can sometimes be hard to grasp for C++/.Net developers.
Luckily for them there is now a way to avoid it and use a language that is more strict but still gives you access to all what JavaScript has to offer (and other languages as well!). So to all you client side haters out there, I present: haXe.
haXe is a multiplatform language that can be compiled into Javascript, Flash (ActionScript), PHP, NekoVM (and soon C++). So if you can't be bothered learning new languages all the time, atleast try to learn this one.
Javascript Distributed Computing
I've seen JavaScript used in all manners of situations, but one I did not figure until now was distributed computing.
The idea is quite simple, create a web page with a JavaScript algorithm. Make the page fetch data to use in the calculations and post back the results.
It can't be long until someone creates a service where visitors sell their cycles by just having a browser tab open, or perhaps donate their cycles for a better cause such as Folding@home.
I would not be surprised if communities such as Facebook would implement this idea. Any website where the page viewing time is more than a couple seconds would be a suitable distributor. It could even be done using Greasemonkey.
Why should you use JavaScript Frameworks?
A couple of years ago I felt that in most situations, if you want something done right, then you do it yourself. This statement is kind-of still true, but now I use more help and support to lessen the burden.
The one biggest thing that increased the ease and efficiency of my JS coding was the use of Frameworks. I’ve been through a couple of them and right now I prefer to use MooTools in my solutions. There isn’t much to set most frameworks apart, they have all been developed for the same reason, make it faster and easier to accomplish your goal. May it be implementing Ajax functions or adding interface functionality to a spreadsheet type of page.
So why have I settled down with MooTools? It is modular and the documentation is of fair quality.
By using a modular framework I can choose what components to include or exclude and by that decrease the page loading times.
I have a few posts planned related to JavaScript and when I post bigger solutions they will most likely rely on one framework or another.