Search Logger
Archives for December, 2009.

Archive for December, 2009

Accelerator Creation Guide

4:37 pm - December 23, 2009 in IEBlog

Introduction

There are a lot of really cool services out there, and I think a lot of them would fit in really well with Accelerators. But even though there’s a lot of value to be had in creating Accelerators, I don’t think we’ve ever had a blog post explaining a step-by-step process for how to do it. I’m hoping this post will help with that.

I’ve been working on the feature for a while, so I’ve come up with some tips and best practices that have helped me become more efficient in building Accelerators. There are also a few mistakes I’ve seen (and made!) over and over again, so I’ll talk about those in the hope of making the development process a bit easier for everyone else out there.

Building an Accelerator

Accelerators streamline the common copy-navigate-paste operation by enabling users to send selected content from the current webpage to one of their favorite services. Fortunately, even though the feature is quite powerful, it’s actually quite easy to write code that uses it. Here’s a step-by-step guide for creating a simple Accelerator.

First, I’ve put up an Accelerator template, with sample information pre-loaded. All you need to do is swap out the sample information for yours. Note that you don’t need to be the service provider to build an accelerator that interacts with a service. If you can find the following information, then you can build an accelerator for virtually any service you want.

Here are the steps:

  1. First, choose a <homepageUrl> for your Accelerator. This is an important field—all the other URLs in the manifest need to match its domain. Generally speaking, the top-level domain for your service is a good choice.

    Example:  <homepageUrl>http://www.example.com</homepageUrl>

  2. Fill in the absolute path to your favicon into the <icon> field. One trick for doing so: right-click on the service page, view the source, and then search for an .ico file.

    Example:  <icon>http://www.example.com/favicon.ico</icon>

  3. Under the <display> node, choose a <name> that’s descriptive of your service, while under 50 characters. We recommend that the name include the Accelerator category followed by the name of the service provider.

    <display>
    <name>Act with Example.com</name>
    </display>

  4. Choose a “category” attribute for the <activity> field. I have another post on categories, but here are the ones we recommend:
    • Blog - A blog service that creates a new blog post based on a link or user-selection
    • Bookmark - A service adds a link to the user's personal bookmarks on the web
    • Define - A service that provides definitions based on a selection
    • Email - A service that provides email communication that can create a new email message
    • Find - service that finds related content within the scope of the site
    • Map - A service that provides map locations based on user-selection
    • Send - A service that converts web data into application data
    • Share – A service that shares a link (with optional comments) with the site community or network
    • Translate - A service that translates the current webpage or user-selection from one language to another

    Choosing a descriptive category is important for how Accelerators are grouped in the accelerator menu, and enables users to understand what your Accelerator will do before even experimenting with it.

  5. Choose which contexts you want your Accelerator operate on—“selection”, “link”, and/or “document”—and then add them as attributes to one or more <ActivityAction> elements. For example:

    <activityAction context="selection"> … </activityAction>

    The link and document contexts could probably use a little extra explanation. The link context is activated when a user right-clicks on a link and then executes an accelerator from the resulting context menu. Similarly, the document context is activated when the user right-clicks on the page itself and uses the context menu, or goes to the Page menu and executes something under the “All Accelerators” submenu.

  6. Next, fill in the “action” attribute of the <execute> element with the URL of the service you want to use. See the section below regarding variables to find out how to pass data into your service.
    Example:  <execute action="http://example.com/default.aspx?sel={selection}&amp;src=IE8">
  7. Preview windows are a great way of delivering the output of a service to users as part of a more inline browsing experience—it’s also a great way of enticing them to visit a service’s home page.

    You can add a preview window via the <preview> element. I’ve written a section about preview below.

    Example:  <preview action="http://example.com/default.aspx?sel={selection}&amp;src=IE8">

The sections that follow provide some more in-depth specifics about the steps above.

Variables

IE exposes a number of variables for use with Accelerators. Here’s a list of the most commonly used variables:

  • {selection} - the user selection within the webpage. Only available in selection context.
  • {documentUrl} - the URL of the webpage where the Accelerator is invoked.
  • {documentTitle} - represents the title of the webpage where the Accelerator is invoked.
  • {link} - the URL of the user selected URL.
  • {linkText} - the text of the user selected URL.

A full list of variables is available here.

There are two methods of passing these variables to a service through an Accelerator. The first is through the query string:

<execute action=”http://www.example.com/script.aspx?foo=bar”>

The second is through one or more <parameter> tags:

<execute action=”http://www.example.com/script.aspx”>

<parameter name=”foo” value=”bar” />

</execute>

Note that using a <parameter> element is the only way to insert data into the body of the HTTP request. You can use POST with a parameterized query string, as well, but any parameters you pass will show up in the URL. You can specify a GET or POST request via the “method” attribute of the <activityAction> element.

Adding Preview

Preview is probably the most visible feature of Accelerators, and one of the most useful when implemented effectively.

Accelerator previews occupy a window of size 320x240 pixels. Given this, most Accelerators that use it create a special preview page for displaying it.

The key to an effective preview is returning the most relevant information possible based on the information sent by the user, then making sure it fits in the space provided by the preview window.

The Bing Maps Accelerator, for example, maps the location of a selected address using its own UI, scaled down to 320x240:

<preview method="get" action="http://www.bing.com/maps/geotager.aspx">
<parameter name="b" value="{selection}" />
<parameter name="clean" value="true" />
<parameter name="w" value="320" />
<parameter name="h" value="240" />
<parameter name="client" value="ie" />
<parameter name="format" value="full" />
</preview>

Note that you can pass variables to the preview window the same way you can for execution. For example, the Accelerator above uses {selection}.

Another handy rule of thumb is load time—if it takes your preview window takes more than half a second to load, you probably have too much in it, from a user experience perspective.

One trick that you might find useful involves using the mobile version of a service for a preview window. We deliberately sized the preview window to be compatible with mobile services.

Testing your Accelerator

Once you’re done building your Accelerator, it’s time to test it out. We have a Javascript API for installation. Some code like the following will create a link that brings up the Accelerator installation dialog:

<a href=”javascript:window.external.addService(‘myAccelerator.xml’)”>Install me</a>

In order for this to work, you’ll need a live web server—trying to open the link from a page on your local hard drive will result in an error. Any kind of local server will work fine, though—you can use Visual Studio’s ASP.NET server without issue, for example.

If everything goes well, you’ll see the normal Accelerator installation dialog. If it doesn’t, you’ll see something like this:

Accelerator could not be installed dialog.

Whenever I see this dialog, there are a couple of mistakes that very frequently turn out to be the culprits.

Encoded Characters

The first has to do with XML itself. When dealing with query strings, it’s very common to pass in multiple arguments using the ampersand character. Unfortunately, this is a reserved character in XML, so using it as a literal in a query string will raise an error. Instead, you’ll need to escape it with “&amp;”, like this:

<execute action=”http://www.microsoft.com/testscript.aspx?foo=test&amp;bar=test”>

Matching Domain Requirement

The second has to do with the <homepageUrl> tag. To properly identify a service, we require that the URLs specified in <homepageUrl>, the action attribute of <execute>, and the action attribute of <preview> all share the same domain. If this isn’t the case, an error is raised.

Test Cases

Once you can install your Accelerator, there are a few scenarios you should definitely test, since they tend to break for a lot of the Accelerators already out there:

  • Blank content – what happens when blank content is sent to your service? Do you have a graceful error message in place?
  • Multi-line content – does your service handle line-breaks the way you think it will? You may want to make sure you parse for the carriage return-line feed sequence (“%0d%0a” in URL encoding) and replace it with something appropriate, like a space.
  • Script – Some user selection may have JavaScript associated with it. If you specify HTML selection, then your service should be filtering this script on the server for security reasons.
  • Large selections – Accelerators truncate GET requests at 2048 characters. If you’d like your accelerator to be able to handle more data, you might consider using POST.

Next Steps and Conclusion

Once you have a cool Accelerator built, feel free to upload it to the IE Gallery. It’s a great way to gain more exposure for your Accelerator and your service.

I hope this post was helpful in creating Accelerators. If you have any feedback on this post, any thoughts on Accelerators in general, or any cool creations you’d like to share, feel free to leave a comment.

Thanks!
Jon Seitel
Program Manager

 

Crockford on JavaScript: A Public Lecture Series at Yahoo!

11:59 am - December 22, 2009 in Yahoo! User Interface Blog

Crockford on JavaScript

Since 2007, Douglas Crockford has been developing (and delivering) a lecture series on the JavaScript programming language. Many of those lectures have been recorded and made available as part of the YUI Theater video series. Douglas has delivered many of the talks at conferences around the world.

