1
votes

i am very new to Adobe Air and i am having a hard time with it.

i want to be able to create a desktop app for clients that communicates with a databse.

im currently used to writing everything in php, which then communicates with MySQL.

also, i plan on using Flex.

1: does Adobe Air communicate directly with the database? or does it communicate with PHP?

2: which is the prefered database: MySQL or SQLite? does it matter?

please help!

2

2 Answers

3
votes

AIR can communicate directly with MySQL, but this is considered very risky from a security standpoint. You'd need to put the database credentials in the compiled swf. This is slightly more secure than putting the credentials in a plain text file, but only slightly. Consider everything you put into the swf to be free game. Every .air file is a .zip that contains a swf that is your application. It is much better to use a service tier (such as PHP) to access the MySQL database.

SQLite databases can be used on the client to provide a local database for your users. This database can ad should be accessed directly from the application without the need for a service layer.

1
votes

Adobe Air can communicate directly with LOCAL databases. There are some examples on accessing sqlite databases with adobe air here (http://www.adobe.com/devnet/air/flex/articles/sqlite_db_api_in_air.html) (http://seantheflexguy.com/blog/2007/06/14/super-simple-sqlite-example-for-adobe-air-1-beta/)

IMHO, if you access the database using Air, I would prefer SQLite. If you plan to use a Flex + PhP approach, MySql would be your choice