Subscribe

  • Subscribe  

Flex Mashup II – Salesforce,Yahoo Pipe,Map,Flickr

Posted by Moxie Zhang | October 17, 2007 .

In last post I started with the overview of what I created this multiple mashup Flex application. Now let’s get to the details.

First, I created two piples with Yahoo Piple:

textflickr Flex Mashup II   Salesforce,Yahoo Pipe,Map,Flickr locationpipe Flex Mashup II   Salesforce,Yahoo Pipe,Map,Flickr

mapprs

This one setup a persistent search at Bloglines, Findory, Google Blog Search, Google News, IceRocket, MSFT Live News, Technorati, and Yahoo! News. then do a text extraction to feed Flickr to retrieve the photos. I only extract those geo tagged photos.

mapprs find something near a somewhere

This one is easy, utilize Yahoo Local search operator to find something close to a location.

Yahoo Piple is one of the gang three mashup platforms, Pipe, MS Popfly and Google Mashup Editor. What Pipe does is really mashing up the data. It has limited number of “operators” to process the text (RSS feeds usually). The output is RSS feed as well (actually GeoRSS feed). When Pipe notices there is geo namespace in the result, it will display each item in the result list as marker on Yahoo map. The RSS feed URL of the pipe created looks like this: http://pipes.yahoo.com/pipes/pipe.run?_id=pCqhCs553BGe_cEnGsevXg&_render=rss&trackWord=mashup

This URL causes two challenges to Flex:

  1. A Flex application, as a Flash swf, is subject to security sandbox constrain. It means that you can’t access a site from within a Flash (via HTTP or other communication connection) to a host, unless the host is where the swf comes from, OR, there is crossdomain.xml file at the root of the attempting host. yahoo.com doesn’t have a crossdomain.xml ready for Flex.
  2. The “&” in the URL will cause syntax error for Flex Builder or compiler.

Here are the solutions:

For sandbox issue, it’s actually quite easy. There is crossdomain.xml at yahooapis.com. And you know what, just replace yahoo.com with yahooapis.com will work the same way. It apparently that Yahoo intends to make developers access its services only using yahooapis.com, not its major domain. Just wish they make that clear, rather than a hour of hack and search.

For the URL with parameters. There are three solutions:

  1. For static Pipe feed without changing parameter in your program, you can add the URL to feedburner.com and use the clean feedburner RSS feed. In my case, I want the input to be dynamic so it won’t work for me.
  2. In the URL, replace the “&” with HTML code “&“, Flex will decode it and take it as a charm.
  3. Another way is to use <mx:Request> block inside the <mx:HTTPConnection> to supply the parameters. Flex will construct the URl at run time.

Next post I’ll talk about the Flex APIs I used for map and integrate with salesforce.com. Stay tuned…

Leave a Comment

If you would like to make a comment, please fill out the form below.


Name

Email

Website

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Comments

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Related Posts

2 Comments so far
  1. Fernanda Gomez  June 25, 2008 10:17 pm

    I like the sample and the idea, very creative

  2. personal Trainer  June 26, 2008 7:33 pm

    This is truly awesome information!

<

Direct TV Offers - usdirect has the best directtv deals