Insightful ramblings ... well, ramblings

07.08.11 Why sharks drown and developers become obsolete

I still remember as boy hearing that sharks never fully sleep like humans, if they stopped swimming they could drown. They need water constantly flowing through their gills to breath. The idea of a shark never sleeping and drowning sounded ridiculous. How could a living thing never stop moving?

Unfortunately the same fate awaits developers who stopping moving forward and progressing. In many careers you can hit a plateau and decide to stay there (see public employee). Developers, at least the ones who want to stay employed, do not have that option. Technology changes too fast. Stand still for more than a little while and you become obsolete, dead to the technology sector. It takes a little progress just to stay in the same place, it takes dedication, effort and hard work to stay alive for a prolonged period. Having spent the better part of 15 years in the technology/internet industry I know this is a fact.

So how does a developer keep up, stay relevant and not suffer the fate that so many others have? It’s simple, keep moving forward. If technology is constantly moving forward and you stop moving, it’s not long before you are left behind. So how does a developer move forward? Again it’s simple. Keep learning.

Read anything

Blogs, documentation, how to’s, wikis, it doesn’t matter. You most likely won’t remember a lot of what you read, but nuggets will stay lodged in your brain and you will be exposed to ideas and concepts you might not otherwise have come across. Reading is much better than watching a video or listening to someone explain something, it takes more effort and work on your part and that effort results in better memory retention (not water retention).

Write something

The inverse of reading is writing. Write about what you read, what you work on, how you solved a problem, how you stumbled across something ground breaking (that ten other people already discovered). Writing makes you think through things and consider how other people will digest what you write. It makes you, or at least it should, double and triple check that something works the way you write it should, especially if it’s your own code. Writing about something helps you to gain a better grasp on the topic, and a better understanding of how much effort other writers put into their work.

Know enough not everything

You’ve probably heard the phrase, “jack of all trades, master of none”. In many walks of life this a bad thing, for internet developers it’s a necessary evil. You can’t be a one trick pony. Most development work involves a technology stack, not “a” technology. Even within a team environment where there are specialists for certain streams of development, most members have/need some knowledge of the other streams.

Have a core set of technologies you master and then surround those with a complementary set of skills and technologies that you’re good at. For most work, “good” is good enough. As technology changes and evolves some of the core stuff may fade away and some of complementary skills may need to become core skills. The key is being able to identify when it needs to happen. For Flash developers it was early 2010 when HTML5 jumped into the spotlight. The one trick ponies freaked out, cried the sky is falling and prepared for the worst. The savvy developers read up, experimented, honed their skills and now have more to offer their clients and employers.

Take on projects you can’t do today

What? It sounds like a recipe for disaster but it is actually a recipe for success and growth. If you know you can learn quickly, challenge yourself by committing to projects that will force you to learn. Having a fire under you is a great motivator to figure something out and make sure it works. It also promotes ulcers if you can’t handle stress. Doing sample projects is great to get your feet wet but a real live project with deadlines and deliverables is where the real learning will happen. Why do you think militaries have live ammo training?

Failure is not an option

Actually it is but who wants to be a failure? No one. Don’t let failure scare you, learn from it. Go into a project planning to hit it out of the park, but don’t cry when you strike out, make adjustments for the next time you are up to bat. Own up to your failures. You broke the build, screwed up the server, accidentally deleted the backup. Stuff happens, own it, learn from it and move on. If everyone succeeded at everything they did the first time life would suck. Accepting failure and expecting failure are two very different things. Understand the difference and steer clear of the latter. Part of the learning process involves failure so get used to it.

Keep swimming

So there you have it, one key to not becoming a dead shark and four keys to not becoming an obsolete developer: keep moving, read, write, stretch and fail.

Apologies for the heavy reliance on cliches and metaphors.

04.15.11 Been busy … making breakfast

It’s been a few months since I last had a blog post which is really not like me. Unfortunately, or fortunately depending on how you look at it, I have been head down on a few big projects, the most exciting of which was helping the team at Welikesmall to rebuild and launch the new Dennys.com website.

It’s a pretty big departure from their previous site and after visiting it I’m sure you’ll agree it’s not your average restaurant site. The site uses some pretty advanced javascript and css tricks and runs on a .Net backend with a custom CMS (which is where my skills were used). It had been a few years since I last used Asp .Net and at first I was quite hesitant to jump back into it, awful memories of VBScript web forms were still lingering my head. Fortunately we were able to use Asp.Net4 with MVC3 which is a thing of beauty compared to .Net2.

Hopefully in the near future I’ll be blogging a little more about using Asp.Net4 and MVC to build out web apps and websites. After many projects using PHP it was a refreshing change to trying something different. Visual Studio made development a lot less frustrating and it has some really nice features to speed up and aid development.

I guess I need to update my about page to include .Net, the learning never stops, but neither does the fun.

12.31.10 2010 wrap up and 2011 gear up

I don’t typically write a post to review the past year or glance into the year ahead but I have decided to this year for a few reasons. First, by all accounts this was my most successful year as business owner and independent contractor. It is always a good thing to reflect on what you did so you can hopefully repeat it. Second, some recent posts by Ben Stucki and Jesse Freeman helped to solidify some thoughts that have bouncing around in my skull. And third, a recent Twitter thread about which technology Flash/Flex developers should be considering moving forward. I won’t cover all the details about what I did or what I plan to do, but I will offer up a few nuggets and some food for thought as we head into 2011.

Sweet success and a little history

This past year was my fifth year as a full time independent contractor/consultant and my tenth as a business owner. In 2000 I started a basic sole proprietorship for web development. The first five years were spent as a sometime full time employee, sometime contract employee, never quite fully engaging in complete self employment. Five years ago I made the jump into full time self employment and have not looked back. For each of the past five years revenues have increased by at least 25% from 120k in the first year. These number are pretty much on par with what Jesse outlines in his post and Ben has seen in his first year of business. I worked with a number of companies on a wide variety of projects, everything from HTML/Javascript websites to mobile Flex applications and a web based Flex application for managing PBX based phone systems to mentoring a 60 something retiree who wanted to get back into development. The first few years of contracting were almost 100% Flash and Flex, the last few years have seen that number to drop, now it is probably around 60%.

The most vivid moment for me in 2010 was Apple’s decision to not support Flash on their ‘i’ devices. The Flash haters showed up in full force and too many Flash devs started crying about the sky falling. My bread and butter is Flex and Flash development so it was a kick in the teeth to hear about Apple’s plans, however I’m not a one trick pony so I tried to find the opportunity in what was likely a shift in the web development landscape. First and foremost I am a web developer, client and server side. I’m not language dogmatic, for me it’s always about keeping it simple and using the right tool for the right job. Sometimes that is Flash, sometimes it’s HTML and JQuery, I can roll with PHP, Coldfusion, ASP or something new if the need arises. In the years ahead it will more likely than not be HTML5, I’m fine with that.

The other standout thing from 2010 for me was reading Rework. It was a great read on business ideas and concepts and really made me think about how I operate my business and how I could do things differently.

Seeing the glass half full

The reality is web development work is not going away anytime soon. There is still a ton of lucrative work out there you just need to look for it and be willing to get outside of your comfort zone. For me it’s not about what you know, it’s about what you can learn and how fast. As a developer when you stop learning you are dead. If a fish doesn’t swin, it can’t breath, it dies. It can NEVER stop swimming. A developer should NEVER stop learning. I can not stress that enough. Being able to learn and learn quickly has likely been the single largest key to my success. Don’t run away from the unknown, charge at it head on and crush it.

The way I see it Flash and Flex developers are actually sitting in a pretty good position. If you have matured with Actionscript from AS1 up to AS3 you should be able to easily jump into Javascript (and JQuery) without difficulty. Mobile will offer a lot of opportunity for you to create Flash and Flex apps to deploy across a multitude of devices and again, a solid grasp on AS3 should allow you to easily tackle Java or Objective C. I think the reason so many Flash people got up in arms over Apple’s decision was their fear of the unknown. What would the web look like without Flash and what would they do for work? The reality is Flash is not going away anytime some and if anything it was a good wake up call to add something new to their developer tool set.

2011, 365 days, 8760 hours

