Space of Flex/AIR technologies

Beyond Plain Old Html Objects

Amethyst Visual Studio IDE for the Flash Platform – Released!

with 2 comments

This is really great news for all the Visual Studio fans that want to do Flash/Flax development with their favorite IDE. Amethyst IDE brings really incredible feature set of Visual Studio to Flash/Flex world. I really love how it handles component AS3 in a separate file, I hope something similar was available out of the box with Flash Builder! Really, really incredible!

Key Features of Amethyst Professional:

  • Powerful editor with code coloring (76 options) and code folding
  • Customizable code formatting
  • IntelliSense with code completion and auto-expanding snippets
  • Drag-and-drop Designer for Flex and AIR
  • Designer integrates with Property panels, Event panels and Layout toolbar
  • Multi-level undo/redo in editor and Designer
  • Fast ‘Cylon’ debugger with breakpoints and call stack
  • Step into/over/out in Debugger
  • Conditional breakpoints and break-on-hitcount
  • Expression evaluation in Immediate and Watch windows
  • Hover and drill-down debugging in editor and Watch windows
  • Debug multiple SWFs concurrently
  • Find All References/Go To Definition
  • Quick-find ToDo comments and User Tasks
  • Auto-generate getter/setter ‘property’ methods
  • Sophisticated refactoring with rename, move to package and refactoring previewer
  • Source control support (TeamServer etc.)
  • Import FLA to edit and debug Flash IDE projects
  • Convert existing Flex or Flash Builder projects

All that is available at $249.

Checkout this video with Amethyst IDE in action:

Written by Piotr Walczyszyn

September 3rd, 2010 at 12:54 pm

Posted in News,Releases

Tagged with ,

as3term – ActionScript3 Terminal released!

with 6 comments

Today I’m releasing to the world my new open source project called as3term, a simple terminal-like application that lets you compile and execute ActionScript code. It’s very handy when you want to check some AS3 constructs without launching your IDE and creating new project.

It was built with Flex/AIR 2.0 and it uses the NativeProcess API to launch mxmlc compiler, which is part of the Flex SDK. The primary reason that I have built it was that I needed a simple app that I could code in few hours and that would serve me as a test and a showcase for my other open source project called NativeApplicationUpdater. You can download the installers for different OSs from its Google Code site as well as source code from SVN. In the video below you can also see it in action:


Written by Piotr Walczyszyn

September 1st, 2010 at 10:18 am

Posted in Releases

Tagged with , ,

NativeApplicationUpdater – updater for AIR apps packaged with native installers

with 7 comments

I just released on Google Code a new project called NativeApplicationUpdater. Basically the name explains its purpose but for those that don’t know, AIR 2.0 brings new capability of packaging applications with native installers. This is necessary when you want to use the new NativeProcess APIs. Unfortunately Update Framework that comes with AIR 2.0 SDK doesn’t bring yet capability of updating this type of applications. That is why I decided to build it myself and publish it as open source library.

Here is a video explaining how it works:

Written by Piotr Walczyszyn

August 25th, 2010 at 11:08 am

Posted in Releases

Tagged with , ,

Swiz 1.0 Chaining API explained

with 7 comments

Yesterday I was tasked to find the best way to bootstrap a Flex application that uses Swiz 1.0 RC1. The challenge was to initialize application controllers and data model in the right sequence. This is an AIR application so it had to initialize data from an SQLite database, make few calls to remote services to check for data updates and do couple of other things before user could actually see first screen. My initial thought was to create a StartupController that would invoke the proper functions in a right order. That was a good initial direction but things started to get more difficult when I had to deal with async remote calls and local async APIs such as the one from the SQLite database.

So my next thought was, why not to try the new Chaining API that comes with Swiz? After my first look at the documentation I wasn’t really sure how I should approach it but after more digging I managed to figure it out ;) Here is what I did. I kept my StartupController with its init function that gets called after the controller is constructed and all its dependencies are injected. This was ensured by the [PostConstruct] metadata that comes with latest version of Swiz. Next that function creates a chains of function calls, remote invocations and events that bootstrap my application.

This is my StartupController where everything starts:

