• Home
  • /Posts Tagged 'Adobe AIR'

Posts Tagged ‘Adobe AIR’

No one is moving from Flex to HTML5

UPDATE:

You can’t make this stuff up. Someone sent me a couple of great graphics supporting my assertion. So please respond with anything that supports the contrary.

Update:

After getting a little splashback from some of my friends and colleagues, I thought that I’d add a little supporting evidence to my assertions.

“Moving” to HTML5 at this point is senseless gambling.

I’m not just blowing smoke up your pipe here either. Open your browsers to HTML5test.com and see for yourself. Come on… go ahead and do it!

The HTML5 support score on latest Windows 7 browsers that I have: IE 138; FF 330; Chrome 400. And then on the Mac OSX 10.6 that I have; Safari 319; FF 340; Chrome 400. That makes Chrome our top student with a whopping 80%. And I’m what many would call an “Advanced User.” Expect less from the general public.

Last I checked, 80% was a low “B-”. And with over 50% of the browser usage coming from browsers that have failing scores, you can see why I would not recommend HTML5 except in specific edge cases. And you thought IE6 was bad! (Browser stats from w3schools.com)

As a mobile or web developer, adding HTML5 to your list of skills is imperative. But with the severe lack of consistent support, moving an enterprise development project to HTML5 now is purely experimental or an exercise in ego.

If you think I’m wrong, please provide supporting evidence and I’ll gladly educate myself.


 

Original Post:

The fear, uncertainty and doubt (FUD) is being slung around by profiteers like folding chairs at a WWE event. The haters are still being haters. Nothing new there. But now I see JavaScript companies’ desperate pleas for Flex developers to start using their HTML5 software.
The context is all wrong here.  Very, very few Flex developers have shifted, moved, changed over, or whatever you want to call it… to HTML5 (or anything else JS-based.)

 

There is not a move to HTML5

I will go as far as to say that there is not a move to HTML5. The simple fact is that, developers are being developers. No matter the background, we are always trying to broadening our skill sets. This includes HTML5 since it started showing up a few years ago. For anyone to imply, or state outright, that there is some mass exodus from Flex is completely false!

The reality is still the same, Flash Player is still the most consistent cross-browser, cross-OS, and cross-device platform for software development.

It doesn’t matter if you are building business software or games, with one technology you are able to build for the desktop, Internet Explorer, Chrome, Firefox, Safari, Android, iPad, iPhone, Blackberry and Internet TVs.

What most haters fail to realize is how nice it is to go through your bug list and not find ANY bugs that are browser/platform specific. The only bugs I have, are actual bugs that I can fix. Not browser support related issues that you have no control over. For the first time in years I had to deal with browser specific issue when our On3 client embedded the application in a JSF, JSTL, ADF container. It reminded me of how good I have it. I don’t have to deal with this headache on a daily basis. In fact, it was one of the complete joys that drove me from building DHMTL development to Flex development.

So, the next time someone says, “Flex is dead” or “Everyone is moving to <insert tech here>,” take it with a grain of salt. In all likely hood, they have a hidden agenda.

 

Thank you Moai for this great graphic on the HTML5 Hype vs. Reality.

Security Soapbox – Decompile Flash/Flex

Having built/architected/developed/consulted many Adobe Flex applications and being one of the first certified Flex instructors in the world, I’ve seen a lot of Flex applications. Some good, some bad.

But no matter how many applications or who I’m talking to, I always stress the importance of securing proprietary information. By securing, I mean don’t put it in your application. Unless your are encrypting your application and decrypting at runtime, you are subject to a decompiler exposing your secrets.

There are Flash decompilers that will take any SWF and give you the source:
Trillix Flash Decompiler is one of the best commercial tools I’ve found.
I’ve even seen guys decompile, make changes and then recompile a Flex app. This is scary! Say goodbye to licensing software in Flash.

