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

14 Responses to “AIR Cairngorm (AIR extensions for Cairngorm)”

  1. augiemarcello UNITED STATES Says:

    Eric,
    You never cease to amaze. Nice work yet again. Looking forward to the Cairngen support for this as well.
    -Augie Marcello

  2. Sönke Rohde » AIR Cairngorm GERMANY Says:

    […] AIR Cairngorm is an ActionScript 3 open source project. […]

  3. AIR Cairngorm | Adobe AIR Tutorials UNITED STATES Says:

    […] more @ http://www.ericfeminella.com/blog/2007/07/16/air-cairngorm-air-extensions-for-cairngorm/ […]

  4. reintroducing.com Blogging Receptacle » Blog Archive » AIR Cairngorm UNITED STATES Says:

    […] 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. […]

  5. Sönke Rohde » AIR examples/links, Desktop 2.0 and Adobe Developer Connection GERMANY Says:

    […] 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. […]

  6. endquote UNITED STATES Says:

    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.

  7. Philip UNITED KINGDOM Says:

    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

  8. Cédric POTHIN FRANCE Says:

    Hi Eric,

    fantastic work you’ve done here! I was wondering
    if there is any contraindication to use your framework
    directly in a projet using the Cairngorm Universal Mind extension?

    Also I was wondering what could happen
    if we have two running services (so connections)
    on the same database that do read and update
    simultaneously? Could it throw any errors and
    is this manageable by your framework?

    Many thanks for your work
    I’m looking for your answer if you have the time
    Cédric

  9. eric UNITED STATES Says:

    Hey Cedric,

    Thanks for the compliments. I don’t see any reason why you couldn’t use the AIR Cairngorm extensions with UM’s extensions, however I haven’t tried that myself.

    Also, I updated the SQL Implementation, the version in this post is deprecated, so please see the following for the latest SQL Lite implementation:
    http://www.ericfeminella.com/blog/2008/09/29/air-sql-framework/

    Best,
    Eric

  10. Anonymous INDIA Says:

    good one keep it up

  11. 小小菜鸟 CHINA Says:

    i want use it in flex builder,can i?

  12. 小小菜鸟 CHINA Says:

    flex builder 3.0.2 & air 1.5

  13. 小小菜鸟 CHINA Says:

    when i import your example into FB, a error occur:

    Severity and Description Path Resource Location Creation Time Id
    Design mode: Cannot load Cairngorm.swc (reason: ERROR: Load Verify). It may require classes (such as Adobe AIR components) that are not supported by design mode. Check the Eclipse error log for more details. AIRCairngormAsyncExample/src/air/cairngorm/async/example/business Services.mxml Unknown 1229672613828 6598

  14. 小小菜鸟 CHINA Says:

    really sorry
    i’m so careless
    forget air version in the config file

    to

    now i can run your examples

    thanks for your article very very muck~

Leave a Reply