For me 2011 will be starting off with an eclectic bang. I have projects lined up into March (which is always a nice feeling): a website, a mobile site, some Flash work and some maintenance on a Flex app. I have also grabbed some good reading material to start off the new year with (never stop learning) .

My goals for 2011 are simply stated: increase business by another 25%, roll out a SaaS idea I have been working on and start contracting out some of the work I take on. One thing I have learned in five years of business, time is finite. You can work all you want as hard as you want but at the end of the day, a single person only has ‘x’ hours to work. As a one man shop, time is the single biggest limiting factor in how far I can take my business. For me to grow any further I need more time. I need to get other people’s time to work for me since I have maxed out my time and I need to find a way to generate revenue that is not tied directly to billable hours. That is nothing new, any business owner quickly realizes this, however as an independent contractor, I have long fought the need or desire to add more manpower, instead I choose to maximize my time. It took me a few years to feel like I had reached that point, and I purposely pushed past it, in order to make sure adding more manpower was absolutely the right thing to do.

There is a lot more I wanted to say in this post but I think instead I will wait and flesh out the ideas more for some future posts. Here’s to a great 2011.

12.21.10 I don’t want to be your rockstar developer or your ninja

It’s become a common phrase in developer job posts and interviews, “rockstar”. Are you a rockstar developer? Do you want to be the next rockstar developer? What do you need to do to become a rockstar developer? I have no idea how or why developers ever got labeled with “rockstar”, but personally it’s a label I never want and something that when asked for I take as a negative (a recent phone interview led to this post). To me it says the person asking does not understand their target audience … developers. Have you ever seen a posting for a rockstar lawyer, doctor or teacher? Not likely, it sounds ridiculous. So why do people seek out rockstar developers?

To me a rock star infers celebrity, partying, passion, an entourage, creativity, self promotion, late night benders, and self destructive behaviour. A few of those traits are certainly things that you would want any employee or contractor to have, passion and creativity to be specific, the rest you could do without. Rockstar does communicate being at the top, but does it mean the best? Are Morzart or Beethoven considered rockstars? Does a rockstar really make the best music or do they simply garner the most hype and attention? If you are hiring a person to develop mission critical software or a flagship website for your company do you really want someone with the traits or behaviour of a rockstar? No? Then stop asking for it.

First and foremost I’m a professional web developer. I take great pride in my work, my education and the effort I put into whatever I set my mind to. It’s my business, my livelihood and my passion. To me it’s a slight to be asked if I’m a rockstar developer. Why not ask if I’m a code monkey while you are at it?

Quit seeking rockstars (and ninjas, which is even more absurd). Look for professional, pragmatic and passionate developers.

10.22.10 Flex for Android Presentation Slides and Code

As promised here are my slides and links to sample code from my Flex for Android presentation at the Toronto Flex User Group meeting. Had a great time presenting for the first time in a long time, will certainly be offering to do it again.

You can find all the source code for the samples and build script on github.

Here are the links mentioned at the end of the presentation.

For those of you who were present, 10 out of 11 demos worked perfect, number 11 died when I tried to run the debugging. I forgot to add the 'android.permission.INTERNET' to the application descriptor, my bad. You can find it in the source code.

10.21.10 Flex for Android Presentation

Flex Andoird ApplicationsI am getting ready to do a presentation today for the Toronto Flex User Group on using Adobe Flex and AIR to create Android applications. Developing Flex apps for Android is an exciting new frontier for Flex developers. Adobe is working to release a new version of the Flex framework, named Hero, that will be optimized for mobile devices, but this doesn't mean that the current framework can't be used to develop Flex applications for the Android platform.

My presentation will cover:

  • size considerations
  • user interactions
  • device capabilities and how to access them
  • optimization
  • demos
  • using the Android SDK tools

Check back soon for the presentation slide deck and demo sample code.

09.29.10 Custom Flex List and DropDownList for Android

For those of you who have had a chance to create Flex applications for Android, you have quickly discovered how useless the standard Spark components are. Too small and no true touch support (aside from clicking). This is the first in what I hope will be many demos of reworked Spark components. My goal is to make them work much better on mobile and touch sensitive devices.

