assertTrue is the professional blog of Luke Bayes and Ali Mills

What is Continuous Integration and how do I use it with ActionScript or Flex applications?

Posted by: Luke Bayes Fri, 08 May 2009 17:00:00 GMT

We recently got a question on the Sprouts Group about Continuous Integration (CI) and I thought I’d try to give it a quick explanation here.

The idea behind Continuous Integration is that you have a machine somewhere on the network that will check out, compile and test your application after almost every check-in. Whenever failures are encountered anywhere in that process, the entire team is notified. This helps us discover unexpected regressions or injections early which helps us pinpoint and address their root causes more efficiently.

This process can be useful in any project, but is especially helpful when working with teams that are all checking into different components of a larger project.

There are essentially three major problems when attempting to introduce ActionScript or Flex applications to typical CI systems:

  • The Flash Player requires a visual window manager to execute your test harness (Usually X-Windows on Linux)
  • The Flash Player does not give us the ability to capture all runtime exceptions, and when an uncaught runtime exception is encountered in the Debug Flash Player, a GUI dialog box is presented that must be manually clicked with a mouse in order to continue or abort execution. This can hang a typical CI set up, and result in an unhelpful “execution timeout” failure.
  • It can be challenging to get a Linux machine properly configured to compile your ActionScript or Flex application, run your test harness, and collect trace output and error messages.
Read more...

Tags , ,  | 4 comments

navigateToWindow() project added to github

Posted by: Ali Mills Wed, 29 Apr 2009 20:52:00 GMT

I just added a new project to github called navigateToWindow().

navigateToWindow() is a package-level ActionScript function that encapsulates all of the logic around opening a browser popup window from within Flash.

The function works very similarly to navigateToURL() except that you call it with the parameters that JavaScript’s window.open might expect.

The test/patternpark/net/NavigateToWindowTest.as file demonstrates how you might use navigateToWindow(). This project was build with Project Sprouts. To run the test suite, install Sprouts and then run ‘rake html’ from the location where you pulled this project down.

One of the unique and interesting features of this implementation is that the developer using it doesn’t have to write any JavaScript. Using a method derived from the ideas of Abdul Qabiz and his post A MXML component that embeds JavaScript in html, Doug McCune and his post Multi-line strings in Actionscript 3, and Jordan Ambra and his post Popups Blocked in AS3 with navigateToURL() we are able to execute all necessary JavaScript directly from ActionScript.

For background on this project, you can check out my old post Workaround for Safari Blocking Flash Initiated Pop Ups.

For another interesting project that solves this same problem through a JavaScript file and an ActionScript file, check out Matt Lohkampl’s popupfromflash.

Tags  | no comments

Execute any preprocessor on your ActionScript or Flex project with Sprouts!

Posted by: Luke Bayes Tue, 13 Jan 2009 22:52:00 GMT

Preprocessing? Check.

With more big thanks to Dru Nelson of BrightRoll, we have just dropped new releases of the sprout and as3 gems that support preprocessing for any compiler task.

You can add the preprocessor directive to any compilation task (or project model if you’re using task ‘helpers’).

The rdoc for the base ToolTask has more detailed information.

To get the latest version open a new terminal and enter the following:

gem update sprout-as3-bundle

As always, please let us know if you run into any issues!

Tags , ,  | no comments

Sprouts now supports Flex Debugger (FDB), Flex Compiler SHell (FCSH) and Continuous Integration (CI)!

Posted by: Luke Bayes Wed, 07 Jan 2009 19:32:00 GMT

Today brings a major set of improvements to the Sprouts ActionScript 3 bundle (and related gems).

We have introduced three major features that you can retrieve by opening a terminal and entering:

gem update sprout-as3-bundle
Read more...

Tags , ,  | 1 comment

Pre-Processing ActionScript files with cpp on OSX

Posted by: Ali Mills Tue, 06 Jan 2009 22:08:00 GMT

Back in March 2005, Mike Chambers wrote a couple interesting posts about using cpp, a C pre-processor, to pre-process ActionScript files.

He noted that, while cpp is included on Mac OS X, for some reason it wasn’t working for him. Well, I think that I just found the reason. It appears that cpp’s docs and man pages don’t emphasize how picky the tool is about white space.

