Watch videos with subtitles in your language, upload your videos, create your own subtitles! Click here to learn more on "how to Dotsub"

Adobe Flash Builder for

0 (0 Likes / 0 Dislikes)
[Adobe Developer Connection] [James Ward - Technical Evangelist] Hi, I'm James Ward, a technical evangelist for Flex at Adobe. I wanted to walk you through the new Flash Builder for This is a new collaborative effort between Salesforce and Adobe to build great tooling for building offline capable SalesForce applications. So let me show you how it works. Here I am in Flash Builder. Once I've installed Flash Builder for, I can come in and create a Flex project. And I'll give it a name. I'll call it Contacts. And I can either choose for it to be a web application or a desktop application. I'll choose Desktop and hit Finish. Now this is creating just this basic application that we can start with. Included in this application are things like the data synchronization for offline and a login form. So all of that stuff is just included when you create a new project. I can also bring in my Salesforce Wizdel I can just import this by specifying it here and hitting Open and Finish. Now this is actually generating out all of the ActionScript code to connect our Flex application to So it is generating all of these objects that I've defined on Salesforce. So, while it's doing that, let me explain to you the different options that you have when you create these projects. You can either build them as desktop applications, which can run offline and also on mobile devices that have Adobe AIR on them, or you can run them inside the browser, either in or on your own website. So now that it's done generating all of those objects--we only have to do that once-- and we can see all of the different objects that I've defined on We can go in and see there is a count and all of the different properties on account. We can go in and see Contact further down. There are lots of different objects that we can now use and access from the Flex application. So now in this application, let me actually hook this up to Salesforce. So first let me create a data grid that will display the Salesforce data. So here where is says, "put your components here." I'm going to replace that with a data grid, and I'll give it an ID. I'll call it "dg" and I'm going to set the width to 100%. Set the height to 100%, and then I'm not going to specify any columns yet on that. I'm also going to change a parameter here, make the padding 40 for this v group container. And now let's actually make the query to Salesforce. To do that, what I want to do once the user has logged in, it's going to fire this login complete handler. So I'm going to come in here and say from this object that we've defined up here, this app object, which allows us to access Salesforce. So with app, I'm going to get the wrapper and I'm going to do a query. Now, I'm just using SQL, which is the Salesforce query language, to describe what I want to query for. So I'm going to say "select * from Contact." And now I also need to tell it what to do when we get a response, so I'm going to create a new Async responder. So I create the new AsyncResponder, and this has two functions that could be called when we get the response back. The first is the result, so I'm going to create a new function that will handle the result. So this will take a couple of different parameters. The first is going to be the rows that we actually back from making this query. And the second is going to be an optional token, which is just going to be ignored in this case. And this function returns void. And now, in this function, what I want to do is set the rows equal to the data grid. So to do that, I gave it an ID of dg, so what I'm then going to do is come in and say dg.dataProvider-- so I'm setting the dataProvider on the data grid equal to the rows that we got back from making that query. Now, I also need to potentially handle any faults that may come up, so to do that, I'm going to close out that function, and then add in another one. So create a new function, and I'm going to call this one--I don't need to specify the name, but it's going to take just an errorObject as a parameter. This one also returns void, and now, in this case, I'm just going to ignore an error. So I'm not going to do anything with that. So then I'm now going to save this application. That's going to compile and now I can run it as a desktop application. And so when this runs, you'll see the automatic UI that I got for logging into Salesforce. And I'm going to log in [email protected] and my password, and log in. So now, it's logging in and then we should see it getting some data from Salesforce. So it's pulling that data down. And here we actually see all of the data for all of my contacts, which is what I queried for. And we could do a lot of customization on this data grid to specify which columns we actually want to see. Let me quickly show you a little bit more complete of an application here. This is demo application we built for accounts-- the same basis, same tooling to get started, just a few more Flex components in here. So let me log in and show you that. Now, when we log in, it's going out and if we were offline, it would actually pull these contacts or accounts from the local database in AIR, and now we actually see all of accounts in the data grid. We can also come in and select an account and make some changes. So by showing my browser this same account, we can see that there are currently no website set on this account, but now in the AIR application, I can come in and enter our website and then save, and that will save that information locally, as well as, save it back up to If we were offline, it would just wait and save that change to when we're back online. So now when I reload this page, we see the website is set on So that is how easy it is to get started building Salesforce applications with Flex. Thanks for watching. [Adobe Developer Connection]

Video Details

Duration: 6 minutes and 23 seconds
Language: English
License: All rights reserved
Genre: None
Views: 102
Posted by: adobetv on Oct 21, 2010

Adobe Flash Builder for is a jointly developed IDE that gives developers a single tool for building cloud-based rich Internet applications.  This video walks through the basics of using this new tool to create great cloud apps for the web and desktop.

Caption and Translate

    Sign In/Register for Dotsub to translate this video.