Why cant Microsoft/Google and Apple agree on one open source Javascript converter tool?

For some reason, companies like Microsoft, Google do not seriously believe javascript is a great programming language. I have constantly been working in javascript and see the pros and cons. I see that because of it’s amazingly dynamic nature you can do almost anything. However, because of this dynamic nature it makes it prone to errors almost immediately.

Most recently Microsoft unveiled it’s new language called Typescript, which converts an object oriented scripting language with Interfaces, Classes, constructors into javascript. Now look at Google Dart which by the way is in full swing and it does nearly the same thing except with an actual VM. Some people thought it died, but they are working on a milestone 1 release.

So the big question is, which one is going to DIE first??? Or is Apple going to come up with their own intermediary language and pose another type of intermediary language that converts to JS.

Ahh, I miss the days of Flash being King. Where you had one tool to do amazing stuff and never needed to worry about browser dependencies.

I was knee deep into an HTML5/CSS3 book about 8 months ago and the opening introduction said “We need to infer to our clients that the project will not look the same on multiple browsers.” Wow, seriously? It’s because of this problem and competing vendors that we have this issue. Why cant vendors just work together one on project and support it? There is very little money in open source tools. Wouldn’t it be nice if Mozilla, Microsoft and Apple all supported Dart?

Adobe’s Mobile Development Initiative

I would like to get feedback from developers from using Adobe’s Mobile Development toolset, particularly in flex sdk 4.5.

Can some developers provide some pros and cons in using it? Speed of performance, android phones, tablets. Also, Ive tried some apps on an Iphone 3GS and found them really slow.

How is the speed now? What can and cant be done?

RobotLegs < Pure MVC - My rant

So, Im always digging into new frameworks and trying to understand the philosophies behind why developers chose to make new frameworks to help others.

After falling in love with the new [Inject] metatag and thinking it’s the coolest thing since Java has been doing this for years anyway with Annotations, I thought this framework must be rad =)

So after hours of looking at the documentation, the one thing I found out and is the bane of all robot legs development is CLASS NAMING. Lord have mercy, there is a base class called “Actor” – THATS THE NAME OF THE CLASS. Ok, so after reading GoF and all these development books over the years the one thing that java/flex/flash developers have a huge problem is is correctly conveying the names of classes. Conceptually representing something. With that said “ACTOR” is the worst name for a class ever – I mean, it communicates absolutely nothing! The concept is so ambiguous and it hurts just thinking about it. And it’s used EVERYWHERE. PureMVC atleast names the classes by common design patterns so it’s clear to everyone using it if you’ve studied these patterns.

Lord have mercy – can we just get a pure mvc framework with an [Inject] meta tag? Ill be happy then =)

Inline Webkit Renderer for Flash Player 11

Something that I think should be done for the flash player, now that HTML 5 is gaining ground, is an inline HTML renderer that should be packaged as part of the download. Potentially it could be an optional download. I mean the core code base is already a part of the AIR packager. How hard would it be to make an external RSL that gets cached or make it part of the flash player 11 installation with a checkbox to download this in addition.

If there is an update to the web kit renderer, it then flags this in the flashplayer download manager… Just a thought to make flash player 11 completely blow away. We’ve got 3d support, but how about a little HTML 5 renderer as part of the flash player?

AGAL (Adobe Graphics Assembly Language) conversion to HLSL

So, the new flash player is out. And the one thing Im thinking is – AWESOME. So, I’ve been looking at the API docs and the program code and all that looks hot. Stencil Buffer, Depth Buffer, Vertex Buffer – they basically made it almost identical to NVidia’s C++ CG, CGFX. However I did not see profiles, but Im sure this is going to be a smart solution done.

So the wheels are turning and Im only thinking to myself, If Adobe, NVidia, and Microsoft can get together to develop some kind of HLSL (High Level Shader Language) that all three can use – a simple wrapper – MAN we’re going to be in heaven as 3d developers. Then, the shaders for say your favorite PC game can be loaded directly into a flash game, and the same shaders can apply to the model. Because you’ll be using a PC for all types of development.

The only issue this poses is when you export to mobile – a lot of the same shaders will have to be dummied down – so adobe will need to come up with some kind of profile mechanism – similar to how CGFX does it where it loads back up shaders if the hardware cannot support the shader.