package controllers
{
	import delegates.RemoteServiceDelegate;
 
	import flash.events.IEventDispatcher;
 
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
 
	import org.swizframework.events.ChainEvent;
	import org.swizframework.utils.chain.AsyncCommandChainStep;
	import org.swizframework.utils.chain.ChainType;
	import org.swizframework.utils.chain.CommandChain;
	import org.swizframework.utils.chain.EventChain;
	import org.swizframework.utils.chain.EventChainStep;
	import org.swizframework.utils.chain.FunctionChainStep;
 
	public class StartupController
	{
		[Dispatcher]
		public var dispatcher:IEventDispatcher;
 
		[Inject]
		public var remoteServiceDelegate:RemoteServiceDelegate;
 
		[PostConstruct]
		public function init():void
		{
			// Initializing sequential CommandChain, that will stop on errors
			var commandChain:CommandChain = new CommandChain(ChainType.SEQUENCE, true);
			// Registering event listener when chain execution is complete
			commandChain.addEventListener(ChainEvent.CHAIN_COMPLETE, commandChainComplete);
			// Registering event listener in case chain execution fails
			commandChain.addEventListener(ChainEvent.CHAIN_FAIL, commandChainFail);
 
			// Adding async chain step that invokes remote AMF service
			commandChain.addStep(
				new AsyncCommandChainStep(
					remoteServiceDelegate.ping,
					["ping param value"],
					pingResultHandler,
					pingFaultHandler));
			// Adding function step that calls local function
			commandChain.addStep(new FunctionChainStep(this.localFunction));
 
			// Initializing parallel event chain that will be nested in command chain
			var eventChain:EventChain = new EventChain(dispatcher, ChainType.PARALLEL, true);
			// Registering event listener when event chain execution is complete
			eventChain.addEventListener(ChainEvent.CHAIN_COMPLETE, eventChainComplete);
			// Registering event listener in case chain execution fails
			eventChain.addEventListener(ChainEvent.CHAIN_FAIL, eventChainFail);
 
			// Adding event chain step that will dispatch INIT_PERSISTENCE event,
			// this event is mediated in PersistenceController
			eventChain.addEvent(new EventChainStep("INIT_PERSISTENCE"));
			// Adding event chain step that will dispatch INIT_SOMETHING_ELSE event,
			// this event is NOT mediated anywhere, this just for example and better understanding
			// eventChain.addEvent(new EventChainStep("INIT_SOMETHING_ELSE"));
 
			// Nesting event chain in parent command chain
			commandChain.addStep(eventChain);
			// Starting whole command chain
			commandChain.start();
		}
 
		private function localFunction():void
		{
			trace("Running localFunction");
		}
 
		public function pingResultHandler(event:ResultEvent):void
		{
			trace("Received result from remote ping call:", event.result);
		}
 
		public function pingFaultHandler(event:FaultEvent):void
		{
			trace(event.fault.faultDetail);
		}
 
		private function commandChainComplete(event:ChainEvent):void
		{
			trace("CommandChain complete");
		}
 
		private function eventChainComplete(event:ChainEvent):void
		{
			trace("EventChain complete");
		}
 
		private function commandChainFail(event:ChainEvent):void
		{
			trace("CommandChain failed");
		}
 
		private function eventChainFail(event:ChainEvent):void
		{
			trace("EventChain failed");
		}
	}
}

Below is my PersistenceController that will initialize the local database; its init function is called when the INIT_PERSISTENCE event is dispatched. When the database initialization is finished event.complete(); has to be called in order to proceed with chain execution:

package controllers
{
	import flash.events.IEventDispatcher;
 
	import org.swizframework.utils.chain.EventChainStep;
 
	public class PersistenceController
	{
		[Dispatcher]
		public var dispatcher:IEventDispatcher;
 
		[Mediate("INIT_PERSISTENCE")]
		public function init(event:EventChainStep):void
		{
			trace("Initializing PersistenceController...");
			event.complete();
		}
 
	}
}

This last snippet demonstrates the RemoteServiceDelegate class, which can be used to invoke remote services. It works with AsyncCommandChainStep:

package delegates
{
	import mx.rpc.AsyncToken;
	import mx.rpc.remoting.RemoteObject;
 
	public class RemoteServiceDelegate
	{
		[Inject]
		public var remoteObject:RemoteObject;
 
		public function ping(param:String):AsyncToken
		{
			return remoteObject.ping(param);
		}
	}
}

You can download my demo project source code from here; note that it doesn’t do anything except print out traces to the console. This zip contains a build of latest Swiz source code from GitHub that has some FunctionChainStep fixes.

Written by Piotr Walczyszyn

August 11th, 2010 at 3:51 pm

Posted in Examples

Tagged with ,

Cooklet.com launched (Open Screen Project funded)

without comments

Very recently I was speaking at a press conference of a new culinary service called Cooklet.com. Okay, you may be wondering what my role at that event. So first of all, the Cooklet team is located out of Wroclaw/Poland, but this obviously isn’t the primary reason ;) What really brought me there is the fact that Cooklet is using a lot of Adobe technology, specifically our Platform technologies. Cooklet.com itself is a standard HTML based website but at the same time it has a desktop version that runs with Adobe AIR. There is also Cooklet Mobile built with Flash Lite and hosted as an application in the Nokia OVI store. Another very important fact is that this project was funded by the Open Screen Project initiative; you can find more details here as well a registration form to apply yourself.

The service itself has some unique and interesting features. What I really like is in-browser drag-and-drop capability that you can use to add new recipes to your cookbook or shopping list. The really cool thing here is that when you drag the recipe to the cooking list you instantly get access to it from your mobile phone. Another really cool thing is that the recipes get automatically translated into different languages. In the future this may give its users access to really tasty recipes from different cuisine.

Additionally the desktop version gives you offline access to your recipes that you may need in your kitchen. Also it has a great user experience and interactions that mimic reading real printed version of a cookbook.

