Home » Blog

 
 

January 28, 2009

Using the Clearspring In-Widget API: Quick Steps

Categories: Clearspring, Consulting, Development, Flash, Widgets — admin at 4:18 pm

Clearspring_logo
There seems to be a lot of confusion about how to get Clearspring integrated into your widget using the In-Widget API model (which is the only way to go if you developing a ‘professional widget’). I decided to outline the basic steps involved

Adding a Widget:
First you will need to create a Clearspring widget (this assumes you have already created your Clearspring account).

  1. Click Add Widget.
  2. You will be given 3 options: In My Widget, On My Webpage and Using the In-Widget API. Select Using the In-Widget API.
  3. Enter the informaton for your widget including its name, code type, sharing menu type, colors, sizes and other options.
  4. For Share menu you want to choose Default Menu or Just Tracking
  5. Under What Do you Want to Share enter the embed HTML for your widget
  6. Next, Clearspring will provide you with some sample code for your widget (under Grab your Launchpad advanced code!). The sample code isn’t the most intuitive but its a good start. I will try and share some “actual” code you can use in a future post.

Editing A Widget:
Now you can further customize/edit your widget. The primary tabs you’ll work with are:

  1. Template Content
    This allows you to modify the HTML embed content that is generated when user’s share your widget. This is the same content you entered above in the What Do you Want to Share section.
  2. Library Code
    This is were you can get the code (AS3, AS2 or Javascript) for your widget. This should be the same code generate at the end of the Adding a Widget process.
  3. The rest of the tabs can generally be safetly ignored unless you want your widget to appear/live on the Clearspring site.

Modifying for Flash/Action Script Code:
There are 4 steps involved in actually implement Clearspring sharing and tracking within your widget.

  1. Imports
    You need to make sure you have correct imports at the top of your code. Common mistake is to forget this step.
  2. Initialization
    You need to initialize the Clearspring Flash API before you can do anything with it. Go head and initialize it in your Flash code. Hopefully you can figure out how to do this using the sample code.
  3. Share Menu
    To call the share menu, you’ll need to create a share button, attach a click event to it, and add a click function that looks something like this:

    function on_share_click(event:MouseEvent):void
    {
    kernel.menu.show();
    kernel.track.event('ClearSpring Share'); // custom event
    };
  4. Tracking
    When ever you need to track something simple use: kernel.track.event(YOUR_EVENT_NAME_HERE);

Easier said than done but hopefully this provides a good start and helps you avoid some of the common mistakes (choosing the wrong model, working in the wrong tabs, missing a key step) that many of the folks we do Clearspring widget consulting run into!

Sphere: Related Content

June 30, 2008

Rapid Widget Development?

Categories: Clearspring, Consulting, Development, Flash, Gigya, Widgetbox, Widgets — admin at 1:11 am

I have always been a big fan of Rapid Application Development (RAD). Wikipedia defines RAD as:

…the term and its acronym have come to be used in a broader, generic sense that encompasses a variety of techniques aimed at speeding application development, such as the use of web application frameworks and other types of software frameworks.

In the past, the key to a lot of rapid application development has been the use of software frameworks or toolkits. Unfortunately these types of frameworks are sadly missing when it comes to widget development.

Recent entrants in the space have failed to deliver compelling widget RAD solutions for a variety of reasons. First and foremost, most of them (such as WidgetBox and ClearSpring) are marketplaces or distribution plays and have no real intention at being or becoming a toolkit! Although both WidgetBox and ClearSpring have things such as “Facebook App Generators” or accelerators, these simply try and stuff existing Flash-based widgets into new social networking platforms and are not toolkits per se. Others like KickApps see themselves as hosted, white-label platforms! The closest thing to a widget toolkit is probably Sprout Builder, but its feature set has limitations, some find that its “development” environment is complex, and users have no control over the memory footprint or branding.

In general, here are some problems with many of today widget toolkits:

  • Branding: Most toolkits (as well as “wrappers” from WidgetBox, ClearSpring and Sprout) have mandatory branding (that promotes their service) which cannot be removed.
  • Size: Even if you can live with someone else’s branding, anything that is “general purpose” tends to be very large, and on the Internet size matters! I remember a recent client that tried to build a widget using one of the toolkits only to find that they had created a 500KB monster. We were able to recreate the same widget in 50KB!
  • Cost: But wait a minute, you say, these toolkits are FREE! Unless you don’t put any value on your own time, then yes, is all free. Unfortunately the client I mentioned above had invested over 20 hours in the exercise, only to find out it didn’t meet their needs, and this does not take into account potential future support cost!
  • Integration: None of the toolkits that I know of support any deep integration (other than an simple RSS feed) with client or third-party API’s.
  • Tracking: Although a growing number of “toolkit” provider are starting to provide some support for traffic reports and analytics, this support is limited and cannot be customized or integrated with a customers existing reporting system.
  • Support: Actually, the lack thereof. As you can imagine, most “free” toolkits do not come with support.

So what’s the alternative? At Metablocks, we build custom widgets to exacting brand, size and platform requirements. We have our own “internal toolkits” that speed up the process when it comes to things like XML communication, tracking and user interaction, but these are small and agile software frameworks that bring no extra “weight” (or wait) to the project. Obviously many of the things we do, cannot be duplicated with a general purpose toolkit. Thing like two-way communication (even within social networks), custom tracking and reporting, advanced video and audio support to name just a few. In addition, if something goes wrong, there is always someone there to fix it. If you have tried a general purpose toolkit and are less than pleased with the results, please give us a call!

Once you have a custom widget that works, THEN you can a marketplace like WidgetBox to distribute it. Remember that most of these companies (like WidgetBox and ClearSpring) are trying to solve a distribution problem, not a development or design problem!

Tags: , , , ,

Sphere: Related Content