scottandrew.com

Noteworthy

You're currently viewing a very old version of this website. Follow me to the latest version.

-->

April 30, 2002

Uzilla

Uzilla is a suite for performing usability tests of websites and web applications, based on customized Mozilla technology.

Conditional Script Loading

Webreference: DOM-Based Conditional Script Loading in JavaScript

Stories and Tools

Anil Dash talks about Stories and Tools, drawing comparisons between the Web as a text medium and the Web as application platform. I think he oversimplifies the argument a bit, stating that awkward browser-based Web applications are the result of trying to "make a story act like a tool." He points out why Oddpost is both good (wicked-cool functionality) and bad (the HTML is meaningless outside a narrow context), puzzles over the lack of a "web tool DTD," and skims over AppML before finally settling on DomAPI as his widget toolset of choice, even though the HTML created by any DomAPI widget is just as semantically meaningless as anything served up by Oddpost.

I sense there's an implied conclusion here. Back up to AppML (Application Markup Language, not a W3C standard) and think about how much more meaningful it is as opposed to the mess of HTML and JavaScript created by DomAPI, DynAPI or DOMLib. Now think XSLT. You get the idea. Now it's just a matter of when this convergence will happen.

By the way, more than one Australian wrote in to say that the author of that "take a month off" article was high on crack.

April 29, 2002

Take A Month Off

Acting coach Milton Katselas once wrote that if you ask anyone on the street what they do (for a living, that is), and what they'd rather be doing, chances are you'll find that the majority have an unfulfilled dream they still aspire to. I'm fairly convinced that part of the problem is the deary, interminable time-suck imposed upon the average American worker bee. Who has time to work on anything remotely satisfying when the paltry two weeks of annual vacation we get are consumed by household chores and frazzled, underplanned trips to see family who've all but forgotten you exist? That's why this SF Gate article resonates so deeply with me: You Deserve A Month Off.

Let me divulge you a little secret of mine: although I consider myself to be extremely fortunate to have held on tooth-and-claw to gainful employment during the darkest days of the economic slump, I have to admit to a certain amount of envy when I consider how my "unemployed" acquaintences are faring.

Inarguably, this is because these people are bright, likable and talented. There will always be work for such folks. Not that I would eagerly stick my head up the next time the layoff axe comes a-swingin'. Being out of work is no picnic, to be sure. But to my knowledge, no one has had to sell their belongings to avoid eviction, people are working on interesting and fulfilling projects, and in general, people are still happy. And that's good.

April 26, 2002

Google's Gaffe

Paul Prescod on Google's API. Paul's an advocate of the REST approach over RPC-based interfaces like SOAP. I don't buy into his argument that SOAP is an "inferior" technology, but I will say that you can't beat REST for ease of implementation and adoption. Not all developers are necessarily programmers, and RPC is a very, um, programmery thing. But URIs are something everyone groks, and it just takes so much less glue. Talk about yer lightweight protocols. (Plus, one wonders who, if anyone, will end up owning SOAP in the end.) I'm sure I'm way oversimplying the issue.

XML 1.1 Last Call

XML 1.1 last call for comments has been published. Gotta love this line from the W3C blurb: "Everything that is not forbidden is permitted." Hee.

Fray Day 6

Fray Day 6 has been scheduled for September 14 this year. Will the Walkingbirds be involved again this year? Dunno yet.

mozilla/browser

mozilla/browser is a browser based on Mozilla source code which, according to Blogzilla, is "separate from all of the various tech and marketing bits that have made their way onto the UI over the years and make something for the average user." Ironically, ya gotta compile yourself it for now.

Up From The Depths

Mozilla continues to gain mindshare:

Time: The Browser That Roared.

ZDNet: Mozilla loaded up for browser wars.

Evan Williams (of Blogger):

Somewhat un-planned, I spent the afternoon getting familiar with the latest Mozilla release and lo and behold, I kinda like it. At least enough to make the tweaks necessary to build in support for it in Blogger Pro. It wasn't too hard.

April 25, 2002

Valharic Caligula Aurelius

