FX: Lightweight and Standalone Animation
Its one of those unnecessary things, but it sure does look pretty, I’m of course talking about animation. Flash or Javascript based, I find it adds that little some extra for the end-user’s experience; allowing them to fully understand the actions taking place by visually seeing components in transition. Most all mainstream libraries support animation in one way or another, and they are all quite impressive, despite the fact the core of each library essentially works the same.
onDOMReady: No Browser Sniffing!
For the most part, I’ve typically relied on window.onload for my various projects; its simple, cross-browser, and the alternative onDOMReady functions were unreliable due to their utilization of browser sniffing in some fashion. However, the problem with window.onload, as I’m sure you’re all aware, is that it doesn’t fire until the entire page has loaded including all images. This can make for a usability nightmare for any page with a lot of images and/or anybody with a slow connection. If your page relies on JavaScript then there could very well be an extended amount of time whereby the user is interacting with the page and it hasn’t yet been initialized. An onDOMReady-related function is the more modern approach, allowing you to define a function that will execute as soon as the DOM is in a usable state, that is to say structurally complete. The main obstacle now is to create a solution that is not dependent on browser detection.
Cross-Browser XML and XSLT Processing
There is something inherently powerful about what direct data interaction and manipulation is capable of and the ease at which it performs. XSLT may be called a stylesheet but it is nothing like CSS, it deals directly in data management and presentation, utilizing advanced functionality typically reserved for a scripting language. Similar to what Smarty is to PHP templates, XSLT basically defines the rules for rendering an XML file, with one important distinction – the data is live. The data is subject to further XSL manipulation after the XML document has been initially transformed, facilitating many dynamic features. This has great implications on the web applications of the future; loading a widget could be as simple as dynamically loading an XML document which contains all settings and instructions, performing an XSLT transformation and appending the result document to the DOM. With those kind of capabilities the potential for such an application is limitless.
Welcome
Here I will not only be sharing the latest news, resources, tutorials, and tools but it will also serve as a platform. As a long time supporter and beneficiary of the open source community, I figured it was time to give back. The main focus of my projects will be to fill a certain niche market of open source Javascript, that being library independent and free of browser detection.
You see I have a problem with Javascript libraries in general, it has always been my contention that each project deserves its own library containing only required modules. The facilitation of browser sniffing is just the icing on the cake; more often than not I find it a simple means to an end or an unnecessary shortcut, all you have to do is view the source of some of the most popular Javascript libraries to see examples of this. A solution short of checking the user agent is often easier than one might have thought.
In that spirit, I will be releasing various modules that promise to be lightweight, standalone, cross-browser, and contain no browser sniffing whatsoever. Be warned, I don’t like rewarding or encouraging bad programming, so don’t expect me to support your mistakes; if your working without a doctype, that is your problem!
I look foward to future dialog.