Oh and dissected URL matching is in...
Kevin Ballard
kevin at sb.org
Tue Sep 13 02:02:48 EDT 2005
On Sep 13, 2005, at 1:04 AM, why the lucky stiff wrote:
> I've merged the stuff. And I'm going to the crappiest thing I can
> do right now. I'm going to totally change it all. It's rotten and
> I hate myself right now. I hope you will all join with me in
> hating me.
Go ahead and change it, as long as you make it better :)
> The thing is: most people are going to want to use the register_url
> stuff to do cross-domain Ajax. Adding resources to the site is
> important as well, yes.
I agree that cross-domain AJAX is the primary purpose.
> I just think that if a guygal is writing a user script for Google
> that adds Yahoo search results, it's confusing to have to register
> "http://google.com/.mouseHole/yahoo.com".
What else would you register? It has to be accessible from the source
domain, which means it needs to be a google.com URL.
> In addition, it seems like a registered URL should be available
> wherever the script runs.
>
> And, in the Javascript, the guygal should be given a bit of
> convenient JS so that calls to "http://yahoo.com" will be
> translated to the registered URL.
Easy enough to do.
register_url(:path => 'yahoo.com/google_aggregation') { |uri,req,res|
do_stuff() }
The only problem with making it available everywhere is then you have
the potential for name conflicts. An appropriate solution might be to
give all scripts namespaces (and I don't mean the email address
namespace we seem to be using right now - I mean a unique name for
each script. Could be taken from the filename, but I think it should
be declared in the script), and have register_url instead simply take
a resource name, and you would then access that through http://
any.domain.com/.mouseHole/identifier/resource_name. And then we could
do the JavaScript voodoo that hides the details about the URL from
the user.
--
Kevin Ballard
kevin at sb.org
http://www.tildesoft.com
http://kevin.sb.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2378 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/mousehole-scripters/attachments/20050913/91e17217/smime.bin
More information about the Mousehole-scripters
mailing list