All hail His Royal Majesty Valharic Caligula Aurelius, King of the Midrealm!

Merry meet, y'allz.

April 24, 2002

Richard Shindell Tix For Sale

Richard Shindell LiveLike folk and/or acoustic music? Live in/near the Bay Area? I have two tickets to see neo-folkie Richard Shindell at the Freight and Salvage Coffeehouse in Berkeley, on Saturday, May 4th. Want 'em? Drop me a line (Update: Sold to the wise woman in the back!).

Whole Lotto Gecko Links

AOL Gecko Browser Detection Tips

Establishing Dreamweaver compatibility with Netscape 6

Stylesheets and MIME Types in Gecko

April 23, 2002

Almost End-Of-April Update

'Sensitive artist' poseWhoa, April is almost over, and it's been a month since the last update! Dang. I've been working on some new stuff, none of which is in presentable shape yet. Just waiting for my muse; you know how it goes. The only solid news to report is: an album is in the works. You know, like, recorded in a real studio and all that. Other than that, the 3-song mini-CD sampler (originally available only at SXSW 2002) will soon be available through this site, once I hammer out the details. In the meantime, reader Shannon Hale pointed me to this great piece: Making Your Indie Project Go As Smoothly As Possible...If That's Possible... Got an interesting DIY music link? Share it here!

April 22, 2002

Layne Staley

I feel so alone
gonna end up a
big ol' pile of
dem bones.


April 19, 2002

More on REST

I've been learning and thinking a lot about REST (Representational State Transfer) and how it stacks up to RPC-based technologies like SOAP and XML-RPC. The idea behind REST is that the Web already has everything it needs to power XML-based, transactional Web services -- HTTP-native actions such as GET, POST, PUT, DELETE, etc. applied to a "potentially infinite set of nouns (URIs)."

The REST view is very seductive in its simplicity. In fact, most RPC operations can be mapped to REST equivalents. From the RESTWiki:

- when retrieving information without changing the state at the server, use GET
- when explicitly setting some piece of state on the server, use PUT
- for pretty much everything else that changes state at the server in a loosely coupled way, use POST
- for other operations that change state on the server in an early-bound manner (i.e. the client needs to know explicitly what is happening), define a new HTTP method.

What about structs and complex datatypes? REST doesn't require a schema, so you use any one you wish. Things get a bit tricky when you get into things like discovery of services and methods, because at some point you need to know how to find and get at a Web service's inner workings. As a developer, probably the most obvious benefit I see is you don't need much to get started, no crazy tools, no SOAP::Client, etc. All you need is something that can handle HTTP and parse an XML payload. In other words, you need less glue.

More on this later, as I learn.

April 18, 2002

Mozilla 1.0 Release Candidate 1

Mozilla 1.0 Release Candidate 1 is released!

Google (SOAP) vs. Amazon (REST)

An interesting debate over the merits of the Amazon API versus the Google API: the Amazon API is dirt-simple to use; simply pass parameters to it via the URL, as you would any Web page, and you get the results back in pure XML (Simon St. Laurent points out that the Amazon API is very REST-like). Google, on the other hand, requires that a SOAP call to be fashioned and POSTed. It seems pretty laborious when you realize that there's nothing Google's giving us that couldn't be done via a URL. A SOAP interface makes more sense if you need to send and receive complex datatypes (something beyond a one-dimensional list of name-value pairs) to invoke a particular method over a network, but you have to question whether all that overhead is really necessary just to get a list of search results or spelling suggestions.

That being said, I think I just answered my own question. Weblog aggregators need not implement something so complex as an XML-RPC interface in order to receive a ping from blogware. Wouldn't a single public URI suffice? Just agree on some parameters and go with it. http://www.weblogs.com/ping?site_id=xxxx Could it be any simpler?

A Weblog Aggregator API?

After seeing the new BlogTrack app and reading Paul's comments on it, I wonder if services like this wouldn't be better implemented with a "ping" interface. Instead of scanning and scraping for new content, weblog tools could simply send an "I've been updated!" message to interested aggregators. Weblogs.com requires this, as does the "Recently Updated" list at the Moveable Type site. It occurs to me that as weblogs gain ground as valuable information sources, there should be some interoperability between blogware and the tools that interface with it. Would aggregator tools benefit from a notification protocol? A MetaWeblogAggregator API? Does such a beast already exist? How about blogware that talks to each other?

