views:

1113

answers:

3

What would be a better choice for making a database driven Adobe AIR(Desktop) application?

  1. Using PHP+MySql with AIR
    OR
  2. Using SQLite

If I choose SQLite, then I cannot reuse my code for an online application.

If I choose 1, I have to block few port numbers on User's machine. Also, I am using XAMPP for providing the user with PHP and MySql, so XAMPP opens up a command window as long as it's running. And, users get confused about what's that window for? It makes the end user experience slightly confusing.

+1  A: 

If XAMPP is too confusing for your client, install Apache and MySQL as standalones. It's essentially the same thing and you'll have more control over what's running in Apache/MySQL. Plus you won't get an annoying command window (though, to be quite honest, I don't recall a window that I couldn't minimize to the tray when I ran XAMMP).

Michael Todd
+1  A: 

Whatever you do, don't open up a command window while the program is running. If you do that, your customers will uninstall like there's no tomorrow.

As far as mysql vs sqlite, the standard approach is - if it communicates remotely, feel free to use mysql, but if you're installing the db on the client, you should use an embedded standalone db (sqlite).

How complex do you expect your app to be that you can't use sqlite (besides not being able to reuse some of the code that you mentioned)?

Artem Russakovskii
+2  A: 

I'd definitely use SQLite as its included in Air.

May I suggest; write your code in two sections. The UI which uses a JSON feed to populate itself, and the API to provide the JSON data. When it comes to port the application to the web you can use the same UI but with a rewritten API.

Al