Flex App Scaling Issue

Just in case you were silly enough to deploy a fullscreen Flash/Flex app to the web, browse to it on a Flash enabled mobile device or tablet, and expect it to look nice:

<meta name="viewport" content="width=device-width, initial-scale=1.0,
minimum-scale=1.0, maximum-scale=1.0, user-scalable=no,
target-densitydpi=device-dpi"/>

To be fair, it’s not a Flash/Flex issue at all, but rather a mobile browser detail worth knowing about:

http://www.html-5.com/metatags/index.html#viewport-meta-tag

Essentially, mobile browsers assume a default viewport width of 980px at 72dpi for any given web page and scale the content according to the actual device DPI.

Good for HTML; probably not want you want for your fullscreen Flash/Flex app. Use the tag above to prevent scaling.

Posted in Code | Tagged , , | 1 Comment

Level Up

Holy crap, it’s only a week away!

What surprised me most about the first Try { Harder } was just how intense the whole thing was. At other conferences you can often just sit back and learn at your own pace (provided the material is actually technical enough to keep you interested). T{H}2011 was different. Continue reading

Posted in Code | Tagged , , | Leave a comment

Readme

Have I mentioned that I love GitHub?

When you put a readme file into a folder that file is formatted and presented nicely through GitHub’s file browser. For example:

https://github.com/visionmedia/uikit

Scrolling down a little we can see a nicely formatted readme file. Continue reading

Posted in Banter, Code, Resources, Robotlegs, Tutorials | Tagged , , | 2 Comments

RL Reloaded

I’ve been worried for quite a long time. Robotlegs 1 is small and simple but a little difficult to extend. I want Robotlegs 2 to be flexible without becoming overly large or complex.

Timing

To extend any framework you need to be able to hook into that framework’s initialization process.

That Damned Context

The Robotlegs 1 context class was, to be frank, rubbish – it set defaults, configured dependencies and controlled initialization. Worse, to hook into the initialization process or change the defaults, users had to extend the class itself resulting in the proliferation of funny looking words like SignalDrivenCovariantlyMediatedModularShellContext. Continue reading

Posted in Banter, Code, Robotlegs | Tagged , , , , | 2 Comments

Unit Testing: My problem with assertThat()

I write “ass” a lot while I’m coding.

Posted in Banter, Code | Tagged , , , | 3 Comments

Commit Messages

When reviewing a commit I’m not interested in what you did. A commit is a codebase transformation. I’m interested in what will happen to my codebase when I apply your commit.

Bad “I did this” form:

I had a cup of coffee, went for a walk, and changed some code.

 

Better “This commit does this” form:

Adds unmap() to the command map API.

A commit message should describe the commit, not the process you went through to create it – it is not a diary.

Posted in Banter, Code | Tagged | Leave a comment

Unit Testing: Why I prefer assertThat()

Consider:

[Test]
public function null_criteria_should_not_match():void
{
  assertFalse("passing null should return false", instance.match(null));
}

When reading the test above I have to do a lot of scanning. Continue reading

Posted in Banter, Code | Tagged , , , | 1 Comment

Show Me Your Tree!

What does your display list look like?

While doing some work on multi-context view auto-wiring I wrote a little utility that iterates through the containers in a given display object container and builds some useful stats. Continue reading

Posted in Code, Questions | Tagged , , , | 23 Comments

Robotlegs – The Book

It’s here! The ActionScript Developer’s Guide to Robotlegs:

http://oreilly.com/catalog/0636920021216

Written by the amazing @stray_and_ruby and @jhooks

Posted in Resources, Robotlegs | Tagged , , | 1 Comment

Why X Is Better Than Robotlegs

While the core Robotlegs developers do some preparatory undercover work on Robotlegs 2, some adventurous Robotlegs users have decided to take things into their own hands and start building their own ideal frameworks. I think this is great. The best ideas will almost certainly make their way back into RL2 in some shape or form. Continue reading

Posted in Inspiration, Robotlegs | Tagged , | Leave a comment