![]() In Flex there are high level APIs (like RemoteObject, Consumer, etc.) that use this native AMF support in Flash Player. Likewise if you get some AMF and you call “byteArray.readObject()” you get the object(s) from the AMF. If you have an object in Flash Player and you create a new ByteArray and then call “byteArray.writeObject(myObject)” you will get a ByteArray with the AMF representation of that object. One of those things is to read and write AMF. This is where amf.js comes in.įlash Player has a ByteArray API that can be used for a lot of amazing things. But for the HTML5 client Stephan wants to reuse his AMF endpoints. This is a great choice for those clients because it makes the apps snappy. ![]() The PC-profile web client and the Adobe AIR desktop client both use BlazeDS and AMF as the primary serialization protocol for moving data between client and server. I recently had a conversation with Stephan Janssen who runs (an amazing Flex app), which started me on this fun project. Typically Flash Player is the client that reads / writes AMF data. So you can put AMF encoded data into any transport (like HTTP / HTTPS). AMF is just a serialization technology, not a transport. ![]() Both are publicly documented by Adobe and numerous server-side implementations of AMF exist. There are two versions of the AMF protocol, AMF0 and AMF3. But there are some advantages to using binary protocols - primarily much better performance. Typically in web apps we use text-based serialization protocols (like JSON or RESTful XML) for data transfer. Now for those gory details… AMF is a protocol initially created in Flash Player as a way to serialize data for storage on disk or transfer over a network. It should also work on your iPad, iPhone, or Android device. I’ve tested this in the latest Chrome, Firefox, Safari, and IE and they all seem to work. Before I get into the gory details of how this works, check out some developer eye candy: But then I came across this: “ High Performance JavaScript Port of ActionScript’s ByteArray”. I’ve wanted to do this for a while but didn’t think it was possible since JavaScript doesn’t have a ByteArray. I just finished the first version of a new pure JavaScript library for AMF.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |