My Dreamforce Keynote Demos

At Salesforce.com’s 2007 developer conference, called Dreamforce, I did a few minutes of demos during the day two keynote with Marc Benioff and Bruce Chizen. I showed three real applications built with Flex, Adobe AIR, and Salesforce.com. It was a fun experience and I only had a few minor demo glitches. Thanks to PodTech the video is below. My demos are about four minutes in.

Building an Adobe AIR application on salesforce.com with Flex 3

One of my old blogs has been turned into a full article on the Adobe Developer Connection and updated for Flex 3 Beta 2 & Adobe AIR Beta 2:
Building an Adobe AIR application on salesforce.com with Flex 3

Also a recording of the session that I hosted at Dreamforce has been posted on the Apex Developer Network:
Make Your App *Bling*: Build Amazing Salesforce Apps Using Adobe Tech. (click on “Apex & Beyond” then scroll down to the session)

Lastly, in the next few weeks we will be releasing an update to the Flex Toolkit for Apex which adds simple local caching for AIR applications. More information as soon as we finishing implementing the basic CRUD functions.

Flex and AIR: The New Standard for Business Application UIs

Last week I attended Dreamforce, salesforce.com’s annual developer conference. It was exciting to see all the innovation going on with business applications. Much of that innovation is centered around Flex and Adobe AIR. In fact 18 of the 32 companies in the salesforce.com incubator are using Flex and AIR! Does that give you an idea of where the momentum is for companies building business applications?

At the Dreamforce Day 2 keynote, Workday CEO Dave Duffield gave a demo of the new Flex-based interface to their ERP software. Duffield said multiple times that they have standardized on Flex as their UI platform! A while back I was in early meetings with Workday that focused on their possible use of Flex. I showed them my Census RIA Benchmark and some of the other amazing things they could do with Flex. I’m really glad they have decided to fully embrace Flex for their UI. Compared with the other technologies they were considering, I’m sure their developers and their customers will be much more pleased with their experience.

I met so many people at Dreamforce who were building RIAs with Flex, salesforce.com, and the Flex Toolkit for Apex that it was somewhat overwhelming. The toolkit, which started as one of my airplane projects, has been the catalyst for bringing together Flex and salesforce.com. Thanks to a lot of help from Seth Hodgson, Dave Carroll, Ron Hess, Adam Gross, and many others we have built a great platform for Rich Internet Business Application development – great user experiences on the front end and a solid infrastructure on the back end. It’s no wonder so many companies are building their business applications on this stellar combination of technologies.

It is hard to keep track of all the innovative business applications being built with Flex, AIR, and salesforce.com. Model Metrics, for example, is building applications that allow you to take your data offline. Their first app is targeted at pharmaceutical sales reps. It allows them to sync their salesforce.com data to a tablet or laptop, then go to a doctor’s office and record all the information about their visit. When back online they can automatically sync all that information back into salesforce.com. It’s a great app built entirely with Flex, AIR and salesforce.com. Another great application is SlideRocket. This Flex-based PowerPoint-like application hooks into salesforce.com so that you can easily send your presentations to your salesforce.com contacts and see when your contacts viewed them. DemandBase has a very nice Flex application for finding sales leads. When you purchase leads they are automatically inserted into your salesforce.com account! Check out the DemandBase application for yourself. One last company to highlight is Ribbit. Ribbit has built a great voice/phone communication application that provides services like automatic voicemail transcription – and it can live inside of salesforce.com. All of these applications show where the cutting edge is for business applications. It’s all about great user experiences with Flex and AIR – built on great infrastructure like salesforce.com.

If you are building Flex, AIR, and salesforce.com applications please let me know! You can email me at jaward <at> adobe <dot> com or just leave a comment here. Thanks!

Tutorial: Salesforce.com on AIR with Flex 3

This tutorial has been updated to Flex 3 Beta 2. The new version is now on the Adobe Developer Connection:
Building a standalone Adobe AIR application on salesforce.com with Flex 3

The excitement around using Flex & AIR to build amazing front-ends for Salesforce applications continues to grow. Nitobi has posted a cool AIR application that uses the Salesforce Ajax library. Also Dave Carroll of Salesforce has posted a great blog about why Flex & AIR developers should care about the Apex platform. Back in April I posted the first version of a tutorial about how to use the Flex Toolkit for Apex to build AIR (was Apollo) applications. Since the Flex 3 and AIR betas were released recently it’s time to update that tutorial. So if you want to start building some sexy interfaces on top of salesforce.com follow along…

1. Download and unzip the Flex Toolkit for Apex:
http://wiki.apexdevnet.com/index.php/Flex_Toolkit

2. Download and install the Flex 3 Beta:
http://labs.adobe.com/technologies/flex/flexbuilder3/

3. Create a new AIR Project:

4. Add the Salesforce SWC to the Library Build Path:

5. Write your AIR application:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:salesforce="http://www.salesforce.com/"
  creationComplete="conn.loginWithCredentials('dev@mavericks.demo', '123456', new AsyncResponder(loginResult, loginFault));">

  <mx:Script>
  <![CDATA[
  import mx.controls.Alert;
  import com.salesforce.results.QueryResult;
  import com.salesforce.AsyncResponder;

  private function loginResult(result:Object):void
  {
    conn.query("SELECT Id, Contact.Firstname, Contact.Lastname FROM Contact",
      new AsyncResponder(queryResult));
  }

  private function loginFault(fault:Object):void
  {
    Alert.show("Login error!");
  }

  private function queryResult(qr:QueryResult):void
  {
    dg.dataProvider = qr.records;
  }

  ]]>
  </mx:Script>

  <salesforce:Connection id="conn"/>

  <mx:DataGrid id="dg" width="100%" height="100%"/>

</mx:WindowedApplication>

6. Save it (which automatically compiles it)

7. Run it:

8. Export it as an installable AIR file so you can share it with others

9. Say “That’s Hot!”

Now go ahead and build some amazing Flex and AIR applications on top of salesforce.com! Just let me know what you create so that I can use it in my demos. :)

Download the AIR file for this tutorial

Salesforce Flex / Apollo Sample – Offline Data Sync

On Monday I presented at the Salesforce Developer Conference in Santa Clara. It was a great conference! The keynote was especially exciting because it kinda turned into the Flex/Apollo show. Near the middle of his keynote Marc Benioff went on about how great Adobe is for innovating with Flex and Apollo. He then brought Kevin Lynch on stage who did his usual Apollo demos, which filled the crowd with “Ooos” and “Ahhhs”. Then they brought up someone who built some amazing Salesforce based applications. And guess what? It was a Flex app running inside a Salesforce S-Control! Then Adam Gross and Parker Harris from Salesforce took the stage to present even more Flex applications! It felt for a second like I was at Max!

I was pretty excited to see all the broad uses of the Flex Toolkit for Apex which has been the catalyst for Salesforce jumping further into the Flex & Apollo world. The Toolkit started as one of my “plane projects” where I took the existing Salesforce JavaScript library and did regex replaces on the code, moved the prototype stuff to proper classes, added static typing, and finally got the thing to compile. Thanks primarily to Dave Carroll and Ron Hess from Salesforce as well as Seth Hodgson from the Flex Data Services team, the Toolkit evolved well beyond a “plane project” and is now being used in demos and production applications!

Back to the conference… Throughout the day I stopped by the Adobe demo pod to show demos and give out Apollo books. Dave Carroll and I also co-presented a one hour session to a packed audience of about 250.

The use of Flex and Apollo in the Salesforce world is taking off! Like I said in my session on Monday… Salesforce is revolutionizing how we build back-ends! Flex & Apollo are revolutionizing how we build front-ends! Bringing these two technologies together is a perfect match!

Now on to the Salesforce Apollo Sample…

AccountTracker2.air – Apollo Sample (Requires Apollo Alpha)

This Apollo application is one of the samples we are working on for the Flex Toolkit for Apex. It has some cool offline data sync capabilities. However currently the sync is only one way and some of the application is just smoke and mirrors (the chart data is fake because I was in crunch mode getting this ready for the Web 2.0 conference). But it really does pull most of its data from Salesforce.com and syncs data and files to the local system so that it works offline. I can’t take credit for much of this application. I did some polishing but most of the work was done by Dave Carroll and Ron Hess from Salesforce. They have both put in a ton of work to the Toolkit and the samples. So big thanks to them!

If you want to see how to start building Flex and Apollo applications using the Flex Toolkit for Apex, check out these resources:
http://www.jamesward.org/wordpress/2007/04/17/the-open-source-flex-and-apollo-toolkit-for-salesforcecom/
http://wiki.apexdevnet.com/index.php/Flex_Toolkit
http://wiki.apexdevnet.com/index.php/Tutorial:_Creating_Flex_Salesforce_Mashups

Eckel at JavaOne – Salesforce Conference – Google Tech Talk – San Diego JUG

There’s so much fun stuff going on it’s hard to keep my blog up-to-date. But I did want to note a couple of things…

Bruce Eckel will be at JavaOne! He will spend some time in the Adobe booth and some time at various sessions. But the big news is that he and I will be co-presenting a short session before the Adobe Party on Wednesday night. This will be a fun thirty minute session that will be entertaining and educational. Too bad this isn’t an official JavaOne session, but I guess Sun doesn’t want me presenting about Flex at JavaOne (They rejected my three submissions but possibly for other reasons.) Following the short session will be the party. Food, drinks, and hanging out with Bruce Eckel! Stop by the Adobe booth at JavaOne to get your official invitation (which I think you will need to get in).

