Flex

Data Paging in Flex 4

I know — you’ve heard it from me before — AMF rocks! With AMF you can load massive amounts of data into your Flex (or JavaScript) apps very quickly. This can often obviate the need for paging data. But what if you have lots, and lots, and lots of data? Well then you should use data paging. And here is how…

There is a new collection wrapper class in Flex 4 called “AsyncListView”. The UI data controls in Flex 4 know how to handle an AsyncListView as a dataProvider. The purpose of the AsyncListView is to give you a callback when the underlying list throws an ItemPendingError. The ItemPendingError indicates that an item that the list thinks it has isn’t really there yet. This allows you to then load the data and update the list. In order to throw an ItemPendingError you need to keep track of which items haven’t been loaded and then, when an item is requested that isn’t really there, throw the ItemPendingError. Here is some code from my PagedList implementation:

Webinar Tomorrow: Building Client/Cloud Apps with Flex and Force.com

I will co-presenting a free webinar tomorrow (September 28th, 2010) on building Client/Cloud Apps with Flex and Force.com. There are two times you can choose from:

  • September 28, 2010 | 6:00 a.m. PDT | 2:00 p.m. GMT | 6:30 p.m. IST
  • September 28, 2010 | 10:00 a.m. PDT

This session will walk through how you can get started building applications for the web, desktop, and mobile devices using Flex and Force.com. Salesforce.com and Adobe have worked together on an extension to the Flash Builder tool which enables developers to quickly build applications on top of the Force.com Cloud platform. I hope you can join me tomorrow! Sign up now!

Flex Development on Linux with IntelliJ IDEA

It’s kinda hard to believe that I’ve been doing Flex development on Linux for over six years now. In that time I’ve tried a few different tools. Vim will always be my favorite but debugging is painful. Flex Builder for Linux worked but lacked major features and commitment from Adobe for continual improvement. Most recently I’ve been using IntelliJ IDEA for Flex development on Linux. It’s been working great! There are a few things I’ve had to get used to but they are doing a great job of providing superb tooling support for Flex. I’ve also been very impressed with the responsiveness from the IntelliJ team in their forums and bug system.

My JavaOne 2010 Sessions

Next week at JavaOne 2010 I’ll be co-presenting two sessions! On Monday Jeremy Grelle and I will present “End-to-End Richness: Integrating Java EE Services to Create Engaging RIAs” at the Hilton San Francisco. Here is the session information:

Session ID: S313939

Abstract: Flex is one of the most widely used tools for building RIAs. But how do you efficiently connect applications to diverse back-end services built on Java EE? The Spring BlazeDS Integration project has emerged as an effective solution for building a lightweight connective tissue for exposing rich Java EE services to a Flex client from any Java Servlet container. Aimed at experienced Java developers who want to make maximum use of their knowledge of Spring and Java EE to build a compelling integrated experience, this session covers:

Flex 4 Fun Book by Chet Haase

My buddy Chet Haase has written an excellent book on Flex 4, called “Flex 4 Fun”. Chet’s humor, insight, and concise examples make this a “fun” way to learn Flex. Artima.com has posted some excerpts from the book to give you an idea of what to expect. Check out these great snippets:

If you are just getting into Flex or haven’t yet made the switch to Flex 4, then this is a great book to buy. You can buy Flex 4 Fun on either artima.com or amazon.com. Have “fun” learning Flex 4! :)

Bay Area Event: Building RIAs using Flash Builder for Force.com

Salesforce.com is putting on a great event on August 25 in San Mateo, California where you can learn about how to build RIAs on the Cloud with Flash Builder for Force.com. This will be a great opportunity to meet the team that built the tool and learn how to use it! If you can’t make it then check out the article I recently published “Building Client / Cloud Apps with Flash Builder for Force.com”. But if you are in the Bay Area and want to get up to speed quickly on building Client / Cloud apps then Register Now!

How to Define Styles on Skins in Flex 4

The new component / skin separation in Flex 4 (the Spark Architecture) is pretty nifty. But if you want to add a configurable style to a skin then that style must be defined on the component. For instance if you want to add a backgroundColor style to a Button skin then you need to first create a new Button component with the style on it:

package
{
import spark.components.Button;

[Style(name="backgroundColor", type="uint", format="Color")]
public class SButton extends Button
{

}
}

Then create a new Button skin that uses the style:

Building Client / Cloud Apps with Flash Builder for Force.com

I have a theory. The majority of people who use enterprise software today use old school Client / Server apps. We’ve been trying to move these apps to the web for more than ten years. The ease of deployment of web apps is a clear motivator. Yet the client capabilities of the plain old web browser have not been sufficient for many apps to make the leap. This is why I love Flex and the Flash Platform. It provides a way to use web technologies and the web deployment model but adds many of the critical things needed for mission critical apps that people use all day long.