But HP just released a tool that has caught my eye as well. (Note: I have not tested this tool) It claims to decompile and test for security weaknesses. It’s called SWFScan and it’s a free Windows based tool from HP.

If security in a Flex or Flash based application is a concern for you, you must look at these tools. If security is not your concern, look anyway.

CFUnited has lots of Flex Training Sessions

One of my CFUnited sessions:
AIR: Building Desktop Applications with Flex 3 – http://cfunited.com/2009/topics/235

Here is a little Q&A about CFUnited and me.

1. Have you spoken at CFUnited in the past?  What would you tell someone who hasn’t been to CFUnited before?

Yes, I have spoken at CFUnited in the past. And I’d have to equate it to seeing your favorite band in a small venue. Same great talent, but not nearly as crowded allowing you to easily network with so many very talented people.

2. Why should people attend your session(s)?

If you have been wondering about, thinking about or just plain curious about Adobe AIR, my session will clear the air… uh, no pun intended.

3. Do you have any projects in the works that you will be revealing at CFUnited?

I have been doing quite a bit in the mobile space, actually more of an add-on to some of our AIR development projects. So look forward  to ways to take your application to iPhone, Symbian and Android.

4. Besides your topic, what other sessions are you looking forward to?

I know I’ll get in trouble for this, but its not the sessions to which I really look forward. Its the one on one conversations that I’ll have with people from all over that help me solve problems and come up with new ideas. That is what I’m looking forward to. Oh and the sessions help me identify who I’d like to meet.

5. Where can people find you at CFUnited?  (At the bar, networking, working, in your room, etc.)

Networking.

6. What’s the latest news with you? Has anything changed since last CFUnited?

Since On3 is all about helping organizations grow their own Flex developers, we have opened a new training center in Denver, CO.

7. When you are not working what do you like to do in your free time?

Mountain Bike in the Spring thru Fall, Ski during the Winter

Use AMF with JavaScript in Adobe AIR

I’ve been working with Adobe Flex since its beta and have been a long time believer in using Action Message Format (AMF) as the communication protocol. I’ve also been working with Adobe AIR since its beta, but had only used AMF with Flex-based AIR applications. Until now…

I was working on a JavaScript-based AIR application (some refer to this as an AJAX-based application) recently where they wanted to use AMF, but didn’t want to hide a SWF in it to facilitate the AMF communication. Since there are other Flash Remoting gateways available, like openAMF and AMFPHP, it would be great if I could just use a JavaScript library to do the communication with those gateways.

If you look at examples in Flash that do this type of connection, you’ll notice that they use a NetConnection class. Guess what?! That class is also available in the JavaScript API for AIR. Yes, its that simple!

So with a simple refactoring of the same code from Flash, I was able to get my JavaScript-based AIR application to communicate with a Flash Remoting gateway. This example assumes you have installed a Flash Remoting gateway somewhere, that you replace [my_flash_remoting_gateway] with the gateway root and you’ve created a class with a method that you can invoke.

<html>
<head>
<title>JavaScript-based Flash Remoting</title>
<link href="sample.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="lib/air/AIRAliases.js"></script>
<script type="text/javascript" src="lib/air/AIRSourceViewer.js"></script>
<script type="text/javascript">
function doAMF()
{
var netConnection = new air.NetConnection();
netConnection.connect("http://[my_flash_remoting_gateway]");
var responder = new air.Responder(onComplete, onFail);
netConnection.call("HelloWorld", responder);
}
function onComplete(results)
{
alert( results.length );
}

function onFail(results)
{
alert(results)
}

</script>
</head>

<body>
<h3>Get data over AMFPHP</h3>

<ul>
<li>Has access to AIR APIs:
<input type="button" onclick="doAMF()" value="Make AMF call"/>
</li>
</ul>

</body>

</html>

Here is an example class in PHP:

<?php
class HelloWorld
{
function HelloWorld()
{
$this->methodTable = array
(
"say" => array
(
"access" => "remote",
"description" => "Pings back a message"
)
);
}
}
?>