The first two components I have reworked are the List and DropDownList, both are virtually unusable in the standard format on touch devices.

The standard List component is not swipeable so the first goal was to add the ability to swipe up/down to scroll the list. Creating a custom scroller class made that possible. The next step was reworking the list to prevent selections on mouse down events. What you don't want is a list item to be selected every time you touch the list to swipe it. This was a little more involved and required some hacks to get at private methods and properties of the List and BaseList classes.

Creating a replacement for the DropDownList was a small leap after getting the swipe list working. It's essentially a text input and button that you can assign a dataprovider to. When you click the button, a modal window is opened with the swipe list. Select an item, click OK and you're done.

You can get the source code on GitHub, enjoy.

07.06.10 Flex Spark List with custom scroll bar and itemrenderer

I recently had a request for some help on skinning a Flex 4 Spark List with a custom scroll bar and item renderers. Even though the skinning process has gotten much easier with Flex 4 and the Spark components there is still a learning curve and a few things that are either learned through a lot of trial and error or by having someone point it out to you. Hopefully with this post I will be able to save some other Flex developers the "trial and error" route.

This is the comp of the list that needed to get created. Nothing to complicated at first glance, the standard Spark scroll bar needs to get replaced and a custom itemrenderer will be needed for the list.

So how does one go about turning the image above into a functioning Spark List, follow along.

Step 1 – Prep the skin pieces

The scroll bar track and thumb from the comp need to be turned into assets that we can use in the Spark skin. The itemrenderer can be completely done with code. If you are familiar with Photoshop turn off the surrounding layers, select the thumb and track, respectively, and then do a 'copy merged' and paste each as a new image. Save them as transparent PNG's that can be embedded into the Flex swf.

Step 2 – Create the Spark Skins

Three skins will be required for this task, one for the thumb, the track and the vertical scroll bar (right click, view source on the swf at the bottom to view all the source code).

The track and thumb skins simply embed the pngs that we created in step 1.

The track skin:


<s:BitmapImage source="@Embed('assets/scroll-track.png', scaleGridLeft='2', scaleGridTop='5', scaleGridRight='12', scaleGridBottom='275')" 
				   left="0"  top="0" right="0" bottom="0" />
    

And the thumb skin:


<s:BitmapImage source="@Embed('assets/scroll-thumb.png', scaleGridLeft='1', scaleGridTop='5', scaleGridRight='13', scaleGridBottom='97')" 
				   left="0"  top="0" bottom="0" right="0" />

In both cases we use the scale nine attributes to make sure the graphic scales cleanly in the horizontal and vertical directions.

The scroll bar skin sets the skins class for the track and thumb buttons to the new skins we have created.


<s:Button id="track" top="0" bottom="0" right="0"  width="15"
		  focusEnabled="false"
		  skinClass="com.dgrigg.skins.VScrollBarTrackSkin" />

<s:Button id="thumb" width="14"
		  focusEnabled="false" visible.inactive="false"
		  skinClass="com.dgrigg.skins.VScrollBarThumbSkin"   />

That's it for skin creation.

Step 3 – Styling via CSS

Once the skins are created the next step is creating a css file to get the List component to look the way we want. Using css selectors we can tell the List to use the new skin class we have created for the vertical scroll bar on the list. The 'fixedThumbSize' style tells the scroll bar if it should adjust the size of the thumb based on the list length. In this case we want the thumb to always be the same size so it gets set to 'true'. We have also used CSS to turn off the horiztontal scroll bar, sometimes with custom item renderers the horizontal scroll bar will make an appearance when you don't want it to.

s|List 
{
	contentBackgroundAlpha:.5; 
	contentBackgroundColor: #000000;
	borderColor:#000000;
}

s|List #scroller 
{
	horizontalScrollPolicy: off;
}

s|List s|VScrollBar {
	skinClass: ClassReference("com.dgrigg.skins.VScrollBarSkin");
	fixedThumbSize:true;
}

Remember to load the style sheet into the main application class and the new pimped list is ready to go.

Step 4 – ItemRenderer creation

The final step in bring the comp to life is creating the ItemRenderer. Fortunately Flex 4 has made this very easy. Navigate to the package you want to create the renderer in and then right click and select 'New/MXML Item Renderer'. A basic item renderer will be created that you can begin working with. Here is the code for the item renderer we will be using.