Obviously Cooklet.com has much more interesting features and I encourage you to give it a try.

Check out the Cooklet Lite demo video below. Now I’m just waiting for the Cooklet team to provide an AIR for Mobile version that I can run on my Nexus One phone ;)

Written by Piotr Walczyszyn

August 11th, 2010 at 10:13 am

Posted in News

Tagged with , ,

Flerry 1.2.0 released!

with 13 comments

I’m proud to announce Flerry 1.2.0, which brings following new features and changes:

  • Java discovery process has been completely rewritten. Now it looks into default location on given operating system:
    • Windows – c:\Windows\System32\javaw.exe (starting from version 6 this is the default Java location)
    • Mac – /usr/bin/java if that doesn’t exist it checks /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
    • Linux – /usr/bin/java if that doesn’t exist it checks /etc/alternatives/java
    • In case any of these default locations fail it tries fallback mechanism, on Windows it is a native code compiled into FindJava.exe utility. This utility checks the registry on users machine and returns path to the location where java is installed. This was contributed by my colleague Serge Jespers; he used it for his Package Assistant Pro application. In case of Mac and Linux it uses native „/usr/bin/whereis java“ command to discover where Java is installed.
  • The default location where to place jar files has been renamed to libs as it no longer contains only jar files. Now it also contains FindJava.exe utility. It can be customized by setting libsDirectory property on NativeObject class.
  • Adding all jars under libsDirectory folder into the classpath automatically. Specifying it explicitly is no longer required.
  • Compiled java code can be placed under classes folder. It is not required to package it into a jar anymore. This makes debugging and testing the application much easier.
  • Out-of-the-box support for java code debugging. Flerry Getting Started (part 2) video tutorial covers how this can be used.
  • Improved communication from AIR to Java, now it can support large objects transfer. This is due to object splitting into 256 bytes chunks.
  • Added basic set of FlexUnit tests.
  • Added Ant build script.
  • Updated AMF serialization jars from BlazeDS 4.0.
  • Removed reference between flerry and flerry-demo projects. Now flerry-demo is a standalone project referenced by flerry.swc.

This time kudos go to Jhonny Everson, Serge Jespers and Erko Bridee for their contributions and support.

Watch getting started video tutorials to get up to speed with Flerry.

Written by Piotr Walczyszyn

August 3rd, 2010 at 3:31 pm

Posted in Releases

Tagged with , , ,

Flerry 1.1.2 released

with one comment

This is just a quick note to say that I released new version of Flerry; Flerry 1.1.2 is just a bug fix release. It fixes an OutOfBounds error when receiving async messages from a Java process. This error was pointed out by Erko Bridee that has written nice post on Flerry in Portuguese.

Today I also started working on the 1.2 release, which will improve java path discovery on the Windows platform. I’m planning to reuse code written by my colleague Serge Jespers for Package Assistant Pro. It is simple native C code that checks the Windows registry to find where Java is installed.

Written by Piotr Walczyszyn

July 21st, 2010 at 3:16 pm

Posted in Releases

Tagged with , ,

flexair.pl – świetny blog, tematykę wskazuje już sama nazwa!

without comments

Właśnie dostałem link do świetnego bloga w języku polskim na temat Flex’a i AIR’a. Adres tak jak w tytule flexair.pl. Polecam wszystkim szczególnie tym zaczynającym swoją przygodę z Flex’em.

Dodatkowo powiem, że bloga redaguje dziewczyna Olga Grabek co w naszej społeczności jest prawdziwą rzadkością. Zachęcam do dodania tego bloga do swojego czytnika RSS, ja już to zrobiłem ;)

Written by Piotr Walczyszyn

July 15th, 2010 at 6:09 pm

Posted in News

AMF Playground with public services, Flash/Flex client-server communication

without comments

Today I published a microsite (http://amf.riaspace.com/) on my blog dedicated to AMF communication. The goal of it is to gather necessary information needed for quick start with AMF.

You will find there:

  • Publicly available AMF services for the start without setting up your own server environment
  • Code snippets demonstrating how to utilize AMF services
  • Video tutorials on how to setup your own Flex/Zend_Amf projects
  • Demo applications with a source code

At the moment I’m hosting only PHP based services but I’m also thinking about Java based backend to be able to play with messaging.

Written by Piotr Walczyszyn

July 15th, 2010 at 9:58 am

Posted in Articles,Releases

Tagged with , ,

Flerry 1.1.1 released supporting large objects transfer

with one comment

I just released a new version of Flerry that fixes a problem with transferring large object structures from Java to Flex. This release is thanks to Mohammed Abbas who contributed the patch. Again I’m really happy that this project is evolving and the community is contributing to it actively.

To start working with Flerry go ahead and download the flerry and flerry-demo projects. You may also find my previous posts (Post 1 | Post 2) helpful.

Written by Piotr Walczyszyn

July 5th, 2010 at 3:00 pm

Posted in Releases

Tagged with , ,

Switch to our mobile site