AIR Cairngorm (AIR extensions for Cairngorm)
I have developed an open source ActionScript 3 project called “AIR Cairngorm” which is intended to provide a framework for working with the new Adobe AIR services while utilizing the Cairngorm-micro architecture.
When I say AIR Services, I am referring to the SQLite and FileSystem APIs, which are available in Adobe AIR.
AIR Cairngorm provides a framework which developers can employee to build typical Cairngorm applications that utilize these services.
The following is a brief description of the AIR Cairngorm API:
AIRServiceLocator: The AIRServiceLocator is a sub class of Cairngorm ServiceLocator, therefore it inherits the same API as ServiceLocator, and adds an additional API for working with local databases.
view source
SQLService: The SQLService is essentially a wrapper class for the SQLStatement and SQLConnection classes. The SQLService class allows developers to create an mxml implementation just as one would with typical HTTPServices, WebService and so forth in a Cairngorm ServiceLocator.
view source
ISQLResponder: ISQLResponder provides a consistent API from which asynchronous SQLStatement execution results and faults can be handled. ISQLResponder is very similar to IResponder in that it defines both a result and fault handler with a slightly different signature which is specific to a SQLStatement result / fault, (i.e strongly typed parameters).
view source
ISQLStatementResource: ISQLStatementResource is a marker interfaces which is intended to improve code readability by indicating that a class which implements this interface is to provide access to external SQL statements defined in a .properties file.
view source
SQLStatementHelper: SQLStatementHelper is an all static utility class which provides a mechanism for substituting tokens specified in a statement with arbitrary values.
view source
I am also releasing an update to Cairngen (though only a dot release) which supports the AIR Cairngorm API. Cairngen will now provide targets for generating business delegates which utilize the AIR Cairngorm services.
I suspect Adobe will release an updated version of Cairngorm which supports integration with AIR applications. AIR Cairngorm provides an interim solution which developers can use under the terms specified in the License.
I plan to update AIR Cairngorm to support the AIR File system API within the next week or so.
Below I have provided downloads for the source, binary, AIR Cairngen and usage example:
source
example
air-cairngen
air-cairngorm
July 16th, 2007 at 6:52 am
Eric,
You never cease to amaze. Nice work yet again. Looking forward to the Cairngen support for this as well.
-Augie Marcello
July 31st, 2007 at 1:31 am
[…] AIR Cairngorm is an ActionScript 3 open source project. […]
August 5th, 2007 at 9:04 pm
[…] more @ http://www.ericfeminella.com/blog/2007/07/16/air-cairngorm-air-extensions-for-cairngorm/ […]
August 5th, 2007 at 9:20 pm
[…] Eric Feminella developed an AS3 project called AIR Cairngorm which is intended to provide a framework for working with the new Adobe AIR services while utilizing the Cairngorm-micro architecture. AIR services includes the SQLite and FileSystem APIs which are available in Adobe AIR. […]
October 29th, 2007 at 2:22 am
[…] Eric Feminella blogged an AIR extension for Cairngorm. I have not tested it yet but it looks interesting. I have already developed AIR apps with Cairngorm and there is no big difference to Flex web applications. The badge install for AIR is one of the coolest things looking at the using experience when installing an AIR Application and the runtime itself. Oliver Goldman from the AIR Team posted about an update which closes a security hole. […]
January 2nd, 2008 at 1:35 pm
Thanks for this. I plan to use it in an upcoming project. I also will be using Cairngorm with LocalConnection, but I don’t think there is a LocalConnectionService class, is there? Perhaps I’ll make one up and pass it along for review.
Looking forward to getting into Ant and Cairngen as well.
March 8th, 2008 at 3:47 am
I have recently started reading your blogs, they are amazing, and this AIR Cairngorm article is very helpful and SQLite admin is very good, I got one question on CF returning resultset with following type of VO
sampleVO
{
id int,
name string,
addresses arrayCollection,
offices arrayCollection
}
when I get my result back I loose the values coming in addresses and offices which are type array and coming as addressVO and officeVO,
I can provide you with more detail or send you code if ou want, do you have any example of this? please let me know nif you need more info?
Regards
Philip