<?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" 
			xmlns:s="library://ns.adobe.com/flex/spark" 
			xmlns:mx="library://ns.adobe.com/flex/mx" 
			autoDrawBackground="false" height="85" width="385">
<fx:Script>
	<![CDATA[
		
		override public function set data(value:Object):void 
		{
			super.data = value;
			
			if (value)
			{
				titleLbl.text = data.title;
				contentLbl.text = data.text;
				titleLbl.visible = true;
				contentLbl.visible = true;
				readLbl.visible = true;
			}
			else
			{
				titleLbl.text = "";
				contentLbl.text = "";
				titleLbl.visible = false;
				contentLbl.visible = false;
				readLbl.visible = false;
			}
			
		}
	]]>
</fx:Script>
<s:states>
	<s:State name="normal" />
	<s:State name="hovered" />
	<s:State name="selected" />
</s:states>

<s:Rect left="0" right="0" top="0" bottom="0">
	<s:fill>
		<s:SolidColor color.selected="0x383c40" color.normal="0x23252a" color.hovered="0x383c40"
					  alpha.selected="0.8" alpha.hovered="0.5" alpha.normal="0.8" />
	</s:fill>
</s:Rect>

<s:Label id="titleLbl" 
		 x="15" y="15" 
		 width="370" color="0xffffff"/>

<s:Label id="contentLbl" 
		 x="15" y="30" 
		 width="370" height="30" 
		 color="0xeeeeee" fontSize="11"  />

<s:Label id="readLbl" 
		 x="15" y="65" 
		 color="0x336699" color.selected="0xCCCCCC" 
		 text="READ MORE" fontSize="11"/>

<s:Line left="0" right="0" bottom="0" width="1">
	<s:stroke>
		<s:SolidColorStroke color="0x000000"/>
	</s:stroke>
</s:Line>

</s:ItemRenderer>

A few things to note in the itemrenderer code. First, the 'autoDrawBackground' attribute on the ItemRenderer base class is set to 'false'. This turns off the  selected/rollover/hover background that normally gets drawn and displayed. The s:Rect instance is used with the state selectors on the color attribute to create custom rollover color/alpha combinations. The normal list will allow you to change the color but you can't tweak the alpha so this is your best option. Second, the 'set data' method was overwritten in order to set the values of the various labels. This is a must step for pretty much any custom item renderer. The overwritten method does a small check to see if the incoming value exists, if not the labels get hidden. This is always a good practice to prevent empty rows from appearing in the list.

Wrap up

That's it. A custom scroll bar and item renderer in four steps. No rocket science, just a little Flex know how. You can view the source code here.

And this is the final product, not bad.

 

06.25.10 Editable ItemRenderer for Flex 4 Spark List

One of the nice features of the Flex mx:List component is that you can set the renderers to be editable without having to create a new itemrenderer. With the Spark List (s:List) that option is no longer available. Fortunately it is quite easy to create a custom editable itemrenderer for the List.

 

Select an item in the left column and change the value, you can see the change events being traced out. Right click to view the source code.

There are three steps making an editable itemrenderer for the Spark List component.

First

Create a custom itemrenderer with a TextInput and a Label.

 <?xml version="1.0" encoding="utf-8"?>
<s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
autoDrawBackground="true">


<s:Label id="labelDisplay"
text="{data.label}"
top="7" bottom="5" left="5" right="3"/>

<s:TextInput id="inputTxt"
visible="false"
top="1" bottom="1" left="1" right="0"/>

</s:ItemRenderer>

Second

In order to toggle between the read and write states we need to add a click handler to the label and focusOut handler to the text input. You will notice that I simply set the respecitive components to either visible or not instead of uses the spark states. Using the spark states would require extending the list component to include an editHover state and for this example I wanted to keep things simple.

 <fx:Script>
