{"id":191,"date":"2008-06-22T20:16:40","date_gmt":"2008-06-23T04:16:40","guid":{"rendered":"http:\/\/www.ericfeminella.com\/blog\/2008\/06\/22\/air-cairngorm-20\/"},"modified":"2012-03-04T23:32:09","modified_gmt":"2012-03-05T04:32:09","slug":"air-cairngorm-20","status":"publish","type":"post","link":"https:\/\/www.ericfeminella.com\/blog\/2008\/06\/22\/air-cairngorm-20\/","title":{"rendered":"AIR Cairngorm 2.0"},"content":{"rendered":"<p>I have received quite a few emails since the release of <a href=\"http:\/\/www.adobe.com\/products\/air\/\" target=\"_blank\">AIR 1.0<\/a> and <a href=\"http:\/\/www.adobe.com\/products\/flex\/\" target=\"_blank\">Flex 3.0<\/a> regarding the <a href=\"https:\/\/www.ericfeminella.com\/blog\/air-cairngorm\/\" target=\"_blank\">AIR Cairngorm API<\/a> which I developed last year. In the time since I have been working primarily with a modified version of AIR Cairngorm which I used on a number of successful real world AIR applications, however I simply have not had the time to document and refactor for general use until recently.<\/p>\n<p>In case you are not familiar with AIR Cairngorm it is an open source project built on top of <a href=\"http:\/\/labs.adobe.com\/wiki\/index.php\/Cairngorm\" target=\"_blank\">Adobe Cairngorm<\/a> which provides a framework for working with the Adobe AIR SQLite API while building an application with Cairngorm.<\/p>\n<p>AIR Cairngorm is built around the <code>SQLService<\/code> class which essentially wraps the AIR SQL APIs to provide a uniform interface which can be utilized as a service, much in the same way one would work with RPC services in a typical Cairngorm application. <code>SQLService<\/code> provides an API for both synchronous and asynchronous implementations.<\/p>\n<p>In the time since the initial development and <a href=\"https:\/\/www.ericfeminella.com\/blog\/2007\/07\/16\/air-cairngorm-air-extensions-for-cairngorm\/\" target=\"_blank\">release<\/a> of AIR Cairngorm, which was during the early alpha releases of AIR, there has been many changes to the SQL APIs in AIR. In addition I have also developed some new best practices for working with Adobe AIR and Cairngorm, all of which I tried to roll into this latest release where possible. <\/p>\n<p>The following is a brief description of the current AIR Cairngorm API:<\/p>\n<p><strong>AIRServiceLocator<\/strong>: The AIRServiceLocator is a sub class of Cairngorm ServiceLocator, therefore it inherits the same API as ServiceLocator while also adding additional support for working with local databases via the <code>getSQLService<\/code> and <code>hasSQLService<\/code> methods.<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/classes\/as3\/AIRServiceLocator.as.html\">AIRServiceLocator<\/a><\/p>\n<p><strong>SQLService<\/strong>: The <code>SQLService<\/code> class essentially wraps the <code>SQLStatement<\/code> and <code>SQLConnection <\/code> classes. SQLService allows developers to create an mxml implementation defined on a Cairngorm <code>ServiceLocator<\/code> just as one would with typical RPC services (e.g. HTTPServices, WebService etc.)<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/classes\/as3\/SQLService.as.html\">SQLService<\/a><\/p>\n<p><strong>ISQLResponder<\/strong>: <code>ISQLResponder<\/code> provides a consistent API from which asynchronous SQLStatement execution results and faults can be handled. <code>ISQLResponder<\/code> is very similar to <code>IResponder<\/code> in that it defines both a result and fault handler however with a slightly different signature which is specific to a <code>SQLStatement<\/code> result \/ fault, (i.e. strongly typed parameters).<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/classes\/as3\/ISQLResponder.as.html\">ISQLResponder <\/a><\/p>\n<p><strong>SQLStatementHelper<\/strong><\/code>: <code>SQLStatementHelper <\/code> is an all static utility class which facilitates substituting tokens in a SQL statement with arbitrary values.<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/classes\/as3\/SQLStatementHelper.as.html\">SQLStatementHelper<\/a><\/p>\n<p>I have also created a custom version of my Cairngen project specifically targeting AIR Cairngorm code generation. In addition I will be making some future updates to AIR Cairngorm which will include support for various other AIR APIs in Cairngorm, so stay tuned.<\/p>\n<p>Below I have provided downloads to the source, binary, air.cairngen and asdocs as well as asynchronous and synchronous example projects:<br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngorm.source.zip\">source<\/a><br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngorm.binary.zip\">binary<\/a><br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngorm.examples.zip\">examples<\/a><br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngorm.asdoc.zip\">asdoc<\/a><br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngen.zip\">air cairngen<\/a><br \/>\n<a target=\"_blank\" href=\"http:\/\/code.ericfeminella.com\/air-cairngorm\/2.0\/air.cairngorm.zip\" \/>air cairngorm (all)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have received quite a few emails since the release of AIR 1.0 and Flex 3.0 regarding the AIR Cairngorm API which I developed last year. In the time since I have been working primarily with a modified version of AIR Cairngorm which I used on a number of successful real world AIR applications, however I simply have not had&#8230; <a class=\"read-more\" href=\"https:\/\/www.ericfeminella.com\/blog\/2008\/06\/22\/air-cairngorm-20\/\">Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[9],"tags":[],"class_list":["post-191","post","type-post","status-publish","format-standard","hentry","category-news"],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/comments?post=191"}],"version-history":[{"count":0,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ericfeminella.com\/blog\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}