Search

Rss Posts

Rss Comments

Login

 

FX 2.0: The Full-Featured Animation Framework

July 3, 2009

It has by far been the most popular thing to come out of this blog since its inception, and I am very proud to officially release version 2, and this time I’ve included all the bells and whistles you’ve been asking for! The framework now boasts support for an impressive amount of transitions, CSS multi-unit support (em, %, ex, and all the rest), and many more optimizations for increased performance to get those smooth animations we all want. read more »

Detecting Browser CSS Style Support

May 3, 2009

Now I’d normally be the first one to speak out in favour of unobtrusive JavaScript and attempting to keep CSS styling out of JavaScript. Rarely should you need to directly impose CSS styles on an element via the style object, after all that is what class names are for. However there are some styles that are commonly and justifiably manipulated within JavaScript; display, visibility, width, height, top, and left are just a few of the styles often directly manipulated within JavaScript typically for some type of UI component. Of course, some of these styles are not supported in all the mainstream browsers, such as opacity in IE and -moz-transform in Firefox < 3.5. read more »

Env: Feature Testing

April 19, 2009

As a followup to my last post regarding browser detection, I have decided to release a new standalone and lightweight library that will hopefully put browser sniffing to rest once and for all. In a project I’ve entitled Env (short for environment), you now have the power of knowing exactly what your browser environment is and is not capable of without actually knowing what browser it is. Many of the features and bugs that are often encountered during runtime no longer need to be sniffed out by the user agent, despite the fact that some of the mainstream libraries still insist upon it. In addition to bug and feature testing, the library also supports advanced type detection and event support detection to further enhance your usability, but also separate your dependence on browser sniffing. Goodbye navigator.userAgent and good riddens – you’ve broken my app for the last time! read more »

Browser Detection: Necessary or Negligent?

March 29, 2009

It is still a controversial issue today despite the recent evolutions in the industry including new modern browsers and new resources such as jQuery (as of version 1.3) that now entirely base their implementations on feature testing. However, somehow the practice of browser detection seems to still be alive and well, whether it be new browsers bringing about new bugs, features that are difficult to detect, or simply shortcuts spawned out of pure laziness, the practice is not only being used but defended. Browser sniffing can be found around just about every corner you look – from the smallest of websites, to your favourite JavaScript library (Mootools, Prototype, YUI, etc.) utilized in corporate giants such as Chrysler, Gamespot, and Yahoo! read more »

Library or no Library, That is the Question!

March 8, 2009

It is rarely even a question anymore; deciding whether to use a JavaScript library on your next project typically goes without saying, the real question developers find themselves asking is which library should it be? However the decision to adopt any framework for a project should not be taken lightly and deserves a proper evaluation of requirements before making a decision based on assumptions. Often a library may ask of a developer, “Does the JavaScript library help me to write JavaScript?”, but shouldn’t they ask if the library helps them to learn JavaScript? Learning the syntax of your favourite JavaScript library does nothing for the developer’s understanding of the language itself or the impact on performance, memory, and reliability of their implementations. For this article, I will be looking at both sides of the argument, but hiding my bias will not be easy, my hope here is that perhaps a few developer’s may rethink their approach. read more »

Class Types and Invariants

February 22, 2009

Right off the bat, I should say I don’t expect this project to be used in any real-world applications, as the amount of overhead is substantial and performance could suffer, so use at your own risk. Instead, this project is about demonstrating the versatility of JavaScript; it is common practice these days to build on top of the language and extend upon its native capabilities due to a lack of support for various functions and implementations found in other languages. This has lead to many of the countless hacks and extensions found in most modern day libraries, such as inheritance, native object extensions (Array), dynamic script injection, animation, and CSS selector engines to name a few. Now you can add one more to the list; class type and invariant declaration and validation. read more »

Scope/Context in Javascript

February 8, 2009

Scope or context as it is often referred to as is one of the fundamental aspects of Javascript, playing a significant role unlike that of any other language. Scope refers to the accessibility of variables and its execution context which belongs to the object or function in which it was defined. However this does not always hold true as scope can be lost or changed depending on how and where it used, specifically as it applies to functional execution. read more »

FX; Lightweight and Standalone Animation

January 22, 2009

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. read more »

onDOMReady: No Browser Sniffing!

January 12, 2009

For the most part, I tend to rely on window.onload; its simple, cross-browser, and the alternative onDOMReady functions were unreliable because of the use of browser sniffing. Aside from that, a low byte size in your pages is not only relatively easy to attain, but it should also be kept in mind during development – bandwidth can be a valuable thing. Thus, images shouldn’t result in a long load time and therefore should eliminate the very requirement of an onDOMReady related function. read more »

Cross-Browser XML and XSLT Processing

January 7, 2009

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 simportant distinction – the data is live. The data is subject to further XSL manipulation after the XML document has been initially tranformed, faciliating 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 within the DOM. With those kind of capabilities the potential for such an application is limitless. read more »