<![CDATA[
import spark.components.supportClasses.ListBase;

private function onChange(event:Event):void
{
isEdit(false);

}

private function onEdit(event:Event):void
{
inputTxt.text = data.label;
isEdit(true);
//set cursor postion to end
inputTxt.selectRange(inputTxt.text.length,inputTxt.text.length+1);
inputTxt.setFocus();
}

private function isEdit(value:Boolean):void
{
labelDisplay.visible = !value;
inputTxt.visible = value;
}


]]>
</fx:Script>


<s:Label id="labelDisplay"
text="{data.label}"
click="onEdit(event)"
top="7" bottom="5" left="5" right="3"/>

<s:TextInput id="inputTxt"
visible="false"
focusOut="onChange(event)"
top="1" bottom="1" left="1" right="0"/>

Third

This is the not so obvious step. You need to manually dispatch an event through the List’s dataProvider in order to notify the List and anything else that is using the data source that it’s contents have changed.

private function onChange(event:Event):void 
{

var oldValue:String = labelDisplay.text;

if (oldValue != inputTxt.text)
{
data.label = inputTxt.text;
labelDisplay.text = inputTxt.text;


//dispatch the data update event
var list:ListBase = this.owner as ListBase;
list.dataProvider.itemUpdated(data, 'label', oldValue, inputTxt.text);
}
isEdit(false);

}

And that’s it. A basic editable list itemrenderer for the Spark List in 3 easy steps. Right click on the swf to see the source code.

06.23.10 Developing Flash and Flex applications for Android

Since Apple kiboshed Adobe’s hopes of iPhones running Flash content, Android (Google) has stepped up and offered Flash and Flex developers a mobile platform to development and deliver content on. This has come as great news to Flash platform developers who want the opportunity to dive into the mobile environment. Many Flash (and Flex) developers I have spoken to about mobile development are still unsure about what it will take to deliver Flash player based content and applications to mobile devices.

The good news is the development and delivery process is almost identical to the current process. Use Flash or Flash Builder to create a swf file and then either deploy that to a website, to be served up via an HTML page or wrap it with the AIR runtime and packge it for installation on an Android phone as an native Android installer.  Really the only difference in developing for the Android platform is the extra step required to create an ‘.apk’ file if you want to create a stand alone application.

The bad news is the environment that the content and applications are running in is quite different from anything the vast majority of Flash platform developers have worked in. The screen is small, the bulk of user interactions are touch based, the screen can easily be rotated and tilted, the user is often quickly looking at the screen while interacting with the environment around them (ie texting and walking at the same time) and the processor doesn’t have the juice most modern desktops and laptops have. This means that while the swf delivery and development process is quite familar the UI and UX development is anything but. Add in the processing constraints and most Flash platform developers will quickly realize there is a significant learning curve to developing Flash and Flex content for Android (and mobile in general) devices.

So what are the key areas developers need to be aware of?

  1. Screen size
  2. User interaction
  3. Device capabilities
  4. Performance

1. Size, it really does matter

Below are two screen shots of the same Flash application running on a Google Nexus One and a normal desktop computer. The application is 480 x 800. The first image shows the screen as seen on a normal desktop computer with the screen resolution set at 1280 x 1024 (fairly standard desktop resolution). The second image shows the same screen scaled to the physical size as seen on the Nexus screen. It might seem obvious that the mobile screen will be smaller than the desktop screen but watch how screen resolution affects something that is the "same" size.

Desktop screen shot

Flex Android app on desktop

 

Android (Nexus One) screen shot

 

As you can see there is a huge difference in the physical size of the two screens even though the application is viewed at 480 x 800 pixels on both devices. Mobile devices have much higher screen resolutions than normal computers, 240dpi vs 72dpi. As you can see from the images above this makes a huge difference. 

For mobile applications this has two very big implications.

First a smaller screen with a much higher resolution means you have much less physical real estate to work with when laying out the user interface. Designers need to be acutely aware of this when creating screens and views. Add in the fact the users are often quickly glancing at the screen which means screens can not afford any clutter and designers have a difficult task in packing a lot of meaningful content into a very small area.

Second, since everything appears much smaller on mobile screens things like text and UI controls (button, checkboxes, etc) need to made larger for readability and clickability (if a beer company can use drinkability I can use clickability). On a mobile device the main pointer is the finger tip which is a lot larger and less precise than a mouse pointer. In a desktop application the typical button size is around 25 pixels in height, on a mobile device 60 pixels is the norm, anything smaller than that and it becomes very challenging to click the button you want.