April 17, 2002

WASP JavaScript SOAP Client

Andy King at Webreference pointed me to Systinet's WASP JavaScript SOAP Client for IE5+. The interesting bits are in this file which contains the JavaScript SOAP client functions. Basically, it builds a SOAP message out of DOM elements and posts it via an XMLHTTP ActiveX Object. Neato. There's not quite enough overlap with the Mozilla SOAP interface for it to be compatible in both browsers, but it's close.

The innerHTML Debate

innerHTML - convenient and useful, or tool of Satan? Tim Scarfe of developer-x.com and Alex Russell of netWindows fame have collaborated on a thought-provoking article, The innerHTML Debate, which looks at how the use of innerHTML compares to strict DOM manipulation.

Mozilla/Google API Demos

Oh, alright already. Here are two demos that use Mozilla's SOAP client functions to call the Google API via JavaScript. They're rough and undocumented, but serviceable and ever-so-much fun. Due to security restrictions in Mozilla, you'll need to run them from your hard drive and grant privileges when prompted. Make sure you read all the notes. Have fun.

April 16, 2002

SOAP Scripts and Security in Mozilla

Ray Whitmer's tutorial on SOAP scripts in Mozilla outlines the various pieces available in Mozilla to make SOAP calls. He also talks about ways to modify security restrictions so that scripts can invoke Web services outside of the source domain.

Using XMLHTTPRequest in Mozilla

Mozilla's XMLHttpRequest object is in many ways identical to Microsoft's XMLHTTP ActiveX object. Both can be used to make GET and POST requests from the browser. Here's a handy tip: in Mozilla, don't forget to use the little-known overrideMimeType() method if the server is returning anything other than text/xml. Otherwise, Mozilla might lock up on you.

try {
  // for Mozilla
  req = new XMLHttpRequest();
  req.overrideMimeType("text/xml");
} catch (e) {
  // for IE5+
  req = new ActiveXObject("Msxml2.XMLHTTP");
}
req.open("GET", "page.html",false);
req.send(null);

With overrideMimeType() Mozilla can fetch standard HTML pages, or just about anything the server would normally not return as text/xml. IE5+ doesn't seem to have a problem with non-XML formats; probably due to its not-a-bug-it's-a-feature behavior of ignoring mimetypes. The standard security restrictions still apply; you cannot do GET or POST requests to locations outside the current domain.

April 14, 2002

Mozilla SOAP to Google API?

Still waiting for someone to show me a Mozilla SOAP-to-Google demo. C'mon, I know you're out there!

Googlematic Returns

Ta da! Googlematic is a recently resurrected chatbot that uses the new Google API. (link via Paul Wright.)

Google API feature for Moveable Type

And check this out: Josh Cooper's Google API feature for Moveable Type. If you're not scared of hacking around deep inside the MT code, this hack allows you to return Google results into your weblog by adding a <$MTGoogleSearch$> tag to your template. You have to hard-code the query, though; I'd like to see that moved into an attribute, like <$MTGoogleSearch query="DHTML"$>.

Internet Explorer Margin Fix

Dave Schontzler has released an Internet Explorer Margin Fix script, which fixes the broken automatic horizontal margin handling in IE5.x and backwards-compatible-mode in IE6 for Windows.

April 12, 2002

Google Web API

A few weeks ago I mentioned how nice it would be if Google released an XML API. Prayer answered. People are already jumping on this, wiring everything in sight up to the API. Newer Mozilla builds have a SOAP interface, and IE has had XML/HTTP tools for awhile now, so it won't be long until someone Just Does It for the browser. Exciting, exciting. The first Web service really worth its salt, from a share-the-love standpoint. Quick, somebody hook this thing up to chatbot!

They Call The Wind Mariah

From Business 2.0's 101 Dumbest Moments in Business:

