Design Diary: Frickin’ Time-Consuming Ad-hoc Tests of My YUI-based Ajax

My YUI-based Ajax is biased toward XML over HTTP. So, of course, I needed my ‘ingenious invention’ for simple string posts—the old fashioned application/x-www-form-urlencoded stuff. Ideally my solution should be able to handle both formats. Yesterday it was not:

The newer lesson for me is to consider using the ‘named parameters’ pattern in JavaScript: passing an object, using its properties as parameters instead of passing in a bunch of arguments that are time-consuming to track.

One consideration (not really a lesson) is to learn how to use YUI debugging/testing methodologies. A new consideration as well is recognizing the YAHOO.util.Connect.setForm() method: “This method assembles the form label and value pairs and constructs an encoded string. asyncRequest() will automatically initialize the transaction with a HTTP header Content-Type of application/x-www-form-urlencoded.” This member has been around for at least a year.

rasx()