To get the examples to work on my MacBook, I had to make some minor white space modifications.

Read more...

Tags  | 2 comments

Getting Started with AsUnit

Posted by: Luke Bayes Tue, 16 Sep 2008 16:10:00 GMT

Kelly Brown has put together a great article to help folks get started with AsUnit over on the Inside RIA blog.

Definitely check it out if you’re interested.

Thanks Kelly!

Tags ,  | no comments

Using External Libraries with Sprouts

Posted by: Luke Bayes Wed, 10 Sep 2008 01:26:00 GMT

Sprouts has quite a wide variety of different libraries available that you can instantly include in your project.

as3crypto
as3flickrlib-src
as3flickrlib
as3mapprlib-src
as3mapprlib
as3syndicationlib-src
as3syndicationlib
as3youtubelib-src
as3youtubelib
asunit25
asunit3
bulkloader
cairngorm-src
cairngorm
corelib-src
corelib
degrafa
facebook-api
flexlib-src
flexlib
flexunit-src
flexunit
fuse
papervision
swx
tweener
tweeneras2
yahoomapsas3

You can include any of these libraries by simply adding them as a symbol to your project_model.

1
2
3
4
5
6
7
8
9
project_model :model do |m|
  m.project_name            = 'SomeProject'
  m.language                = 'mxml'
  m.background_color        = '#FFFFFF'
  m.width                   = 970
  m.height                  = 550
  m.libraries               << :corelib
  m.libraries               << :papervision
end

This will automatically download and install these libraries into your project and update your compilation tasks to make these targets available!

If you find that the downloaded libraries aren’t working or are out of date, please send us an email with a link to the latest files.

Read on to learn more about packaging up your own libraries!

Read more...

Tags ,  | 1 comment

Using Flex 4 (Gumbo) with Sprouts

Posted by: Luke Bayes Wed, 10 Sep 2008 01:19:00 GMT

I just got a question about using the Flex 4 SDK with Sprouts and figured I’d share the answer with anyone else that may be interested…

Being insanely flexible does often have it’s downsides, but in this case life is good.

To use the latest Flex 4 SDK with the latest release of Sprouts, you can simply update your project_model by specifying the compiler_gem_name as follows:

1
2
3
4
5
6
7
8
project_model :model do |m|
  m.project_name            = 'SomeProject'
  m.language                = 'mxml'
  m.background_color        = '#FFFFFF'
  m.width                   = 970
  m.height                  = 550
  m.compiler_gem_name       = 'sprout-flex4sdk-tool'
end

Then run rake.

Fits like it grew there!

Tags ,  | no comments

FlexMVCS Application Framework Released!

Posted by: Luke Bayes Wed, 16 Jul 2008 01:01:00 GMT

I just wanted to get a quick announcement out there.

While Ali and I were working at Bunchball, we built out a huge application using PureMVC.

As we worked with PureMVC, we encountered some issues that didn’t quite feel right. One of the major factors that drew us to PureMVC in the first place was that Cliff designed everything to work with interfaces instead of hard-coded object references.

This proved to be a critical feature that helped support our desired modifications.

Since leaving Bunchball, Rajat Praharia (the CEO) has generously agreed to let us open-source the modifications under a new project we called, FlexMVCS.

It looks like some of the modifications we made have been integrated with later releases of PureMVC, and to be honest, we haven’t really kept up with changes in the underlying project.

As it stands, we’re not planning on putting much time into this project, but we wanted to get it out there for people that might find it useful.

Please check it out and let us know what you think!

Tags , ,  | 1 comment

Iconara Brings the Truth

Posted by: Luke Bayes Thu, 20 Dec 2007 18:59:00 GMT

In the spirit of always running late to the party, I just discovered a blog today that other folks have probably been following since ‘06.

This guy articulates many of my gripes, moans and complaints in a way that is definitely helpful. If you’re building large applications with ActionScript 3 (or Flex for that matter), he can provide some insight into why things just aren’t working the way you may have expected them to.

http://blog.iconara.net

Tags  | no comments | no trackbacks

Older Posts

Older posts: 1 2 3