Which databases does Adobe Flash support, if any?
问题:
回答1:
None, really.
As others have said, the best solution is to have something in between. I personally prefer amfphp for larger datasets and plain xml for smaller stuff, especially since they introduced E4X (way better XML handling) in ActionScript 3.
However, since Flash can do socket communication, it is possible to talk directly to a server. This is very fast, but you're basically opening up your database to the world. I've never used any of these, but the major ones seem to be asql and assql.
Also, flash running in Adobe AIR has support for sqlite databases.
回答2:
None.
Instead, you would need to create some middleware (say, a webservice) that you talked to that did the database CRUD for you.
回答3:
Agree with @SCdF, create a service in php or any other language that takes a modified query from flash, executes it and returns the DB response. Make sure that it only takes a connection from its own local IP address or something like that to prevent "unintentional use".
回答4:
You should look at this article. Also you could look into Flex Data Services. Usually Flex is more suited for application that need a lot of access to data, but for simple things in flash you should use some Xml data sources, and write the xml source yourself in something like php, asp, python, perl etc.. like others have pointed out.
回答5:
@SCdF is correct. From the horse's mouth:
A Macromedia Flash movie cannot communicate directly with a database. However, Macromedia Flash movies can "talk" to server-side applications (also referred to as "middleware"). Middleware can query a database and relay data back and forth. There are many server applications available. Some of the most common are CGI, ASP, PHP, ColdFusion and Tango.
回答6:
What about Blaze DS (which used to be Flex Data Services) and LiveCycle Data Services?
回答7:
Zend AMF is a beast! From the creator of AMFPHP, but Zend AMF is supported by both Adobe and Zend. While AMFPHP is a bit more robust, the creator (Wade Arnold) of it seems to be focused on Zend AMF and it is becoming much better.
If you want something more enterprise level I would advise using Blaze DS or LiveCycle as suggested by prochaine.
回答8:
If you want to go the nosql route, there is an opensource actionscript library for communicating with CouchDb: http://code.google.com/p/as3relax/