Ubuntu Malaysia Mailing list open
The Ubuntu Malaysia Mailing lists are now open! Though even with the sparse activity on the MyOSS lists and the OSSig lists combined, I don't really know how beneficial this list will be. Perhaps, just maybe, theres a tiny chance in the future, more people will be interested.
Browser window event Loader
Web 2.0 is high like a dog on rabies, and one of its supporting pillars is a dormant technology that is now being put to some good use. You basically need JavaScript kung-fu else, chances are you might lose out in the game!
I myself despise JavaScript for its awkward behavior on multiple browsers, but with the increasing usage of JavaScript, it appears that these browsers are finally working together which is great! One of the weapons in my arsenal which makes JavaScript development more fun is the prototype libraries! Its almost like Ruby, but for JavaScript! Yes, crude as it may sound, but if you don't mind my cussing, its damn diddly awesome.
While hacking, I had a jumble of JavaScript libraries that had dependencies on one another, but functions which initialize stuff on the browser loading, had dependencies on one another. Yes, it was some weird hack. But the webs straight forward manner made this more difficult. Sometimes I needed code that was later down in the page to be loaded first, etc. Hopefully you get the point now. Well nonetheless, I construed together this beast! You need the Prototype libraries for this.
function addLoadEvent(func, weight) {
if (typeof weight != 'number')
weight = 0;
if (typeof addLoadEvent.funcs[weight] == 'undefined')
addLoadEvent.funcs[weight] = $A(new Array);
addLoadEvent.funcs[weight].push(func);
}
addLoadEvent.funcs = $A(new Array);
window.onload = function() {
addLoadEvent.funcs.compact().each( function(array) {
array.each( function(func) {
if (typeof func == 'function')
func();
});
});
}
So what can you do with this? Say your source code was as such...
// File 1
function load_markers() {...}
addLoadEvent(load_markers, 1);
...
// File 2
function load_google_maps() {...}
addLoadEvent(load_google_maps, 0);
...
This could possibly happen because of the design of the CMS/Framework and it loads a certain library first (which it shouldnt), but you have no absolute control of it.
If some of you may have noticed, it was inspired after looking at the Drupal source code, well I was having troubles using the Drupal framework and resorted to this to get things done
.
Exploring symfony
Since the past year, I have been experimenting with Ruby On Rails, one of the the hippest frameworks on the block. Everyone's talking about, and I myself believe that its great! But there are some short comings, the biggest being is finding hosting. There aren't many, and the ones that are good require some sort of credit card, which as a 20 year old your not allowed to have.
So I turned my head elsewhere, and remember hearing about the symfony (Yes, I believe it starts with a lower case 'S'). Watching the screencasts, I was reminded of the magic that Ruby on Rails has, but on PHP. Which is great, because everyone (luckily including my ISP) seems to be supporting PHP, perhaps because its alot easier to support? hehe.
So for the next few weeks I will be making the jump back from Ruby to PHP, more specifically symfony.
The best experience about learning Ruby On Rails? Learning Ruby itself, its truly an interesting language
.
Maybe what I want from web development is magic! And lots of it!
