having fun with code

Tag Archives: javascript

Mooml.globalize(): Mooml template functions going global

Since version 1.0.9, Mooml includes a new feature: globalize. It maybe handy for some websites to globalize all the Mooml template functions (div, a, p, span…) to the window object scope, so they can be used anywhere in the code without the need of defining or evaluating a template. For example, in normal Mootools code [...]

Dojo y yo

Back in November 2008 I had a chance to work with Dojo on a project for Cisco WebEx. I didn’t like it at all. I was used to the simplicity of jQuery and Mootools and I couldn’t understand how Dojo had been designed so complicated. Well, one year later I just realized that it is [...]

Happy New Year 2010

(function(){ t=[72,97,112,112,121,32,78,101,119,32,89,101,97,114,32,50,48,49,48]; alert(String.fromCharCode.apply(null, t)); })()​

Creating HTML blocks with Mootools

Sometimes we need to create HTML from JS. There are multiple ways to do this, from using innerHTML to creating element by element appending child to parents, setting attributes, etc. And there are as many different opinions about what is the right way to do it. Meanwhile, once thing I missed from jQuery, not available [...]

Bad practices writing Javascript & good tips for everyone

I found specially interesting the use of document fragments.. Didn’t know about them before :) http://james.padolsey.com/javascript/javascript-bad-practices/

Setters & Getters on Mootools classes

Although I haven’t need them for my classes, I thought it would be very cool to have the possibility to use them. Setters and Getters are very popular in modern programming languages, since they let you do some actions when a member/property of an object is being accessed or modified. Setters and Getters are native [...]

iPhone 3.0 geolocation with Javascript

I was watching one of the video tutorials from Apple last night about some custom JS available on Safari, only on the iPhone 3.0, that let’s you interact with the phone and obtain data like the current location, etc. So I built a little page to see how it works. I included Mootools 1.2.3 from [...]

Sending messages between Javascript objects

When applications (or websites) get pretty big, it usually happens that a lot of different objects or classes interact with each other or, even worst, depend on each other to achieve the site functionality. A simple example could be a Tabs manager class, which controls a set of tabs in the page. Sometimes, the content [...]

Setting up timers and intervals inside JS objects

It may seem trivial but it has its tricky point. Usually, in procedural Javascript (this is, non object oriented programming), timers are set up passing the callback function on a string: function hello() {   alert("hello"); } // Will execute hello() after 10 seconds setTimeout('hello()', 10000); For this code to work, hello() has to be [...]

Chrome Experiments

chromeexperiments.com gathers a good amount of very impressive javascript demos, showing the future of the Internet, where javascript intensive sites and application will become more and more common. My favorites: Browser ball – bounce a ball between different browser windows Kaleidoscope – very smooth animation and beautiful colors

About the blog

This is a blog about development, focused mainly on Javascript but also other languages like python, shell scripts and more.

About the author

Eneko Alonso is a software engineer and UI developer with more than eight years of experience in software and web development. He lives in San Luis Obispo, California and works at LEVEL Studios.

Contact Info

Contact Info