Stubbing Flex HTTPServices

24.02.09

Filed Under: Flex with 0 Comments

On a few projects I have worked on there has been necessary to stub the Flex HttpServices. A couple of reasons has been, server side code is not ready yet or services are too unstable to support a continuous UI development.

I have seen examples where there has been spent a lot of time developing code to accommodate for this, with the only result that code base has a lot of non production code which can cause bugs and add an overhead to maintenance of the system. In my eyes that would be wrong, test/mock coding is money wasted on valuable time that should be spent on developing features.

So why not use something which already (almost) exist. When you use HTTPServices, you can point to nearly anything that gives you some kind of XML result. Pointing to a static XML file on the server should give you almost the same as pointing to a service which would serve you dynamic XML.

package com.lab49.spike
{
	import mx.core.Application;

	import mx.rpc.AsyncToken;
	import mx.rpc.http.mxml.HTTPService;

	public class StubHttpService extends HTTPService
	{
		public var stubUrl : String = "";

		private function get stub() : Boolean
		{
			var stubParam : String = String( Application.application.parameters[ "stub" ] );

			return stubParam == "true";
		}

		public override function send( param : Object  = null ) : AsyncToken
		{
			if( stub )
			{
				url = stubUrl
			}

			return super.send( param );
		}
	}
}

And when you use it, insert “stub=true” in your url, and add this to your StubHTTPService:

<spike:StubHttpService
	url="http://localhost:8080/spike/myService"
	stubUrl="xml/stub.xml"
	...
/>

Mission critical Flex application

09.02.09

Filed Under: Flex with 1 Comment

One of my previous projects were showcased on Adobe Max 2008 in San Francisco, a mission planning system for NATO AWACS, E-3A Component, presented by Peter Martin and Mansour Raad.
The application was built based on Flex, LiveCycle DataServices and Oracle, one of the main components used within Flex was the ESRI mapping api.

The presentation is available on AdobeTV.

Who said Adobe Flex couldn’t be used for critical systems? :) If Adobe wants Flex to be seen as a serious framework in the enterprise, this is the kind of projects they need to show more of.

Over a series of posts I will cover some of the experiences gathered from this and other projects I have taken part in. There is usually more to a project then just choosing a framework like Cairngorm, PureMVC or one of the many IoC containers which are popping up everywhere.

Scotch on the Rocks, day 3

09.06.08

Filed Under: Flex with 5 Comments

My second presentation at Scotch On the Rocks was Flex Client Architecture & Best Practices. The one topic in the presentation which gained most attention was probably PresentationModels. I would say there is not really any magic to how to use PresentationModels, but it is more down to what kind of logic you put there and how it relates to your services. The PresentationModel pattern is also independent of any framework you would put on top of Flex.

If you have an interest in presentation patterns, I would recommend to look at Paul Williams great presentation pattern blog series. He also has a series covering how to unit test the different patterns, which most developers should find interesting.

Scotch on the Rocks, day 2

05.06.08

Filed Under: Flex with 2 Comments

Today I had the first of two presentations I will have at Scotch on the Rocks 2008, todays topic was Modularizing Flex applications – Cairngorm & Modules. It was good to see so many Coldfusion ( and Flex ) developers being interested in how to use Flex modules and Cairngorm.

Tomorrow I will present “Flex Client Architecture & Best Practices”, where topics like PresentationModel and unit testing will be covered.

As I also announced on 360|Flex Europe in Milan, Adobe Consulting will over the next few months share some of our best practices in a series of articles. A topic could be for example “Cairngorm and Modules”. Steven Webster has posted a call for topics blog post

Cairngorm Deepdive

11.04.08

Filed Under: Flex with 0 Comments

On Wednesday I had the pleasure of presenting “Cairngorm Deepdive” at 360|Flex Europe. Thanks to
Tom and John for organizing the first 360|Flex in Europe

Presentation Cairngorm Deepdive

360|Flex Europe – Cairngorm deepdive

27.03.08

Filed Under: Flex with 0 Comments

It is now less than 2 weeks left till 360|Flex Europe kicks off in Milan, Italy. And looking at the list of topics being presented, it’s going to be a great conference!

In my presentation – Cairngorm deepdive, I’ll be covering some of the history behind the Cairngorm Microarhitecture, how to use it on large scale projects, how to handle security, and also shed some light on the future of the framework.

There is also a second presentation covering Cairngorm, Neil Webb will present Cairngorm for beginners.

If you haven’t already signed up for the conference, you can do so here

“Using Adobe Flex with Rails” tutorial at RailsConf Europe

17.09.07

Filed Under: Flex with 0 Comments

Today I’m presenting at RailsConf Europe in Berlin together with Aslak Hellesøy from Bekk Consulting. Todays tutorial is “Using Adobe Flex with Rails”, the tutorial is all about how to combine two great tools to quickly develop nice looking and compelling applications. It is really interesting to see what the Rails community is doing with BDD (Behavior-Driven Development), Aslaks second tutorial of the day, and rapid prototyping.

Both Rails and Flex are considered “best in class” when it comes to rapid development, and during todays 3.5 hour session we will show how Flex can integrate with Rails using a REST based back-end.

The presentation can be found here, and the code is on google code

Presenting “Eliminate Waste in Java Development with Adobe Flex” at JavaZone

13.09.07

Filed Under: Flex with 0 Comments

JavaZone in Oslo, Norway, is the starting point of my little conference “tour”.

Today I presented Eliminate Waste in Java Development with Adobe Flex together with Espen Dalløkken from Ezmo at JavaZone in Oslo, Norway. A short outline of the presentation on how to eliminate waste in Rich Internet Applications:

Previous Page « Previous Page

Categories