I couldn’t help but be reminded of this Simpson’s clip after my first experiments building a Flash application for the Android.

 

This leads to my second point.

2. User interaction, it’s all about the finger

Apple and the iPhone ushered in a whole new era of computer interaction. Sure ‘touch’ has been around for a long time, but it was Apple who made it mainstream. Point and click are things of the past, now it’s point, flip, swipe, pinch, wipe. Sounds more like a heated game of rock-paper-scissors. The great news for Flash platform developers is that AS3 has full gesture support built in and ready to be used. Events are dispatched for a multitude of user gestures including tapping, swiping and rotating. AS3 also supports multi touch for instances where multiple touch points need to be tracked. 

This is a whole new territory for Flash and Flex developers, we generally just interact with the mouse and keyboard, a few of us (myself included) have developed for larger touch screens, but not small mobile screens. Fortunately there is some good information to be found on designing for human interaction. Google has provided some guidelines for user interface design and Apple has some really good (and thorough) documentation on Human Interface design.

This is an area that will make or break an application. It won’t matter how great the apps processes information or what information it displays or what it allows users to do, if the control is non-intutive and confusing users will drop it faster than a hot potato (and they may just throw their phone).

3. Device Capabilities, the swiss army knives of personal computing

Most mobile devices have as many sensors and media inputs as swiss army knives have blades. There are GPS sensors, accelerometers, touch screens, cameras, microphones, video cameras, scroll balls, the list goes on. The trick for developers is figuring out how to leverage the various sensor inputs (and outputs) to create unique and pleasant user experiences.

For the Flash and Flex developer most (if not all) of these sensors will be available to AIR based applications and most of them will be available to browser based swfs. This an area where Flash applications will really be able to shine. Flash has supported camera and video input for a long time, working with these types of media inputs should be second nature to many Flash platform developers. Some of the other sensor inputs are new (ie accelerometer, microphone and gps) but Flash has the advantage of being able to access and use them, sorry HTML5 and javascript.

Personally I think Flash is uniquely positioned to offer mobile users amazing experiences based on the capabilities of the devices. Flash has been used for years to create amazing, immersive, media rich user experiences. With increased ways to receive and provide feedback between the user and device who knows what applications will start to look like and how they will function.

4. Performance, where the rubber meets the road

Performance, performance, performance. This is "allegedly" why Apple doesn’t offer Flash on the iPhone/iPad. I don’t buy it. I have seen Flash running on Android devices first hand, both in the browser and as stand alone applications and trust me it runs perfectly. Adobe has worked very closely with mobile manufacturers to provide hardware acceleration, reduce battery usage and deliver maximum performance with the upcoming Flash 10.1 release.

The critical issue for developers is to remember they are developing for devices that don’t have the same processing resources of typical desktop and laptop computers. Special attention needs to be paid to optimizing performance as much as possible. Grant Skinner has a great presentation on Flash performance, where gains can be found and where trouble lurks. Garbage collection, green threading, blitting and generics are all areas that AS3 developers should understand in order to optimize and maximize the performance Flash can deliver.

The old computer mantra is "garbage in …garbage out". If your application runs slow, freezes or crashes, don’t blame the device, virtual machine, Adobe, Google, Android or your mother, first look at your code. This is where the majority of backlash against Flash performance should really be pointed. It’s not the Flash plugin and runtime, it’s the fact that anyone can "develop" a Flash application and many people that do, don’t understand the performance and memory implications of what they are doing. With the ability to release Flash applications and content to mobile devices, Flash will be under increased scrutiny, do the community a favor and write clean, efficient code.

Where to next?

Who knows? The mobile environment is like the internet was 10-15 years ago, the wild wild west. A lot of really cool things will get made and a lot of dogs will come and go. The only thing I am sure of is that the Flash platform will have a large place in how applications and content get developed, deployed and used. It’s an exciting time for Flash platform developers, especially after all the HTML5/Apple rhetoric. Get a mobile device, get some neat ideas or find someone who has them and build something amazing, I know I will be.