Are you excited about this? I think this is going to kick ass!!!

JAR like use in Flash? Use mxmlc -load-externs

For the last few years I’ve been developing in flex. One of the very nice features is RSLs to save on file space, but no matter how much optimization work you end up with a huge SWF right? Which is why developers end up using flash for web development.

How many times have you wanted to use the RPC components but ended up scrapping them because they bloat your SWFs? I’ve had to resort to custom AS3 soap libraries, or even have had to hack an existing AS3 web service implementation because it wasn’t compatible with ALL SOAP specs, as in each server has little nuances which can potentially break an AS3 implementation. The joys =)

Ive been doing a lot of flash dev recently, and one option which I think a lot of flash developers miss over is the fact that they compile assets within assets that are shared across multiple SWF files. E.g. you have the Pure MVC framework or cairngorm classes compiled into 5 swfs, when really, all you need to load in a single shell SWF and all future SWF files can reference the classes normally WITHOUT compiling in the entire framework.

So how do you do this? How do you make your other SWFs not compile the entire framework such as ui components and buttons and flash?

Well, instead of doing all the runtime instantiation and non strong typing – you know like var myClass:* – which is prone to errors, use mxmlc -load-externs.

So the steps are as follows:

  1. Create main loader SWF that uses the majority of the framework, ui components etc.
  2. Generate link-report XML using ant:  <mxmlc … link-report=”shell-link-report.xml”
  3. In your ant build file, when compiling all sub-module swfs, compile all module swfs using load-externs=shell-link-report.xml.

By doing these very simple steps you can reduce legacy swf projects by half sometimes simply because when using the Flash IDE it does not natively create this for you.

Actionscript Logger class with filtering

Well, Ive used this logger a million times and thought it would be useful to let others take a look. The main thing this class supports is FILTERING, which is something that a lot of log classes do not have which I find problematic when dealing with a very large project or want to debug on a live server.

Check it out:

package com.adk.util {
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.utils.*;

* Generic logger that provides filtering so you can specify exactly
* classes that should be traced out. You do this by adding in a filter
* for a specific class using the logger xml file.
* Load in the logger xml file by listening for the LOADED event
* before dispatching and using logging statements.
* @example
*         var logger:FlashLogger = FlashLogger.getLogger( this, “path.to/logger.xml” );
*             logger.addEventListener( FlashLogger.LOADED, onLoggerLoad );
*        public function onLoggerLoad( event:Event ):void
*        {
*            var logger:FlashLogger = FlashLogger.getLogger( this );
*            logger.debug(“Test”, “param2”);
*        }
* Specify log filters in logger.xml:
* <?xml version=”1.0″ ?>
* <Logger logLevel=”DEBUG”>
* <filters>com.adobe, com.adk.util</filters>
* </Logger>
* You can add as many filters you want and specify the log level.
* @author Austin Kottke

public class FlashLogger extends EventDispatcher {

* Events and log types.
public static var NONE : uint = 0;
public static var INFO : uint = 1;
public static var DEBUG : uint = 2;
public static var WARN : uint = 3;
public static var ERROR : uint = 4;
public static var FATAL : uint = 5;

* Variables

public static var LOG_TYPES : Array;
private static var logLevel : int;
private static var filters : Array = new Array();
private static var filtersLoaded : Boolean = false;
private static var created : Boolean = false;
public var className : String ;

public static var LOADED : String = “xmlLoaded”;

* Adds in a new filter
* @param aString Adds in a new filter for the logger.

public function addFilter( aString : String ) {
trace(“FlashLogger.addFilter(” + aString + “)”);

* Checks if the class is in the filter.
* @return true or false if the class is in the filter or if there are no filters.

private function isClassInFilter( aClassName : String ) : Boolean {
for ( var i : Number = 0;i < filters.length;i++ )
if ( aClassName.indexOf(filters[i]) >= 0 ) return true;

if ( filters.length == 0 ) return true;

return false;

*  Constructor

public function FlashLogger( aClassName : String, loggerXMLPath : String ) {
className = aClassName;
if ( !created ) {
FlashLogger.LOG_TYPES = new Array(“NONE”, “INFO”, “DEBUG”, “WARN”, “ERROR”, “FATAL”);
created = true;

*  Sets the log level
* @param aLogLevel the log level for debugging purposes

public function setLogLevel( aLogLevel : uint ) {
logLevel = aLogLevel;
trace(“FlashLogger.setLogLevel(” + FlashLogger.LOG_TYPES[aLogLevel] + “)”);

public function getLogLevelByName( aLogLevelName : String ) : Number {
for ( var i : Number = 0;i < FlashLogger.LOG_TYPES.length;i++ ) {
var curLevel : String = FlashLogger.LOG_TYPES[i].toLowerCase();
if ( curLevel.indexOf(aLogLevelName.toLowerCase()) >= 0 )
return i;
return 1;

*  Retrieves the logger
* @param className The class name for the logger to be debugged correctly.

public static function getLogger( obj : Object, loggerXMLPath : String = “logger.xml”) : FlashLogger {
var className : String = getQualifiedClassName(obj).split(“::”).join(“.”);
var logger : FlashLogger = new FlashLogger(className, loggerXMLPath);
return logger;

* Load in the xml configuration for the flash logger. By default this
* is logger.xml

private function loadLogXml( aPath : String = “” ) : void {
var url : URLLoader = new URLLoader();
url.addEventListener(Event.COMPLETE, loadLogFilters);
url.load(new URLRequest(aPath));

* Sets the filters based on the xml file.

private function loadLogFilters( event : Event = null ) : void {
try {
var loggerConfig : XML = new XML(event.target.data) ;
var filters : Array = loggerConfig.filters.split(” “).join(“”).split(“,”);
var logLevel : String = loggerConfig.@logLevel;

for ( var i : Number = 0;i < filters.length;i++ ) {
filtersLoaded = true;
this.dispatchEvent(new Event(LOADED));
catch (e : Error ) {
trace(“FlashLogger [ERROR] error loading filters: ” + e.message);

*  Ouputs a debug message.
* @param message The message to output

public function debug(…paramaters) : void {
if ( logLevel == NONE ) return;

if ( isClassInFilter(className) ) outputLogging(DEBUG, paramaters.join(“, “));

*  Ouputs an info message.
* @param message The message to output

public function info(…paramaters) : void {
if ( logLevel == NONE ) return;

if ( isClassInFilter(className) ) outputLogging(INFO, paramaters.join(“, “));

*  Ouputs an error message.
* @param message The message to output

public function error(…paramaters) : void {
if ( logLevel == NONE ) return;

if ( isClassInFilter(className) ) outputLogging(ERROR, paramaters.join(“, “));

*  Core trace output
* @param logLevel The log level to output
* @param message The message to display

private function outputLogging( logLevel : int, message : String ) {
if ( !filtersLoaded ) {
trace(“FlashLogger [ERROR] – please load in logger.xml before using this logger.”);
var my_date : Date = new Date();
var hours:String = my_date.hours.toString();
var minutes:String = my_date.minutes.toString();
var seconds:String = my_date.seconds.toString();

if( my_date.hours < 10 ) hours = “0” + hours;
if( my_date.minutes < 10 ) minutes = “0” + minutes;
if( my_date.seconds < 10 ) seconds = “0” + seconds;

var time : String = hours + “:” + minutes + “:” + seconds;
trace(“[” + time + “] [” + FlashLogger.LOG_TYPES[logLevel] + “] (” + className + “) ” + message);

JSF 1.2 – A dive into a legacy framework and why I think wicket/stripes still rock =)

So I’ve been doing a lot of java/ajax development recently, and having to compare frameworks was one of the main things I’ve had to do. I used JSF 1.2 actually due to legacy server issues, not 2.0 (which I hear is a lot better) but comparing it with Stripes/Wicket I must say that:

1. JSF has a LOT of issues integrating into existing browsers, 2.0 is probably a bit better but sometimes the pain of having to have ALL tags written for you is VERY troublesome. I recently had to use a rich faces fileupload component and the integration on some browsers has major issues. While it is good to have a very tightly integrated ajax framework it sometimes is painful when trying to integrate in something like the YUI components.

2. Stripes/Wicket are good because they leave a lot of the ajax development to yourself and provide a VERY awesome hands on approach where you can actually write your own code with minimal development time. I find this actually was easier on some other projects.

So in a nut shell… Id stick with Stripes/Wicket for a java serverside application as opposed to straight JSF as it is sometimes painful when dealing with all the pre-written javascript components.

I guess this brings up a philosophy:

1. A java server side framework should NEVER be so tightly binded to the front-end UI logic WHEN you are depending on browser support. Or provide some alternative to use the latest prototype/ajax libraries.

2. If it is tightly binded, there should be a very easy way to extend it and use it smoothly. JSF 1.2 was a nightmare !!! =)

For some reason, stripes/velocity and wicket still remain my top java web frameworks. Oh and forget to mention, integration with other flash/flex projects is a lot smoother without using JSF due to the freedom it gives you.

My 2c =)

The mobile web browser – Wheres the flash player?

As I look more and more at the industry trends, we see more and more handheld devices being developed, that’s a no brainer. More and more devices, such as the android, sidekick, blackberry and iphone have some form of a web browser. Just the other day I was walking outside and I saw atleast 4 young kids with sidekicks, a blackberry and a couple with an iphone.

Now when we look at trends we see that the majority of people browse with their own personal computers, but as the future progresses more and more people will be using their mobile devices to browse the web. Of the 4 different devices I mentioned NONE have the flash player, or are capable of viewing flash in a normal browsing environment.

Now, I’ve been developing flash applications for over 10 years, I started with flash 4. Used flex, and all variations with design patterns, coding standards, but the one thing that is becoming more difficult is convincing executives of the company to use a flash solution when all of the above devices competently show ajax and html just fine.

I know that the flash player is going to come to the android…. but let’s get real, is adobe taking a serious look at this? I mean its awesome to do flashlite for the various nokia devices and devices that can support this. But there needs to be major changes here because as the industry moves more and more mobile, ajax/html solutions are becoming a lot more appealing because these mobile devices render ajax/html without hickups.

Is there any official word on this, supporting these various devices that are mainstream such as the sidekick, blackberry, iphone and android ?

I dont mean to rehash an old subject, but there are a lot of projects in the works and if there is no flash player for these devices then it really limits the potential and thus getting the bosses to agree to a flash solution greatly decreases. After all they have the blackberries and iphones. I love flash, but really it comes down to getting flash everywhere. Flash won because of how ubiquitous it was, now… this is fading as the mobile arena becomes bigger and bigger.

Every kid on the block is getting a cell phone… Is this a major concern for adobe?

Flex getting all of the love?

Is it me, or did Colin Moock’s post stir up some feelings I have about flash 9 cs3?

I’ve used flash 8 for years and haven’t had a single problem with it except for the slow compile times. Now, adobe comes out with the new flash 9 cs3. Not only do they take out the data services, they add in this really odd way of generating classes and re-work the entire way the objects are created on the stage. This makes the workflow not as simple and generally re-works the flow.

So, my question on flash 9 cs3 is, why?

1. Why take out the data services? So we all move to flex?

I do flex projects, don’t get me wrong. I think flex is great for what it is. But the problem is in flash there is SOOO much more freedom because of assets and the timeline and animation and designs are so much easier to create.

2. Why make it more complex?

Why make every object it’s own class? What if we have a whole series of nested objects and don’t want to make every nested symbol a property in a file? Why not just simply let it be by itself… Keep it simple. The amount of times I’ve opened a project and not been able to compile it because of the “Automatically declare stage instances.” really gets on my nerves.

Error messages — Man – some of these just don’t make sense. They are verbose and unclear. In flash 8 it was simple.

3. Runtime mxml?

Why not make it easy to load in runtime mxml in flash 9 cs3?
This way we can load in xml on the fly and have it generate form data? I think this would be awesome and very useful.

4. How about a set of layout controls for flash 9 cs3? Use flash for what it’s good for…

Don’t get me wrong. I think as3 is cool and the speed factor is cool, but I think the workflow of flash 9 cs3 is what is the most important thing. Its not the language – with fdt 1.5 I felt complete with as2.0. Never had a problem, could do anything I wanted to do. With as3 its a bit of a headache sometime because of all of these changes.