There is a free Salesforce conference coming up on May 21st. I’ll be co-presenting a session on the Flex Toolkit for Apex. This will be a great session for anyone who wants to build sexy apps with Flex and Apollo on top of Salesforce. For those who haven’t yet tried out the Apex Toolkit you really should attend this session. You know how you usually have to setup a database, maintain it, write lots of middleware code, maintain that, etc? Well with Salesforce you don’t really have to do that. You use the customizable Salesforce back-end and build your sexy Flex front-end. It couldn’t be easier to build enterprise apps that are maintainable and sexy! Come to the conference and learn more!

This past week Dick Wall of the Java Posse invited me to do a Google Tech Talk. The session was recorded and posted on Google Video. Thanks Dick (and Google) for inviting me! I had a great time!

Next week on May 15th I’ll be presenting at the San Diego JUG. If you are in the area I’d love to meet you in person.

That’s all for now. I’m looking forward to seeing many of you at JavaOne this week!

The Open Source Flex and Apollo Toolkit for Salesforce.com

A few months ago I met with Salesforce.com about Flex and Apollo. They had begun building some Flex applications that used the Flex Ajax Bridge to communicate with Salesforce. This worked but they wanted to be able to more easily build Flex and Apollo applications. So I took their JavaScript library and did an initial port to ActionScript. Surprisingly the code ported pretty easily. It was actually a fascinating experiment. ActionScript 3 is based on the same specification as JavaScript 2, so in theory this kind of thing should be pretty trivial — especially if the code being ported doesn’t do much with the browser DOM. That was the situation in this case because the Salesforce JavaScript library talks to their backend via XHR and doesn’t do much with the browser DOM. Once I had an initial port done including authentication and query support Ron and Dave from Salesforce.com cleaned everything up, added better object typing, built complex examples, and developed an Apollo demo. Everything has been going on under a semi-secret SourceForge project, code named Mavericks.

“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.

1. Download the toolkit:
http://wiki.apexdevnet.com/index.php/Members:Flex_Toolkit_download

2. If you haven’t already done so, install Flex Builder and the Apollo Extensions:
http://www.adobe.com/go/tryflex
http://labs.adobe.com/technologies/apollo/

3. Create a new Apollo Project
salesforce1.png

4. Add the Salesforce SWC to the Library Build Path
salesforce2.png

5. Write your Apollo application:

<?xml version="1.0" encoding="utf-8"?>
<mx:ApolloApplication xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:salesforce="http://www.salesforce.com/"
  creationComplete="conn.loginWithCredentials('dev@mavericks.demo', '123456', new AsyncResponder(loginResult, loginFault));">

  <mx:Script>
  <![CDATA[
  import mx.controls.Alert;
  import com.salesforce.results.QueryResult;
  import com.salesforce.AsyncResponder;
  
  private function loginResult(result:Object):void
  {
    conn.query("SELECT Id, Contact.Firstname, Contact.Lastname FROM Contact",
      new AsyncResponder(queryResult));
  }
  
  private function loginFault(fault:Object):void
  {
    Alert.show("Login error!");
  }
  
  private function queryResult(qr:QueryResult):void
  {
    dg.dataProvider = qr.records;
  }
      
  ]]>
  </mx:Script>

  <salesforce:Connection id="conn"/>
  
  <mx:DataGrid id="dg" width="100%" height="100%"/>
  
</mx:ApolloApplication>

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!

My Recent Flex & Apollo Adventures

Sorry this blog has been pretty stagnant lately. Things have been totally crazy. I’ve been touring the country speaking at Java User Groups and other conferences. The JUGs have been really fun. It’s amazing to see how quickly the Java crowd falls in love with Flex, like I did a few years ago. There are still more JUGs, conferences, and eSeminars coming up so please check out the schedule and see if I happen to be in your home town sometime soon. If you will be around the Bay Area for JavaOne, we will be throwing a huge bash with Bruce Eckel. The details are still being finalized, but stay tuned. Also coming in October is the annual Adobe developer conference, called MAX. It will be full of top notch Flex sessions by many of our star engineers. Definitely not something you want to miss. In May I’ll be doing a triple header in Vegas; Las Vegas Adobe User Group, Nevada Java User Group, and Interop. Hopefully some of these events are in your home town since I’d love to meet you all in person!

Four other quick things…

Today we announced the Adobe Flex Toolkit for Apex which allows you to very easily create Flex & Apollo apps on top of SalesForce. I have been working on this project for a few months so it’s exciting to see it launch. I’ll be posting another blog in the next few days with more details about using the new Toolkit in Apollo applications. But if you want to get started, check out the Creating Flex Salesforce Mashups tutorial.

A while back Bruce Eckel and I recorded a screencast of us building a Flex application with Hibernate and XFire on the backend. I finally got around to packaging the code for that demo. You can get it from SourceForge.

My friend Tony in Japan created a pretty cool Flex app that does text diffs. Very cool and nice use of vectors! Thanks Tony!

Lastly, there has been lots of great developments going on with the Meldware Communications Suite. They use Flex for the webmail client. It is coming along very well, but we need some help. If you know Flex and want to get involved in a great Open Source Flex project, get more info on the buni.org site. Also, Meldware is doing a Linux User Group tour. Check out their schedule.