Cairngorm 2.1 Released

Adobe has released Cairngorm 2.1, which is received with a warm welcome on my part. In this latest release of Cairngorm Adobe has deprecated many of the core interfaces that were an integral part of Cairngorm 2.0. The deprecated interfaces are still available in Cairngorm 2.1, however they now extend the interfaces which replace them, so should you choose to upgrade to version 2.1 your exisiting Cairngorm applications should not degrade. The only exception being the Responder interface which is still provided but officially deprecated. Additionally, Adobe has added some new core Cairngorm classes and interfaces which are better suited towards building RIA’s with Cairngorm in Flex 2.0.

The first addition that you will notice is the CairngormError class which is used to throw errors specific to a Cairngorm Application. A Cairngorm Error excepts an error code parameter and an additional parameter of arbitrary length. Cairngorm errors also provide a resourceBundle property which returns a read-only instance of the error specific resourceBundle which is be used to localize an application in a single properties file. The properties file is supposedly exactly like a Java-based properties file which contains name-value pairs, However, Flex expects UTF-8 while Java .properties expect Unicode escaped ASCII.

The second addition that you will notice is the CairngormMessageCodes class which contains a list of static constants which represent the codes found in the CairngormMessages.properties file mentioned above. The inclusion of the .properties file in Cairngorm 2.1 actually happens to answer a question that came up during a conversation I had today with one of our Java developers regarding utilizing Java.properties files in ActionScript 3.0, so how’s that for perfect timing.

The Command interface is now deprecated in place of the new ICommand interface which enforces the contract between the Front Controller and concrete command classes and is a direct implementation of the Command Behavioral Pattern.

The Responder interface has been deprecated and replaced with the core mx.rpc.IResponder interface which essentially provides a similar method signature. IResponder result must be implemented with a data parameter of type Object and fault must be implemented with an info parameter of type Object. For instance, the Responder interface in Cairngorm 2.0 contained 2 methods, onResult and onFault, both of which required a single parameter of arbitrary type, whereas the IResponder interface simply contains a result and fault method which except a single Object as a parameter.

The ValueObject interface has been deprecated and replaced with the IValueObject interface, which is essentially the same marker interface containing the I prefix as a best practice.

ServiceLocator has had a major rework. ServiceLocator.getService() has been deprecated and replaced with ServiceLocator.getRemoteObject(string). ServiceLocator.getInvokerService() has been deprecated also. An IServiceLocator interface has been created to support unit testing and there have been additional security methods added to ServiceLocator.

The FrontControler executeCommand() and getCommand() access modifier visiblity have been changed to protected.

All in all it is a pretty significant release and answers a few questions that I have had. I am an advocate of Cairngorm and support it’s development as a micro-architecture for developing enterprise RIA’s in Flex 2.0 and ActionScript 3.0. To learn more about Cairngorm 2.1 click here. You can also download Cairngorm 2.1 here.

{Sorry, Comments are currently Closed! }