Excited to know more about Centaur, the next major release of ColdFusion?

I am sure most of are waiting to know more about Centaur at MAX.

Here’s an update on the session titled ColdFusion Powered AIR

Well, this talk is not just going to be about using ColdFusion as a backend for AIR applications. What will also be presented to you are the exciting features that are coming up in Centaur to build AIR applications!!

 What’s Centaur got to do with AIR?

Centaur will have some nice features centered around AIR Integration with ColdFusion.

What is it going to be?

One of the feature in Centaur will ease building offline applications in AIR.

Tell me more more more…

To know more sign up for the ColdFusion Powered AIR session today!!

Session info: Learn how to build Adobe AIR clients for use with your ColdFusion applications, leveraging offline data support and more. AIR is the powerful new runtime for portable desktop applications. Applications built for AIR are created using Flash, Flex, and other web technologies, making ColdFusion the ideal tool for building back ends.

What the session info does not have yet is that the session will also include Centaur related features.

When: Tuesday, November 18, 3:00pm – 4:00 pm

See you there! :)   

Comments

8 Responses to “ColdFusion 9 and AIR”

  1. Jones on March 6th, 2009 4:41 am

    Nice blog…
    visit also coldfusion example

  2. Abram on December 11th, 2009 12:25 am

    Hi Rakshith,

    I am developing an online/offline app using the CF9 and AIR integration and following your MAX presentation, Jayesh’s blog post and cf9 docs (such as http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSB2CD9911-C22C-4313-90D6-6B0FCC75397D.html) and am having a bit of trouble accessing data using the session.load() methods (loadByPk, loadAll, loadByQuery, etc…). I do something like:

    var loadToken:SessionToken = session.load(Users,{username:”myuser”,password:”mypassword”});
    loadToken.addResponder(new mx.rpc.Responder(loadSuccess,loadFault));

    private function loadSuccess( event:SessionResultEvent ):void
    {
    var user:Users = event.result as Users;
    trace(user);
    }
    When I debug this the above the “user” object is null (so is event.result). I’ve also tried loadAll, loadByPk, loadByQuery and have the same results.

    Can you perhaps write a series of tutorials that explain these and other aspects of the AS/cfair.swc integration in detail? The documentation doesn’t and I can’t seem to find anything on the net about it.

    Thanks for all your good work!

  3. Abram on December 11th, 2009 12:28 am

    I should note that the Users class refers to the users table that really does exist and has data in the SQLite database (verifiable by using the SQLite Manager plugin for FireFox). I should also note that the syncing works between server/client so it appears my ORM mappings are correct.

    Any help is appreciated!

  4. Rakshith on December 11th, 2009 12:39 am

    Hey Abram,
    session.load method would return an array of user object instances. “event.result as Users” would result in a null as an Array cannot be cast to your Users object. Just trace your event.result and you should see all the results in the array.

    Let me know if this works.

  5. Abram on December 11th, 2009 10:23 am

    Thanks for the quick reply. Unfortunately I still get null. Here are my attempts:

    //var loadToken:SessionToken = session.load(Users,{user_name:”myusername”,password:”mypassword”});
    //var loadToken:SessionToken = session.loadByPK(Users,{ID:1});
    var loadToken:SessionToken = session.loadAll(Users);
    loadToken.addResponder(new Responder(loadSuccess,loadFault));

    private function loadSuccess( event:SessionResultEvent ):void
    {
    trace( event.result );
    }

    The trace( event.result ) just outputs a blank line. When I inspect in debug, event.result has a source property which is a zero length array.

    Any suggestions?

  6. Abram on December 11th, 2009 11:35 am

    Wooohoo!! I don’t really understand why yet, but I got it working. Here’s what I did and how I changed it to make it work. Please offer any advice on a better way of doing this.

    I have two files: LoginScreen.mxml and LoginController.as.

    My LoginScreen simply has a login form and a button, however, in the onCreationComplete I am initializing the CF syncmanager and doing my fetch, then stuffing the fecthed data (users table) into the SQLite.

    Then, when the login button is clicked it calls a handler that calls LoginController.authenticate() method.

    In the LoginController.authenticate method I was creating a new instance of syncmanager and opening a session with the same DB file and same session ID as in the LoginScreen.mxml.

    On success of opening the session I then was trying to do the session.load(…), which returned a null result.

    What I changed was that my handler on the LoginScreen.mxml now passes the session object in the LoginController.authenticate() call, and I use that session object instead of creating a new instance of the session.

    I’m not entirely sure why this worked and the other didn’t, but it works. I know what I’m doing is bad, and that I should create some kind of global session, but I’m not sure how yet. Could you perhaps suggest a way to make a global session that I can use throughout my application? Something like a ModelLocater? I’m really new to Flex so I’m sorry if this is silly stuff.

  7. Abram on January 5th, 2010 5:29 pm

    Hello again Rakshith,

    Running into a couple things that are a bit odd. Maybe they are bugs and I can log them, but likely are just my misunderstanding/misuse of the code:

    1. Self joins tend to choke. For instance, consider a “Users” entity with the following CFC structure:

    Notice the Users entity that has a ManyToOne relationship to itself via modifiedByUserID. If I create a cfm page that does:

    It works fine. It stops the recursion.

    Now if I try to saveUpdateCache() on the AS3 side on that entity the adl.exe process will continually consume more and more memory until the PC grinds to a halt. Doesn’t seem to be figuring out the circular reference. Again, the CFC side works in this configuration, just not the Air.

    2. Date types don’t seem to work properly. For instance, I have a property in my AS entity that looks like
    modified_datetime:Date;

    In my CFC I have a property:

    When I fetch (via fetchCFC) and saveUpdateCache the results it creates and populates the SQLite table properly. However, when I stop the debugger (or close the Air app) the adl.exe never dies. I have to then kill it via task manager.

    Any help is appreciated.

  8. Abram on January 5th, 2010 5:31 pm

    Doh! the blog stripped out my code. I blogged the issue on my site if you care to look a the details (www.cfxchange.com).

Leave a Reply