Adobe Air - MySQL 或 SQLite
我对 Adobe Air 非常陌生,并且很难使用它。
我希望能够为与数据库通信的客户端创建一个桌面应用程序。
我目前习惯于用 php 编写所有内容,然后与 MySQL 进行通信。
另外,我计划使用 Flex。
1:Adobe Air 是否直接与数据库通信?或者它与 PHP 通信吗?
2:首选数据库是MySQL还是SQLite?这有关系吗?
请帮忙!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AIR可以直接与 MySQL 通信,但从安全角度来看,这被认为风险很大。您需要将数据库凭据放入已编译的 swf 中。这比将凭据放入纯文本文件稍微安全一些,但也只是稍微安全一些。将您放入 swf 中的所有内容视为免费游戏。每个 .air 文件都是一个 .zip 文件,其中包含一个作为您的应用程序的 swf。最好使用服务层(例如 PHP)来访问 MySQL 数据库。
客户端可以使用SQLite数据库为您的用户提供本地数据库。该数据库可以直接从应用程序访问,而不需要服务层。
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.
Adobe Air 可以直接与本地数据库通信。
这里有一些使用 adobe air 访问 sqlite 数据库的示例(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/)
恕我直言,如果您使用Air访问数据库,我更喜欢SQLite。如果您打算使用 Flex + PhP 方法,MySql 将是您的选择
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