Flex 4, Hibernate 3, and Spring 3 Integration

Jon Rose and I have created a new DZone Refcard called Flex 4 and Spring 3 Integration. In the Refcard, we walk you through the steps for building RIAs with Flash Builder 4, Flex 4, BlazeDS 4, Spring 3, the Spring BlazeDS Integration, and Hibernate. Whew! That’s a lot of pieces! The Refcard covers simple Remoting, Flex & Hibernate integration through Spring (all Java annotation driven and using the new data-centric development features in Flash Builder 4), Pub / Sub Messaging, and Flex and Spring Security. We pack a lot into six pages!

If you want to see recorded presentations / screencasts of some of these things check out:

I hope all of this is helpful. Let me know what you think.

Posted in Flex, Hibernate, Java, Spring | 5 Comments

Improved Open Source Testing Tools for Flex

Back in the early days of Flex there wasn’t much for doing unit testing, automated testing, performance testing, etc. Thanks to the community there are now numerous open source testing tools for Flex. Here are some recent updates you should definitely check out if you are building production Flex apps:

It’s very exciting to see these community driven projects continue to improve testing for Flex apps.

Posted in Flex, Open Source | 4 Comments

Flash Platform and Salesforce.com Webinar and Mobile App

Client + Cloud technologies have been quickly evolving and maturing. The combination of Flex and Salesforce.com continue to lead the way for next generation Client + Cloud applications. Recently I did a Webinar on The Flash Platform and Salesforce.com with Dave Carroll from Salesforce. If you missed it you can watch the recording to see how you can begin developing Client + Cloud apps. Also watch Jeff Douglas demo an offline case management app he built with Flex and Force.com. Awesome stuff!

Last week I was able to spend a few hours with Model Metrics porting their Pharma2GO Adobe AIR app to run on an Android Mobile device. Using the AIR for Android Prerelease we quickly created a mobile friendly UI with Flex and reused the same data sync code from the desktop app. Check out the end result:

Listen to what Model Metrics had to say about this in their blog “HTML 5 – Ready for Primetime in the Enterprise?“:

One of our early iPhone products on the iTunes AppStore was Search2GO, a simple search tool for Salesforce.com. This was built in Objective C and it took approximately 8 weeks to develop. Yesterday I watched two developers create over half of this same functionality using Flex/AIR and had it running on an Android phone in a day. Granted there are still things that could be added, but this was a great illustration of why Flex/AIR is a great toolset.

These are exciting times for Client + Cloud apps now that the “Client” can easily be on the web, desktop, and mobile device using the same technologies and tools!

Posted in Flex, Mobile, Salesforce.com | 2 Comments

Flex on Android in Flash Player and AIR

This week at the Google I/O conference Adobe announced that a Flash Player 10.1 beta and an Adobe AIR prerelease are now available for Android devices. This is really exciting news for those of us building apps on the Flash Platform because now we can begin building apps in Flex for these mobile devices (and many others coming soon).

Take a look a some of the quick demos I’ve built with Flex running on Android in Flash Player and AIR:

You can get the source code for all of these demos from github.

Also Christophe Coenraets has posted some great Flex mobile demos. Check out his Employee Directory and Stock Trader demos.

These are very exciting times for developers!

If you want to check out the Flash Player 10.1 beta for Android it will be available in the Android Marketplace for Android 2.2 devices. You can try Adobe AIR for Android today by signing up for the prerelease.

Posted in Adobe AIR, Flash Player, Flex, Mobile | 19 Comments

Watch AS34J – ActionScript 3 for Java Developers

Last week I did an eSeminar on AS34J – ActionScript 3 for Java Developers. This was originally a presentation that Chet Haase and I did at Devoxx. Later Chet also published the presentation as a two part article on JavaWorld (Part 1 and Part 2). Check out the eSeminar and let me know what you think.

Posted in Flex, Java | 1 Comment

Flex and Java Differences: Getters & Setters

