Findings and Notes in Web Development

yui

My Collection of Common Javascript Functions – Part 1

After coded enough Javascript few months back, I found that there are a couple of functions that I kept re-using in different projects. Therefore I took some time to refactor them and re-arrange them into a single file. The common code that I keep reusing even today consists of functions that does prototypical inheritance, scope maintenance, some jquery stuff, google maps api stuff and some general ajax application related code.

Continue reading

  • Post Meta

    • Jeffrey04
    • Javascript
    • No comments
    • 2009-06-4
    • 21:19

Maintaining State with jQuery Event

Maintaining state in Javascript is not too difficult once you catch the idea. However, as I am not a super brilliant programmer, it takes me some time to find a way to maintain state as YUI Event does in jQuery.

Continue reading

  • Post Meta

    • Jeffrey04
    • Javascript
    • No comments
    • 2009-05-4
    • 21:17

Proof of Concept: YQuery

After the last post, I found that it may be fun to write a wrapper for YUI in order to make it behave like jQuery. Therefore, the code below is clearly mainly for self-amusement and is not intended to be used in production projects. However, through coding this, I found that although the difference in design, but YUI is obviously capable to do what jQuery offers (if not more). I will not continue working on this so whoever interested may just copy and paste the code to further developing it.

Continue reading

  • Post Meta

    • Jeffrey04
    • Javascript
    • No comments
    • 2009-05-4
    • 21:01

Maintaining State with YUI Event

When one start writting Javascript in patterns like the module pattern, then sooner or later he would want to maintain the state when an event handler is called. The reason I am still using YUI to handle my event handling code is because I like how state can be maintained.

Continue reading

  • Post Meta

    • Jeffrey04
    • Javascript
    • 3 Comments
    • 2009-04-11
    • 12:39

Using YUI for DOM Manipulation

After being frustrated of not getting consistent and accurate result via standard DOM methods especially html_element.getAttribute('key'); and html_element.setAttribute('key', 'value');, I came across some YUI library components that provides abstractions to various DOM methods. Some interesting DOM-related tools covered in this post are YAHOO.util.Element, YAHOO.util.DOM and YAHOO.util.Selector.

Continue reading

  • Post Meta

    • Jeffrey04
    • Javascript
    • 3 Comments
    • 2009-01-16
    • 13:07