technorati tags:perelman, poincaré, mathematics, arxiv
Blogged with Flock
Thoughts about technology, business and all that's life.
technorati tags:perelman, poincaré, mathematics, arxiv
Blogged with Flock
technorati tags:onyomo, businessworld
Blogged with Flock
I came across a project on SourceForge.net called jsext. These people are trying to build a pure javascript based server side libraries for common tasks such as connecting to databases and other stuff. These libraries will be able to execute as native server side modules for SpiderMonkey, the Mozilla Javascript interpreter.
The idea behind it is that in most web development projects, javascript is often an integral part on the client end especially these days when Ajax has become quite popular. By making javascript as an option on the server side as well, multiple language development can be cut down and hence maintainability of the software can be increased. Cool!
technorati tags:jsext, javascript, server-side, spidermonkey, sourceforge
Blogged with Flock
A new version of Google Talk has just been released. It supports Photo & File Sharing, Voicemail and Music status sharing features. Cool isn't it?
Find more information here at the official Google blog and the official google talk blog.
Meanwhile TopCoder has a lot of components related to XMPP posted these days. XMPP stands for eXtensible Messaging and Prescence Protocol. It was developed by the Jabber open source chat server/client and is now used by Google Talk as well as many other IM clients.
The international coding competition Google Code Jam has been announced and registrations have started. Google has been investing a lot of money in these coding competitions. Recently we saw a Google Code Jam for India, China and Europe. TopCoder organizes these competitions on behalf of Google. It's said that the top contestants usually recieve an open offer to join Google's engineering team. All the best to those who are participating. I think I'll be one of them :)
technorati tags:google, code, jam, gcj, google-talk, xmpp, topcoder
Blogged with Flock
Although some people have had some frustations with their promises. For example, there's no library support for knowing the free disk space on a disk partition in Java. I'd think that's an important thing. Surprisingly this has been a feature request since 9th June, 1997 and after repeated (unfulfilled) promises, it's going to be implemented in the upcoming mustang release of JDK (version 6.0). It shows as fixed in mustang release in the bug logs of Sun.
technorati tags:java, sun, open-source
Blogged with Flock
I've been playing a lot lately with XMLHttpRequest. As a part of one of my tasks, I set out to build an object oriented javascript component which provided a plug in functionality for a HTML element. Specifically I set out to build a decorator (in design pattern parlance).
I ran into a problem which foxed me for some time until I dig up some old posts in the comp.lang.javascript google group. The problem was something like this:
Suppose you create a javascript custom class which takes a UI element and attaches some event handler to it. That event handler is one of the methods of our class. Now the problem was that I was unable to access any of my class's attributes from that event handler function. Every time I tried using the this object to access a attribute, I was getting an undefined value. After some experimentation I found out that within the event handler function this refers to the UI element on which the event was attached. So inside that event handler, we don't have a handle to the current object of the class.
function MyDecorator(sourceElement) {
this.sourceElement = sourceElement;
this.someOtherAttribute = 192123123;
this.sourceElement.onmouseover = function() {
//do Something with the class's someOtherAttribute.
alert(this.someOtherAttribute); //This does not work
}
}
One way out of this problem was a dirty hack. Maintain a global variable to hold the current object. But that can only work when there's only instance of the decorator in the page. The second way was to let the javascript in the page handle the event and pass it on the appropriate decorator object.
But in both of the cases the self-contained nature (or encapsulation) of the object-oriented approach is destroyed. This problem surfaced again when I was writing a javascript class to fetch some data from XMLHttpRequest and process it's response inside the class. In this case you can't implement the second approach outlined above and keeping a global reference to the current object seems the only way to go about it. Or else I can keep aside the object oriented stuff and go about it in a function based approach.
technorati tags:javascript, event-handling, object-oriented
Blogged with Flock