• posted 2½ years ago
    • 2 comments

    Dynamic Variables Assignment?

    195144566_b1b4a84991_bIn JS, I ran into a problem where I needed to create a shortcut string, and then turn that string's value into a reference to a different object.

    So for example, I create a string called 'oliver' under the variable shortcut like so:
    read
    • posted 2½ years ago

    Mootools caveat #2: noCache in new Request() is your friend

    mootools_logoReading the docs is really worth it's weight in gold. Namely, noCache option/parameter for a new Request (aka. Ajax for mootools) object really does make all the difference in the world.
    read
    • posted 2½ years ago

    Mootools caveat: event.target is not extended by $

    mootools_logoThis took me way too long to discover:
    When using event.target via mootools event handlers, I figured out, after way too much testing, that event.target is NOT extended via $, and therefore doesn't have accessors like .get('tag') and default's for the $ (dollar sign extension).
    read
    • posted 2½ years ago

    Script/Asset abuse: this is getting ridiculous!

    Abuse_is_badFrameworks like YUI, JQuery, Mootools, Dojo, etc., are arguably the best thing to have happened to JavaScript in 10 years. I remember when I first learned about their existence. I was coding my own animation script (functional, not OO, and definitely not efficient) that didn't do anything fancy; just scrolled up and down. I remember then hearing about dojo, and thinking I'd wasted so much time.

    Then what I did, was go around to all the different frameworks. I don't even think JQuery existed in it's current incarnation at that point (December of 2005), and I looked around at as many as I could (dojo, mootools, and a few others that have since become relics). This post though, isn't about the greatness of these frameworks; rather it's about the terrible abuse.
    read
    • posted 2½ years ago
    • 2 comments

    JSONP vs JSON: amazing for API's.

    Roll Bar PaddingI was doing some search and found http://ajaxian.com/archives/jsonp-json-with-padding as well as http://ajaxpatterns.org/On-Demand_Javascript

    My reason for searching was I was trying to understand why some developers use the term JSONP vs JSON. JSONP standards for JSON with padding. The padding is supposed to give the JSON a little more flexibility. Let me try to convey in my own words the benefit.
    read