In the first few months of 2010, Douglas will be delivering the full series of JavaScript talks with updated content as part of an event entitled “Crockford on JavaScript”. The event will take place over five evenings in January, February, and March at Yahoo! headquarters in Sunnyvale, CA. Attendance is free, but seating is limited — a full schedule including links to RSVP is available on the event website.

Thanks to YUI engineer Allen Rabinovich for the poster design.

 

iPhone Design Stencils in the Pattern Library

5:11 pm - December 17, 2009 in Yahoo! User Interface Blog

stonyInteraction designer and prototyper Chris Stone recently volunteered to adapt the iPhone stencils in our OmniGraffle based stencil kit in the Yahoo! Design Pattern Library and optimize them for use in Adobe InDesign. Chris is starting a new gig at Pulse Energy in Jan 2010 but these templates were created during his tenure as the lead UXD Nitobi Software in Vancouver.

Can you describe the stencils you contributed, why you made them, and what you personally use them for?

id_iphoneI created a customizable, vector-based iPhone stencil library for InDesign. They came about as a result of several conversations that ultimately culminated with the creation of this stencil.

I co-lead the Vancouver chapter of the IxDA and one of the conversations that I’ve been interested in discussing with the group is “What is open source UX and is it possible?”. It’s a tricky topic to define, and the more I think about it, the more I am of the opinion that open sourcing tools is the first place to start, rather than focusing on definitions. I figure that the best thing you can do is to put tools in designers’ hands and let them create, so that’s exactly what I did.

iphone-protoMeanwhile, while pondering the Open Source UX question I was working on an iPhone app for a client and really wanted to use the newly discovered “interactivity” features buried in the depths of an InDesign workspace in hopes of a new path to generating rapid, clickable prototypes. So, I nabbed the PDF that you posted and started building out the InDesign snippets with customizable gradients rather than repeating, or stretched screen captures that I’ve seen used. I wanted to provide every Interaction Designer/UX Designer out there that uses InDesign with an option to use their preferred application for creating iPhone app layouts and designs if necessary.

You can find more details on this process in a blog post i have written called Lightweight Prototyping with InDesign.

Can you discuss how these differ from the Eightshapes adaptation of the Yahoo! stencil kit (since both are used in InDesign)?

Basically, I wanted to customize the PDF that you had already provided using the same level of fidelity as in the Illustrator version. I realized that it was a compilation of repeating images, rather than complete, editable vectors.

That said, I was making a move back to InDesign from OmniGraffle and saw it as an opportunity to create a higher-fidelity iPhone stencil for wireframing, prototyping, and quickly skinning an app to play with differences in look and feel, and to enable you to move that much further with InDesign.

The 8Shapes stencil doesn’t have the default gradients or some of the other interaction elements that I wanted to use in my wires (key/num pad, list select tumbler, etc.). That said, I didn’t create icons to the same extent that they did. I basically mimicked what was in the existing Yahoo! stencil.

I would love to add more to it eventually when I have time. I like having the option of removing the gradient if need be for basic wireframing yet have them readily available for quick mockups. I think they’re a good complement to each other depending on your use case.

What else would you see in the pattern library?

I’d love to see the Yahoo stencils in higher fidelity, much like the iPhone stencil, therefore on par with the OmniGraffle fidelity.

A general library on gesture based patterns would also be quite useful.

 

Recap of Add-on-Con

5:10 pm - December 17, 2009 in IEBlog

We’ve just returned from Add-on-Con, an annual conference for browser add-on developers held at the Computer History Museum in Mountain View California. The add-on development community is an entrepreneurial bunch of people and it’s exciting to hear about what they’re working on. Herman Ng, Christopher Griffin, and I were there to present and chat with people. Matt Crowley was also in town so he was able to stop by for part of the day.

Herman spoke about best practices to improve reliability and performance. This topic really resonated with the audience. It’s clear developers want to deliver a great experience to customers by building cool features, having great reliability and performance, and getting exposure in the IE Add-on gallery. Based on the amount of interest we saw, Herman will be reworking his presentation into a series of blog posts starting early next year. So you don’t have to wait, I’ll give you two of Herman’s quick tips for add-on developers now.

  1. Get crash reports for your add-on from Windows Quality Online Services (Winqual). This is a great resource for discovering and debugging crashes in your product.
  2. Post your add-on to the IE Add-on gallery. Developers click “join” and then click on your username to upload add-ons.