95. Having lured Mariah Carey with a $21 million signing bonus and an $80 million, five-album recording contract, EMI decides, after only one album, to pay her $28 million to go away. The net result: EMI pays $49 million for the soundtrack to Glitter.

Yeah, and it's MP3 piracy that's bringing the music industry down. Right.

April 11, 2002

Who Likes The CBDTPA? Nobody.

Who likes like CBDTPA? According to this article, nobody:

The Senate Judiciary Committee, which has also held hearings on the issue, has received more than 3,500 comments criticizing the bill, a spokeswoman said.

We haven't received one e-mail in support of the Hollings bill," said Judiciary Committee spokeswoman Mimi Devlin. "It seems like there's a groundswell of support from regular users."


Oh, those pesky regular users, always clamoring to be heard.

Mozilla Blogs

Two more Mozilla blogs: UI specialist Matthew Thomas' MPT (check out his top ten usability problems in Mozilla, and Dave Hyatt's Mozillian. (Latter link via Paul)

Testing For Undefined Values

Sometimes it's the simplest of things that are the most useful. For example, I found this tiny gem buried in some old code written by one of my employers:

function isUndefined(value)
{
  var undef;
  return value == undef;
}


This allows you to test if a value is truly undefined, as opposed to false or null (update: according to the JS 1.5 spec, null and undefined are considered equal). In most cases, the oft-used conditional if (!value) will return the same result for all three, which is not a clear indication if a value is undefined or not. A rather elegant solution, IMO, but certainly one of several approaches.

April 10, 2002

Glish Redesigns

Glish redesigns like a madman.

JSClass: Javascript interpreter

Dislike the fast, loose and forgiving structure of JavaScript? Bart Bizon's JSClass is a JS parser that allows you to write code in a more disciplined, Java-like syntax. Still in beta, the current version supports public, private and protected members, abstract and inner classes, decorators, and class inheritance and extension.

April 9, 2002

CSS High Pass Filter

Those of your wishing to keep your CSS free of browser-specific hacks may wish to check out Tantek Celik's CSS high pass filter. Tantek uses the same hack he invented for correcting IE5's box model and instead employs it to import advanced CSS files for browsers that support them, while keeping the original HTML and CSS hack-free.

Beehive: DHTML API

Beehive game: Scorched Earth Beehive game: Operation Beehive game: Pac Man Beehive is Peter Nederlof's slick new DHTML API. There's no documentation yet and only one widget script (a scrollbar) but check out the ton of games and examples availiable at the site. The core is only 15K, and supports IE4/5/6, NS4, and Mozilla on both Windows and Mac. Wicked cool design, too.

April 8, 2002

A Google SOAP API?

It's interesting to see the idea of a Google SOAP interface unfold. I often use Google data as an answer to "what does the Web know about topic X?" (as opposed to Daypop, which to me provides an answer to "what is the Web saying about topic X" and is weblog-weighted.) I wonder how an increase in usage of Google data in distributed applications (as opposed to click-on-the-link search returns) will affect the overall accuracy and relevance of the data itself? Will there be a way to feed this data back into Google?

More on Flash MX

My Flash XML extensions were posted over at Flash Blog, where a reader provided a link to these other Flash XML goodies. Hm, I gotta do better Google searches. On a similar note, here's a list of recently discovered bugs in Flash MX

April 6, 2002

Flash MX Tinkering

I've been messing around with Flash MX (gah!), mostly because I've been interested in it's new UI components and ability to load image and sound files dynamically (meaning you don't have to tear apart the .fla and spit out a new .swf every time you add a new sound or graphic, if you plan wisely). Three things:

1. There's some sort of bug that prevents Flash MX movies from closing the stream after a sound or image is downloaded. This isn't particularly noticeable on a broadband connection but apparently eats up dialup bandwidth. Phooey.

2. You can only load non-progressive JPEG files. Ugh! Who remembered to uncheck the little box in PhotoShop for the last four years? Double phooey.

