“Adobe Flex Toolkit for Apex” is the formal name for this new Flex / Apollo library. The library is licensed under BSD so everyone can easily reuse it in their applications. Because it uses a simple asynchronous communications model and typed objects wherever possible, this new library accelerates the process of building Flex and Apollo applications on top of the Salesforce.com Apex platform. With just a few lines of code you can get data from Salesforce.com and render it in your application. There are three primary ways to use this toolkit. You can use it to build Apollo based desktop applications, create custom web applications hosted on your site, or build a custom S-Control hosted on Salesforce.com. For instructions on how to build a custom S-Control and the basics of using the toolkit, check out the [Creating Flex Salesforce Mashups] tutorial.
Here is what you need to do to build an Apollo application using the Flex Toolkit for Apex.
- Download the toolkit:
- If you haven’t already done so, install Flex Builder and the Apollo Extensions:
- Create a new Apollo Project
- Add the Salesforce SWC to the Library Build Path
- Write your Apollo application:
<mx:ApolloApplication xmlns:mx=“http://www.adobe.com/2006/mxml" xmlns:salesforce=“http://www.salesforce.com/" creationComplete=“conn.loginWithCredentials(‘email@example.com’, ‘123456’, new AsyncResponder(loginResult, loginFault));">
<mx:DataGrid id=“dg” width=“100%” height=“100%”/>
</div> 6. Save it (which automatically compiles it) 7. Run it ![salesforce3.png] 8. Export it as an installable AIR file so you can share it with others 9. Say “WOW!” It really is that easy. To learn more check out the examples in the toolkit. Also if you really want to dive in, the toolkit is 100% Open Source so you can look at all the code and even help us improve it. Check it out from the [SourceForge SVN repository]. I'm working on another article which will walk you through setting up the environment to begin hacking on the toolkit using either the Free Flex SDK or Flex Builder (we support both methods). I hope you find the toolkit useful and please let me know what cool things you build with it! : http://wiki.apexdevnet.com/index.php/Tutorial:_Creating_Flex_Salesforce_Mashups : http://wiki.apexdevnet.com/index.php/Members:Flex_Toolkit_download : http://www.jamesward.org/wordpress/wp-content/uploads/2007/04/salesforce1.png : http://www.jamesward.org/wordpress/wp-content/uploads/2007/04/salesforce2.png : http://www.jamesward.org/wordpress/wp-content/uploads/2007/04/salesforce3.png : http://sourceforge.net/projects/sforce