Screencast 03: Developing an Object Oriented Web Service
In the third installment of the screecasts here at WSwI I'm glad to produce a whopping 45 minute episode which will teach you a good approach to developing JavaScript A.P.I.'s using Object Oriented methodologies as well as an all around practical usage of Yahoo! User Interface utilities; most notably the Connection Manager and Custom Event.
For this particular screencast I had decided to publish the the code in its fullness so that you may play around with it yourself to get a better understanding of it all. See Yahoo Services Demo. One exception you might notice in the demo code (that is different from the screencast) is that I've added one extra bit to prove a point of having an onWebServiceSucess. Eg:
onWebServiceSuccess in action
YAHOO.elseWhere = function() {
var f = new YAHOO.WebService;
f.onWebServiceSuccess.subscribe(
function() {
console.log("i'm just here for the ride");
// excellent place to log your ajax stats
}
);
}();
You'll see the beauty in the fact that YAHOO.elseWhere didn't have to know what anyone else was doing with the web service - and all he/she needs to do is set up the Base WebService object and subscribe to the onWebServiceSucess method. Also, FYI for the accompanying code - you may actually experience a few onFailure's coming back due to the fact that my server is being hit pretty hard at the moment. Otherwise, Enjoy!
Download the Quicktime Version (53 MB)
If you cannot see the video below: get the DivX Web Player (available for both Win & Mac)
recent
- Matador: The Obvious MVC Framework for Node
- Sandboxing JavaScript
- Crouching Ender, hidden command
- Ender.js - The open submodule library
- Qwery - The Tiny Selector Engine
- Klass
- Smallest DOMReady code, ever.
- $script.js - Another JavaScript loader
- About that slowness on Twitter...
- Autocomplete Fuzzy Matching
- JavaScript Cache Provider
- JavaScript Animate
- Asynchronous method queue chaining in JavaScript
- Something changed
- Unofficial Twitter Widget Documentation
i am dustin diaz

