Monday, September 26, 2011

Accelerator Development for Internet Explorer 8+


Introduction
Internet Explorer accelerators are the contextual services available in browser. Arrow Icon appears when you selection some text or image on anything. Click on this icon to get list of all the available accelerators in your browser.  Select or hover any available accelerator to avail the facilities provided by that accelerator.
To manage accelerators click ’Tools’ menu and select ‘Manage Add-Ons’ and then in accelerators tab. You can delete, disable or set as a default according to the usability of that accelerator.
Development
Building an accelerator is just defining a simple XML based on the Open Service specifications. Pages defined for the service can be any language which is able to make HTTP (GET, POST) calls to fetch the desired data over network. Data can be fetched from anywhere; whether it is a remote database or any online service i.e. Google, Yahoo etc.


<?xml version="1.0" encoding="UTF-8"?>
<openServiceDescription xmlns="http://www.microsoft.com/schemas/openservicedescription/1.0">
  <homepageUrl>http://accelerators.myDomain.com</homepageUrl>
  <display>
    <name>My Doamin Title</name>
    <icon>http://accelerators.myDomain.com/favicon.ico</icon>
  </display>
  <activity category="search">
    <activityAction context="selection">
     
<preview action="http:// accelerators.myDomain.com/preview.jsp">
        <parameter name="selection" value="{selection}"/>
        <parameter name="clean" value="true"/>
        <parameter name="w" value="320"/>
        <parameter name="h" value="240"/>
</preview>

      <execute action="http:// accelerators.myDomain.com/index.jsp">
        <parameter name="selection" value="{selection}" type="text"/>
      </execute>
    </activityAction>
  </activity>
</openServiceDescription>


Deployment
Put this xml file in your path of your application domain. Define the pages like index.jsp and preview.jsp which calls network services/ databases to provide the information to users.
In the home page of your domain add some means to add your accelerators. Simply add a button to call window.external.AddService on click of the button, or a hyperlink to call this method.

onclick="window.external.AddService(‘http://accelerators.myDomain.com/accelerator.xml’)"


Installation
On click on the button you shall get following popup asking for permission to install the new accelerator in your browser.

Click on the Add button to install this accelerator in your browser.  To manage accelerators click ’Tools’ menu and select ‘Manage Add-Ons’ and then in accelerators tab. You can delete, disable or set as a default according to the usability of that accelerator

No comments:

Post a Comment