My presentation covered how to build Webslices (msdn), Accelerators (msdn), and Search Providers (msdn). These extensions are a great way to connect your customers with your services without the risk of introducing performance or reliability problems. You can also build and deliver them with a little bit of XML and markup so you can connect users with your site or service in hours rather than weeks.

Thanks to everyone at OneRiot, GetGlue, and YooNo for organizing such a great event!

Paul Cutsinger
Principal Program Manager
Internet Explorer

 

Job Opening on the Yahoo! Sports team

4:16 pm - December 17, 2009 in Yahoo! User Interface Blog

Yahoo! Sports has reached 36 million unique visitors per month and dominates the Online Sports and Fantasy Sports industry worldwide. The site’s recipe for success: high quality content presented via rich and standard-compliant interfaces.

The Y! Sports experience is so engaging, users view over 2 billion pages per month — more than Fox, SI, and CBS Sports combined! To meet such high demands, Y! Sports stays at the forefront of Internet technologies by leveraging platforms such as YUI.

If you consider yourself an avid YUI user, the kind that can look under a component’s hood and start adding quality features, you’re well on your way to joining their team.

Email your resume, including portfolio URLs, to mediatech-hiring /at/ yahoo /dash/ inc /dot/ com (Principals only; no recruiters, please.) or find out more about the position.

 

Blogger integrates with Amazon Associates

5:37 pm - December 16, 2009 in Blogger Buzz
Earlier this year we simplified the process for monetizing your blog by adding a “Monetize” tab in the Blogger app. We started with AdSense, which allows you to add contextual advertising to your pages; more recently we added AdSense for Feeds to help you generate revenue from the distribution of your blog via RSS and Atom. Today we launched a third option: direct integration with Amazon Associates to search Amazon’s product catalog and add links to products that earn you commissions when your readers buy products you recommend.

With this feature, you can search Amazon directly from the Blogger editor and add pictures and links to Amazon products right into your posts. Your readers will earn you commissions whenever they buy the products you recommend, and if you don’t already have an Amazon Associates account, you can sign up for one for free without leaving Blogger.

If you’ve ever written a blog post about a book, recommended a gadget, or reviewed a toy you bought for your kids, you’ve likely gone through the process of drafting the post, opening up a separate window to go to find a site that sells the product, then going back to Blogger to paste the link to the product into the post editor.

Starting today, you can search the Amazon product catalog without leaving the Blogger interface and insert links to the products you find into your posts. Not only is the process of linking to products more efficient, but Amazon makes it easy for you to earn money whenever your readers actually buy the products you write about. This is known as an “affiliate program”, and it’s designed to let you recommend products you like to your audience — if they buy the product, you’ll earn a commission on that purchase. (For more on affiliate programs in general, here is a good overview at ProBlogger from this summer, and Darren’s “11 Lessons Learned” post about Amazon Associates is a good review of how to get the most out of the program.)

To get started, click on the Monetize tab for your blog and click “Amazon Associates”. Walk through the setup wizard, and add the Product Finder once you’re done.




Now for the fun part: when you are writing a post on Blogger, you’ll see an Amazon gadget to the right of your post editor (the “Product Finder”). You can search the Amazon product catalog from within Blogger — type in the name of the product you are writing about, and insert a link to the product, an image of the product, or an iframe containing the image, price details and a “buy it now” button. Every link that’s created contains your unique Associates ID, ensuring that Amazon will credit you for any purchases that result from readers clicking the link on your blog.




If you’re an existing Amazon Associate, completing this setup simply makes the Product Finder available on Blogger for you — you continue to earn the same referral rate from Amazon. New Associates receive the same referral rate from Amazon that they would have received if they signed up directly. If you’re not interested in earning a referral, you can still install the Product Finder: from the “Amazon Associates” page under the Monetize tab, click “I'll do this later — show me more Amazon options” and then click “Add the Product Finder” button.

A quick note about trust: affiliate programs work well when readers trust you. You should avoid promoting products simply because of the referral fee you might earn — readers may lose some of that trust if they sense your posts exist solely to make you money. You may also want to disclose to your readers that you will earn a commission on their purchase — some readers even prefer knowing that you benefit from their business.

There’s more information about this integration at Amazon.com, and the Amazon Associates blog has some more details. This integration is the result of months of collaboration between the engineers at both companies, and we’re very excited to share the results of this collaboration with you. Happy blogging!
 

