Cocoa : Objective-C, Cocoa and various other Mac related technical notes. Mainly notes for myself.
Updated: 4/4/03; 12:29:46 AM.

 

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Tuesday, December 3, 2002

There's some talk of Sherlock Channel dev in http://apple.slashdot.org today.

Seeing as I've pretty much finished off the Canada411 channel - here's my not-so-uninformed 2 bits:

First off - the mailing list is where you should go if you want to get anything done.

The documentation for Sherlock is handy, but it is by no means complete. The nice thing with the mailing lists is that actual engineers from Apple are there and they do respond.

The SDK itself is ... pretty awful.

I can do some neat things with it since it does support web standards, but there is no decent way of debugging your code. If you make the slightest syntax error, your function or trigger code will not execute at all. No error, just an effective no-op.

The bright side is that since it does support XPath/XQuery, you don't need to write too much code, but hey - functions that don't run at all are not pleasant.

It means you can't write very much code without getting scared and then wanting to test right away. Mind you - this may be some twisted way of enforcing religious testing. I just don't like it.

Having to code in JavaScript and XQuery is a pain. I would have liked to see something more like Python or Ruby used as the scripting language- both are built into OS X anyway.

Thread support is awkward at best in the current SDK.

All threads are implicitly executed on the developers behalf, you just say I want to notify trigger "x, y and z" and then the runtime fires off 3 threads to run those triggers concurrently.

The upside is that you don't worry too much about synchronization and dead lock.

The downside is that you have very little control if you know what you're doing. For example, it would be nice to be able to fire N threads and retrieve N webpages back from a target server.

The problem with trigger notification method is that the only thing you can do is:

DataStore.Notify("DATA.action.myTrigger");

That's just not good enough. Sometimes you want to pass state information in the message. You just can't do it using the current SDK.

That said, there are a lot of good things going for Sherlock.

1. Standards

It uses XPath and XQuery. Proper W3C standards so the things you learn aren't proprietary and ill thought out (or at least not horrendous)

2. Autoupdates

Anything I deploy in Sherlock is automagically updated on the client side if I update the server. This is nice - just like Java applets.

3. An active live community.

The sherlock-channel-de mailing lists that apple hosts actually has people who know what they are doing and can respond to most questions. It's hard to describe, but the Mac community 'feels' like the Python community. People actually like to help each other out.

That's it for now.
2:13:41 PM    


A picture named Canadian411_Little.gif

Ooh... Kelly Thompson just gave me a swanky new icon for the 411 channel.

I also fixed that niggling bug with 'enter' not triggering a search.
1:53:30 PM    


Same place as always:

sherlock://homepage.mac.com/vng1/Canada411/SherlockChannel.xml?action=add

New stuff:

  • Inlined images with zoom from Mapquest
  • English and French localization
  • Double click now opens Canada411 to show full address information
  • Proper error handling when the Bell server is overloaded.
  • Record counts come back much faster now

This will probably be the last release of the Canada411 Channel. It works 'good enough' for me that I don't have an interest in making it any better.

You can find the full source code and english/french NIB files here: http://homepage.mac.com/vng1 under the 'Source Code' section of my homepage.

All code is released under the GPL.

There is currently one big bug in the program - the directions don't quite work. I have the code to fetch the directions page, and to rip out the directions, distance and the ETA times from mapquest, but I can't figure out how to skip over 'dead' space in a table.

If you feel like hacking up my code, go ahead.
12:23:19 PM    


© Copyright 2003 Victor Ng.



Click here to visit the Radio UserLand website.

 


December 2002
Sun Mon Tue Wed Thu Fri Sat
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31        
Nov   Jan