-
More on Flex Frameworks
Droop-Nizzle has posted some well-organized thoughts on web frameworks in general, and the need (or lack thereof) for a framework in Flex.
I mostly agree with his summary. It would be nice to have better test support in Flex (although I like mostly FlexUnit from what I have seen so far), and common app structure is always a good thing.
However, the Ajax.request example is a bit of a moot point. Ajax is just an object somebody put in a JavaScript library, and ActionScript’s prototypes are just like JavaScript’s, so doing the same style of syntax in ActionScript is a trivial matter. Class and usage sample below.
new RemoteCall("untitled.txt", function():void { mx.controls.Alert.show("Yeah It Worked: " + arguments[0].result); }, function():void { mx.controls.Alert.show("boo I didn't work: " + arguments[0].fault.faultString); });package remoting{ import mx.rpc.http.HTTPService; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; public class RemoteCall { private var _service:HTTPService; public function RemoteCall(url:String, result:Function, fault:Function) { _service = new HTTPService(); _service.url = url; _service.addEventListener(ResultEvent.RESULT, result); _service.addEventListener(FaultEvent.FAULT, fault); _service.send(); } }}Category: Uncategorized | Tags:
Related Posts
Recent Posts
- Greater Orlando Hackerspace (1)
- My Arduinome Build in Pictures
- How to Build An Arduinome (Part 3): Diodes and LEDs
- How to Build an Arduinome (Part 2): Components
- The Arduinome is Finished! (3)
- Loom Becomes as3commons-bytecode (5)
- Arduinome Coming Soon!
- Setting up WebDAV on OS X (1)
- Possible Fix for iPad Wifi Problems
- Bluetooth Headphones and iPad (4)