FLEX MASHUPS
381
<qs:DragTile id="cmp2" width="100%" height="100%" dataProvider="{targetData}"
dragEnter="event.target.allowDrag(event);"
dragOver='event.target.showDragFeedback(event,event.shiftKey?
"copy":"move");'>
<qs:itemRenderer>
<fx:Component>
<qs:BitmapTile />
</fx:Component>
</qs:itemRenderer>
</qs:DragTile>
</mx:VBox>
</mx:VBox>
</s:Group>
</s:Application>
The example is a great demonstration of how you hacked together a mashup application that allows the
user to search through the Flikr API and provide a good user experience built on top of separate
components.
Creating Your Own Flex Mashup
Now that you know about data accessinterconnectivity, and mixing additional scripts, you are ready to
create your own Flex mashup. But, where do you start?
I suggest splitting the process of creating mashups into four steps:
1. Pick a subject: Picking a subject is the base for every Flex mashup. Your subject should
add value, although Flex has an advantage as a starting point, because the Flex stateful user
interface already adds value. Many times you will add a service or data source to an existing
application so the subject is already known. A good place to start is to get familiar with all the
available APIs, and a good resource to find all the APIs that are available is
http://www.programmableweb.com/apis.
2. Choose services: Now that you know the subject of your mashup application, the next step
is to decide which service or services you will use. Many times you have available more than
one API that provides the same or similar functionality, so you need to decide which one to
use or whether to combine a few together.
3. I personally prefer using services that are part of a cloud. You can rely on a service that sits
on a cloud server’s infrastructure rather than a small web site hosted by a shared hosting
plan. The following companies have a massive network of servers: Google, Yahoo!, Amazon,
and Salesforce.
4. Once you select all the APIs and services you will be using in your mashup, sign up for or
download the APIs needed. Many APIs provide a key or a unique ID number. Some APIs are
being sold on a license basis or given away as open source. Once you select the APIs you
will be using, spend some time checking out the manuals, the reliability of service, and the
performance.
Get AdvancED Flex 4 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.