tags:

views:

466

answers:

4

This is new to me as a desktop developer.

If I could figure out how this is accomplished, it may be relevant to some research I'm doing, specifically how to migrate thick desktop apps to a web implementation.

The more forms-oriented and lightweight graphics I can figure out, but heavyweight 3D graphics still requires some form of non-browser application.

As nearly as I can determine, iTunes installs some form of new protocol handler on my machine, corresponding to "itms", in place of "http".

This is cool and mysterious to me, almost magical. Any help or suggestions for additional reading materials and/or resources would be very welcome.

+5  A: 

Simple.

<a href="itunes:///">Open iTunes</a>

Most apps now-a-days have "Custom URL Schemes" For Example - Coda (http://panic.com/coda) you can add snippets of code via:

<a href="codaclips:///<<**Title:NAME**>>blabla">Add Clip</a>
tarnfeld
Thanks for the info. Now I have to delve into protocol handlers and how to create them. Any suggestions?
kmontgom
for your own app?
tarnfeld
Yes. As I said, much of the functionality can be accomodated directly in the browser via HTML/AJAX or Flex or Silverlight. Its the heavy duty graphics that probably cannot be. In this case, I want to launch a separate, pre-installed application which specifically handles the 3D stuff. By heavy-duty I mean tens of millions of vertices, and millions of quads/triangles.
kmontgom
ah i see.... i dont know much about windows development...
tarnfeld
+4  A: 

You can register "protocol handlers" with some browsers. I think there's a place in the operating system where you can regsiter your own.

See

Creating new ones in firefox: http://ajaxian.com/archives/creating-custom-protocol-handlers-with-html-5-and-firefox

In safari: http://discussions.apple.com/thread.jspa?threadID=1280989

Special "mobile protocol handlers" are used extensively in the iPhone/iPod to launch the phone dialler, email sending, google maps and so on... http://www.iphonedevfaq.com/index.php?title=Protocols

Here's an example of how to reconfigure the mailto: protocol handler to trigger gmail rather than an external mail client: http://lifehacker.com/392287/set-firefox-3-to-launch-gmail-for-mailto-links

cartoonfox
Thanks! I'm researching the links right now.
kmontgom
cartoonfox
+1  A: 

In Windows this is called a Pluggable Protocol Handler. This article on CodeProject shows how to implement a pluggable protocol handler on Windows.

Note, this is more involved then just registering a new protocol in the registry, such as myprotocol:// and having it start a specific exe whenever a myprotocol:// anchor is clicked.

It actually allows your application to receive and process the request and to create response data dynamically. If your protocol will also be called programmatically this is usually important.

This may be overkill for your situation however it is handy to know about.

Ash
A: 

Just a follow-up for those who answered.

Turns out that the situation is somewhat complicated. Although about:config is available for FireFox, making the appropriate entries just doesn't work.

This link: http://support.mozilla.com/tiki-view%5Fforum%5Fthread.php?locale=fr&amp;forumId=1&amp;comments%5FparentId=74068 describes problems for Linux, but I can verify that the same problems also occur under Windows.

To make this work under Windows, I had to create a .REG file which contains the appropriate information, according to this link: http://kb.mozillazine.org/Register%5Fprotocol#Windows

Now it works!

Thanks for all the responses.

kmontgom