3. The XML object is impressive and fun, but it lacks two of the most needed methods for traversing an XML document, namely getElementById() and getElementsByTagName(). No worries, though; because ActionScript is nearly identical to JavaScript (they're both ECMA-compliant now), I wrote my own methods. Download this file and include it in your Flash movie with #include "flashxm_domext.as" and you'll be able to grab the nodes you want without resorting to "myXML.firstChild.childNodes[3].lastChild.nodeValue" or other such silliness.

Unfortunately, it is the first two showstoppers that keep me from unleashing my latest work upon an unsuspecting world. It is truly a shame that browser developers couldn't get their heads together to create a consistent method for scriptable sound in Web pages; instead, we're left with a witch's brew of broken LiveConnect, OBJECT tags and malicious BGSOUND. Really, what was so hard about var x = new Sound("my_music.mp3")? It's one of the few things Flash MX got right. Now let's see if they fix their bugs.

April 5, 2002

OddPost: DHTML Driven Web Mail

OddPost is a totally kickin' web-based email client that uses an incredible high-octane DHTML interface. Drawback: only works on IE5+ on Windows. Also allows you grab mail from other accounts outside of OddPost. (Dave has posted a screenshot here.) Reminds me a lot of the discussion boards at WebFX. Stuff like this really gives oomph to the concept of browser-as-application-platform.

MacIE SCRIPT Solution

Stewart finds a solution to his MacIE scripting problem, submitted by Michael Bystrom.

April 4, 2002

DHTML Interfaces: Taking The Next Step

NetWindows proprietor Alex Russell demonstrates how to do component-based DHTML interfaces in this DevX article, DHTML Interfaces: Taking The Next Step.

Scripting SCRIPT in MacIE5

Stewart learns the sad truth: the SRC attribute of a SCRIPT element is read-only in IE5 Mac. I can personally attest that no easy workaround exists that doesn't involve help from the server at some point. I suppose it's possible to sniff for MacIE at the server level, and return the JavaScript source file as text/html into an IFRAME element. Then, pull out the JS-as-text from the IFRAME's innerHTML, then evaluate it with execScript(), which is a lot like eval() but allows you to specify another language, like VBScript. Anyone more ambitious than I want to try this out?

April 2, 2002

IE6 Dialog Helper

Whoa. IE6 has a JavaScript method called ChooseColorDlg() that opens the system color-selection dialog box. This method is a member of a global object called the Dialog Helper, which also has a fonts collection containing a list of all system-supported fonts. (You have to use the OBJECT tag to instantiate a Dialog Helper object.)

Lileks on Blogs vs. Journalism

Humorist James Lileks has written the best-ever defense of weblogs-as-journalism.

For a print columnist who writes, oh, say, twice a week to sniff at those who pump out ten tons of spirited commentary for free reminds me of some baggy-pants third-rate vaudevillian rolling his eyes at the people streaming into a nickelodeon. Oh, sure, they have moving pictures of a train robbery, but nothing beats a pie in the face.

April 1, 2002

Metadata Field in Moveable Type

My Google It! links don't use post titles anymore; I hacked my copy of Moveable Type to include a new field for each entry, called "Metadata," which is used instead (I talked about this before). Bottom line: it's really hard to come up with readable post titles that also serve as good search terms. Adding a new field to MT is no picnic unless you're very familiar with the MT API, which I haven't got a full grip on myself, so I recommend using <$MTEntryExcerpt$>, assuming you're not using it already.

DHTML Experiments

Paul points us to three new DHTML experiments at i.am/bald. It's good to see that some people are still having fun with this stuff.

CBDTPA: A Law Against Purse-Snatching

O'Reilly's Andy Oram compares the CBDTPA to a silly purse-snatching law:

Let's say there was a rash of thieves riding by women on bicycles or scooters and snatching purses. So the federal government passes a law saying that no transportation device may be manufactured or sold unless it incorporates protection against purse snatching.

That may sound ridiculous, because nobody knows how to design a bicycle or scooter that can foil purse snatching. But the situation is the same with computers under the CBDTPA


Sen. Patrick Leahy has said he would oppose the CBDTPA. This is good; Leahy is the Senate Judiciary committee chairman, which has jurisdiction over this bill.