Developing Mobile Flash / Flex – Scaling and Zooming

Mobile development with Flash and Flex is a new frontier, full of new adventures and discoveries. Recently I discovered something that might be useful to you. By default the mobile web browser on my Android 2.2 device scales a web page to make more room to display pages typically built for a desktop profile. Here is what a little test mobile Flex app I built looks like:

Strange! The width and height are larger than the screen resolution. You can fix this by adding the following to the HTML page:

amf.js – A Pure JavaScript AMF Implementation

I just finished the first version of a new pure JavaScript library for AMF. I’ve wanted to do this for a while but didn’t think it was possible since JavaScript doesn’t have a ByteArray. But then I came across this: “High Performance JavaScript Port of ActionScript’s ByteArray”. That became the basis for amf.js. Before I get into the gory details of how this works, check out some developer eye candy:

http://www.jamesward.com/demos/JSAMF/censusTest.html

Ok, hopefully that worked for you. I’ve tested this in the latest Chrome, Firefox, Safari, and IE and they all seem to work. It should also work on your iPad, iPhone, or Android device.

Tour de Flex 2.0 – Nearly 500 Flex Examples!

Adobe has just launched the new AIR 2 based Tour de Flex version 2.0 which now contains almost 500 Flex examples! The new version has new AIR 2 examples (only available in the AIR version of Tour de Flex) including:

  • File Promises
  • Mass Storage Detection
  • Native Process
  • Open with default app
  • Socket Server

Also there are some great examples of the new Flash Player 10.1 and AIR 2 APIs including:

  • Gestures
  • Global Error Handler
  • Globalization / Internationalization
  • Microphone access

Those are some great examples but my favorite is still Doug McCune’s Physics Form followed closely by the real-time Tour de Flex Dashboard. :)

Top 10 StackOverflow.com Flex Contributors

Back in the day the FlexCoders Yahoo! Group was all the rage. It was the place where Flex rock stars like Alex Harui and Doug McCune hung out and helped the community learn Flex. But these days a lot of developers have turned to StackOverflow.com as their primary resource for getting answers to their technical questions. I started using Stack Overflow over a year ago primarily because it makes it easy to follow the conversation around a specific question and quickly identify the right answer. Stack Overflow totally nails what I need as a developer when I have problems and questions. Many Flex rock stars have stepped up and frequently answered questions on Stack Overflow and I wanted to highlight the top 10 contributors to the “Flex” tag.

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!

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.

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!

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:

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: