Five Ways to Connect Flash to Embedded Systems: AIR

Do you remember 7th grade... and that cute girl you sat behind in social studies? Yeah... the one you didn't have the guts to talk face-to-face to. All I can say, is that passing 'notes' saved your ham. Period.

[ fast forward twenty-something years ]

You still have communication problems... but now it's microcontrollers instead of girls. Hmm... notes...

Merapi Project
Merapi takes the concept of note passing up a notch; we swap out the term 'notes' with 'messages' and give it a permanent home in application architecture.

What purpose does it serve in the application architecture? It acts as a communications bridge or broker between AIR and Java. Essentially, it would allow you to pass off tasks that cannot be performed natively in AIR, across the bridge (Merapi), to a context (Java application) that can... with a means to return results if needed.

"Merapi is a framework that bridges an AIR application with a Java application, both running on the desktop. This communication is accomplished through a class that exists in Java and ActionScript called merapi.Bridge."

To all the people involved in the Alpha, Roundarch, and talented engineers that worked on the project - thank you for all your hard work!

[ sigh ]

AIR 2.0
Time for the bitter-sweet news. New functionality in AIR 2.0 effectively replaces Merapi. So, if you're developing AIR applications and want to communicate with embedded systems you'll want to take a peak at this article by Christian Cantrell.

All the work you did in your Java application is still good; you're just going to have to adjust your communication bits to do their business over the Native Processes API. Oh... and you'll have to package everything in a native installer. No big right?

Seriously though, I consider AIR as the first and best-in-class tool for creating UI for an embedded system. Flash security restrictions are easier to manage, the Native Processes API gives developers some wiggle room to code the embedded system conduits in the language of their choosing, and the actual interface can be done in Flash or HTML/CSS.

Nervous? Don't be... check out this simple example by Jeff Swartz. Conceptually, this little gem gives you a road map for talking to your embedded system / microcontroller (this would happen inside your native application) and the foundation for a communications protocol (the echo exchange).

Ok. That's it for the first approach - to use AIR and the Native Processes API. Deal. Done.

Next installment: Five Ways to Connect Flash to Embedded Systems: WiFi