-
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
- Speak and Spell Samples (2)
- Eulogizing the Insanely Late Steve Jobs (1)
- How to find old Airport Express/Extreme/Time Capsule firmware
- async-http-client
- Using curl with a web site secured by Rails Authenticity Token (4)
- An AppleScript to Toggle Sleep Modes
- Jamming on the Arduinome with mlrv (3)
- SammichSID Finished (1)
- Greater Orlando Hackerspace (3)
- My Arduinome Build in Pictures