Klipfolio. The KPI Dashboard - Evolved
The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Klip Developer Guide

Table of Contents

4.3. Remotely Upgrading Your Klip

You will recall from chapter 2 the following two XML parameters that are used by the application:

  • <kliplocation>

  • <version>

Every four days or so if the dashboard is continuing to run, and every time it restarts, Klipfolio Dashboard checks <kliplocation> for each Klip and downloads the Klip at this location to a temporary folder. It then compares the <version> of the downloaded Klip with that of the current Klip and prompts you to upgrade the Klip if the versions are different. If you accept, the downloaded Klip replaces the current Klip.

[Note]Note

The application simply checks the value of the <version> of the Klip at the kliplocation against that of the Klip on the local drive in the %appdata%\Klipfolio Dashboard\myklips folder in which all your Klips are located. If the values are different, the Klip will be upgraded. Therefore, it is important to always keep only the latest version of the Klip or no copy of it at all at the kliplocation.

Let's go through an example to show how the upgrades work.

  1. Add a new blank Klip and paste the following into it.

    <klip>
      <identity>
        <version>
           1.0a
        </version>
      </identity>
    
      <locations>
        <contentsource>
           http://news.com.com/2547-1_3-0-5.xml
        </contentsource>
        <kliplocation>
          http://www.klipfolio.com/static/klips/devguide/upgrade.klip
        </kliplocation>		
      </locations>
    </klip>
                    
  2. Rename the file as upgrade.klip.

    Figure 4.1. upgrade.klip

    upgrade.klip
  3. Observe that the Klip is using a default icon.

  4. Open the Klip's Customize window and go to the About tab.

    Figure 4.2. About Tab of upgrade.klip

    About Tab of upgrade.klip
  5. Observe that the version of this Klip is 1.0a and that the banner is also a default one.

  6. Open Klipfolio Dashboard's Options window and click the Klips tab.

  7. Click Check Now.

    Figure 4.3. Klips Tab under Options Window

    Klips Tab under Options Window

    Klipfolio Dashboard goes to http://www.klipfolio.com/static/klips/devguide/upgrade.klip and downloads the Klip at this location to a temporary directory. In this case, the <version> of this Klip is 1.0b. This is different from the current version, 1.0a, so Klipfolio Dashboard will prompt you to upgrade.

    Figure 4.4. Klip Upgrade Utility

    Klip Upgrade Utility
  8. Click Upgrade Now.

The upgraded Klip appears, and it has a Klip icon in the upper-left corner.

Figure 4.5. Upgraded upgrade.klip

Upgraded upgrade.klip

You can confirm that you are running the new version of the Klip by clicking the About tab in the Klip's Customize Klip window. The version now reads 1.0b:

Figure 4.6. About Tab of the Upgraded upgrade.klip

About Tab of the Upgraded upgrade.klip

You can also confirm the upgrade worked by checking the source. You will see updated entries for <title>, <version>, and <refresh>:

            
<klip>
  <identity>
    <title>
       My First Klip (upgraded)
    </title>
    <version>
       1.0b
    </version>
  </identity>

  <locations>
    <contentsource>
       http://news.com.com/2547-1_3-0-5.xml
    </contentsource>
    <icon>
       http://www.klipfolio.com/static/klips/klipfolio/sample_icon.png
    <banner>
       http://www.klipfolio.com/static/klips/klipfolio/sample_banner.png  
    </banner>
    <kliplocation>
      http://www.klipfolio.com/static/klips/devguide/upgrade.klip
    </kliplocation>	
  </locations>

  <setup>
    <refresh>
       60
    </refresh>
  </setup>
</klip>