In Java it has become a standard practice to use a getter & setter notation to provide a consistent interface to an object’s properties. There is a reason why we don’t do the following in Java:

public String fullName;

The code above essentially creates an interface (or contract) between the class and the implementors of this class that does not allow us to change the underlying implementation of what gets returned when the fullName property is accessed on an instance of the class. So if someone has Java code that accesses the fullName property:

blah = obj.fullName;

Or sets the fullName property:

obj.fullName = "blah";

Then in Java there is no way to change the behavior of getting or setting the fullName property. If the author of the class wanted to change the underlying behavior of the getting or setting they would have to change how the implementors of the class interact with the class. That is obviously not ideal so in Java we typically hide properties with get and set functions. The Java language doesn’t yet have Java properties so we use methods to hide the implementation. So our Java class instead would be:

private String fullName;
 
public String getFullName() {
    return fullName;
}
 
public void setFullName(String fullName) {
    this.fullName = fullName;
}

This allows the class author to change the behavior of getting and setting the fullName property without changing the external interface.

In Flex it is not usually necessary to create the wrapper getter and setting functions on an object because ActionScript supports properties. This means that you can usually just create public properties like:

public var fullName:String;

If the internal implementation of getting or setting the fullName property needs to change, then the class can be adapted to have getter and setter functions without changing the external interface of the class:

private _fullName:String;
 
public function get fullName():String {
    return _fullName;
}
 
public function set fullName(_fullName:String):void {
    this._fullName = _fullName;
}

To the class implementor the property fullName could still be get and set through the normal notations:

// getters
blah = obj.fullName;
blah = obj['fullName'];
// setters
obj.fullName = "blah";
obj['fullName'] = "blah";

Getting or setting the property would call the getter and setter functions instead of accessing the property directly. This allows the interface of the object to stay the same even if the underlying implementation of getting and setting the property changes. This also allows a class to dispatch events when properties change (this is how Data Binding works internally in Flex).

I see a lot of Java developers who are wary of public properties on ActionScript classes. Don’t be! ActionScript supports real properties so you shouldn’t ever need property getters and setters unless you are doing something out of the ordinary. And you can switch to getters and setters without changing the interface to the object.

If you would like to learn more about the differences between ActionScript and Java check out my AS34J: ActionScript 3 for Java Developers eSeminar next week!

UPDATE: Watch the recording of my eSeminar presentation.

Posted in ActionScript, Flex, Java | 5 Comments

Emerging Technologies for the Enterprise Podcast

While I was at the Emerging Technologies for the Enterprise conference in Philly I was able to participate in a very fun podcast. The casual chat was hosted by Ken Rimple of Chariot Solutions. Participating in the podcast were Adam Coomes of Infegy, Ed Burns of Oracle, Cote of Redmonk, and myself. Topics ranged from cheesesteaks to turbo buttons. Give it a listen and let me know what you think!

Posted in Conferences | Leave a comment

Flex at the Austin JUG and Stir Trek in Columbus

Tomorrow night I’ll be in Austin, Texas speaking at the Java User Group about Better Software with Java and Flex (Try the Google Cache Page in case the site is not working). And then next week I’ll be at Stir Trek in Columbus, Ohio presenting about Flex and the Cloud. I hope to see some of you at these events!

Posted in Cloud, Flex, Java | Leave a comment

Flex 3 SDK in Flash Builder 4

The Flex 4 SDK has some great new features but for existing Flex 3 apps upgrading might not yet be an option. Luckily Adobe’s professional tooling for Flex, now called Flash Builder 4, is abstracted from the underlying SDK. This means that you can take advantage of many of the new Flash Builder 4 features while still using the Flex 3 SDK. I recently recorded a screencast showing how to use Flash Builder 4 with Flex 3 projects. Check out “Moving projects from Flex Builder 3 to Flash Builder 4” by Andrew Shorten to see my screencast.

Posted in Flex | Leave a comment