YUI Theater — John Resig: “Testing, Performance Analysis, and jQuery 1.4″

11:32 am - December 16, 2009 in Yahoo! User Interface Blog

John Resig speaking at Yahoo! during the BayJax meetup on December 11, 2009.

John Resig (@jeresig) of Mozilla, creator of the popular jQuery JavaScript library, stopped by Yahoo! on Friday for a BayJax meetup and delivered a three-part tech talk, “Testing, Performance Analysis, and jQuery 1.4″.

In the first part of the talk, John reviewed the range of tools available to frontend engineers for unit testing and for analyzing the performance of code. In the latter case, he argues for going beyond pure speed-based benchmarks to structural analyses of performance. By looking at structure, the jQuery team was able to identify and correct bottlenecks, resulting in major performance improvements in the upcoming 1.4 release.

In the second part of the talk (beginning at 49:20 in the video), John reviews some of those jQuery 1.4 changes. In the short third section (beginning at 1:03:15), he looks at some interesting trends he’s noticed in the practical application of new HTML 5 elements — especially in older browsers.

If the video embed below doesn’t show up correctly in your RSS reader of choice, be sure to click through to watch the high-resolution version of the video on YUI Theater.

Other Recent YUI Theater Videos:

Subscribing to YUI Theater:

John Resig speaking at Yahoo! during the BayJax meetup on December 11, 2009.

 

YUI 2.7.0 on InsideLine.com

2:37 pm - December 14, 2009 in Yahoo! User Interface Blog

About the Author: Réal Deprez is the frontend architect at Edmunds.com, the premier resource for automotive information, based in Santa Monica. A Maine native and Tulane graduate, Réal has been working in frontend engineering professionally for five years.

Here at Edmunds (Edmunds.com) we just launched a redesign of
Inside Line (InsideLine.com), our automotive enthusiast web site, and we are using the YUI JavaScript library extensively.

Some of the YUI utilities & widgets used on Inside Line:

  • Yahoo/Dom/Event
  • Animation Utility
  • Connection Manager
  • ImageLoader
  • JSON
  • Selector
  • Carousel
  • TabView

We (the Frontend team) started out with YUI 2.7.0 JavaScript core and built our own JavaScript user interface library on top of it to encapsulate site-specific components and functionality. Our library takes advantage of YUI’s core utilities, including Dom, Event, Connection Manager, and Animation.

We are using Dom and Event extensively to handle DOM interaction, event listeners and custom event handling. The YUI Connection Manager is handling all of our Ajax implementations, including our custom search widgets. We are also using many of the YUI widgets on Inside Line, including TabView and Carousel, with custom skins. The YUI ImageLoader helped us improve page performance and meet our strict performance requirements.

We chose YUI because of its great documentation, thorough testing, and the scope and depth of its offerings. The library is easy to learn, understand, and implement. The modularity of the system fits in well with our design principles, and the API and custom events make it extremely extensible and easy to integrate.

Some Highlights

Multimedia Spotlight (tabview, carousel) from InsideLine.com:

InsideLine.com multimedia spotlight.

Image and Video Galleries (core, JSON and Carousel):

InsideLine.com gallery interface.

Ajax Search Widgets (Dom, Event, Connection Manager):

InsideLine.com search interface.

Do you have a YUI Imlementation you’d like to share on YUIBlog? Check out our contribution guidelines — we’d love to hear from you.

 

Over 150,000 New Icons

12:47 pm - December 11, 2009 in My Yahoo! Blog

I wonder if it bothered you as much as it bothered me that so much of the content in the My Yahoo! Content Gallery did not have a unique icon associated with it. Every time I clicked on “Add Content” and did a search, most of the content coming back had a generic icon. I want my content searching more sexy and fun. Give me a logo! Give me an image! Make it tasty!

So we went ahead and added over 150,000 new icons to the content database. When you do your search for “apple” to find out about the latest on the rumored Apple Tablet or top iTunes songs or for “book reviews” to find that perfect gift for the holidays, you’ll see new icons show up next to content.

 

Searching for book reviews on My Yahoo!

Apps showcased in this post:

Michael
- My Yahoo! Team Lead

 
 
 
 
 
 
It's All About Search | © clsc.net |
2010.03.1222:16
Tech used here: Valid HTML - Valid CSS - Valid RSS - JavaScript - PHP - Smarty - MySQL - and a partridge in a pear tree.