2 Replies Latest reply on Jul 10, 2008 10:09 PM by Oliver Goldman

    A few quick noob questions...

    JOnnyAjax
      Hi,
      I'm new to AIR and I'm entering into things form a web developer AJAX perspective. And I have just a few quick questions:

      - Can an AIR application (based mainly on html +.js) access and manipulate a local SQLite database? (Most of the examples I've seen are using Flash to do this)
      - Can an AIR application monitor a Port, like Port 8080? I would like an application that monitor what web page you are browsing (in whatever browser). Or perhaps there is a better way of achieving this?
      - Where do you save preferences such as username/password? Obviously you don't use cookies or session variables.

      Thanks!
        • 1. Re: A few quick noob questions...
          Dr. Fred Mbogo Level 1
          quote:

          Originally posted by: JOnnyAjaxCan an AIR application (based mainly on html +.js) access and manipulate a local SQLite database?
          I haven't done it, but I don't see why not. SQLite support is part of the AIR API, which is equally accessible to all AIR application types.

          quote:

          Most of the examples I've seen are using Flash to do this
          AS3 is a more powerful language than browser Javascript, so it's easier to manipulate complex data in it. I don't see that JS is incapable of it, however.

          quote:

          Can an AIR application monitor a Port, like Port 8080?
          Doesn't appear so. I would expect to find a listen() method in flash.net.Socket to set up a server, but there's only connect(), which lets you connect to other servers.

          quote:

          Where do you save preferences such as username/password? Obviously you don't use cookies or session variables.
          You can use a SQLite DB, or you can use "Flash cookies" (LSOs): http://livedocs.adobe.com/flex/3/html/lsos_1.html#149022
          • 2. Re: A few quick noob questions...
            Oliver Goldman Adobe Employee
            All AIR APIs are accesible to both Flash and AJAX applications, including the database API.

            No, AIR cannot listen on a socket.

            Preferences can be saved to a file or database. Sensitive data like passwords, however, should be saved via the EncryptedLocalStore API.