Send As SMS

Tuesday, March 07, 2006

s@rdalya recently got an A grade!

s@rdalya recently got an A grade after being thoroughly benchmarked by musingsfrommars .


I am providing several other useful DHTML/Ajax library listings that may take your interest:

It is generally better to use someting benchmarked and tested than re-inventing the wheel.

Though sometimes learning, innovating and inventing is really fun ;)


Thursday, March 02, 2006

sardalya is developing further

Using sardalya on external projects has always been my way of testing and future-proofing the API.

And I am currently using sardalya on a highly client-interactive project.

As per the interaction part, I've added new objects and enhanced existing ones.

The new version of sardalya will have.

  • A better AJAX integration.

  • And more objects to play with(such as Effect object for scheduled transitions such as background fades, or ModalDialog object which generates a DOM generated modal dialog, which is a cross-browser DOM-implementation of IE's modal dialog, which is not being used much because it is vendor-specific and not supported in other browsers.

a caveat on using EventHandler object.

When you attach an event to an object using EventHandler, an EventObject is created and stored in the EventRegistry.

The EventRegistry is used to detach events from the page when page unloads.

So, if you continue to attach more and more events to the page dynamically at runtime, the EventRegistry will grow bigger and bigger. This may result in a pseudo-leak.

There are several options you may choose to bypass addition to the event registry.

You may do it a attachment time:


EventHandler.addEventListener("myObject", "click",
myObject_click,true);


The last parameter true will indicate that the addition to EventRegistry will bypassed. As a consequence, memory leak issues will not be handled by sardalya engine and you will have to relase the memory yourself (by breaking circular references manually, you may want to visit my codeproject article for more info, it is not as difficult as it seems :))

Another option is to use a more simplistic event attachment model:


document.getElementById("myObject").onclikc=myObject_click;
... later in the code ...
function myObject_click(evt)
{
... event handling logic comes here ...
}


Hope that helps.