Well, I survived the trip to 360Flex San Jose and back with 4 of my coworkers. Overall, I was really impressed with the conference. It was the first time I had been to 360Flex. I thought the technical content was great and was pleased by the size of the conference compared to the uber-conferences I've gone to of late (aka MAX).
Others have mentioned it, but some of the conference sessions can be watched online. If you weren't there, take a look.
My favorite session? Michael Labriola's data binding talk.
Oh, and I won an autographed copy of Deepa and Doug's book, Adobe Flex 3.0 for Dummies.
Tuesday, August 26, 2008
Friday, August 1, 2008
AMF Debugging with Charles
Over the past few years I have found Charles to be an indispensable tool for figuring out what is going on between our Flex applications and the server. There are other ways of getting the same information; such as setting the logging level to debug in services-config.xml, but Charles gives it to you in a much cleaner format.
I was surprised, when I did a presentation on Charles (among other things) at the Cleveland Flex Users Group (CLEFUG), that more people didn't know about it. So I figure there are more people out there who don't know about this amazing tool.
As I already mentioned, Charles can also show you the result of DataService fill requests, as long as they use AMF Polling and not RTMP. RTMP is not an HTTP based protocol, so Charles can't show you it. However, with DataService requests, you have to do a bit more digging since DataServices use a message-based format. Here's an example of what this looks like in Charles.

Once you find the polling request that has your data, you can see that the result is actually a SequencedMessage. The data for the request in the body property of that message. In this case, it contains StandardDocumentGroupVOs.
So, if you find yourself wanting to know what's going on in the AMF communication between your app and the middle tier, Charles is an excellent tool to use to find out. Of course, Charles would also show you your WebService and HTTPService communication since they are HTTP based. You can get Charles from it's website http://www.charlesproxy.com and it costs $50 for a single user license, but you can try it out for free.
I was surprised, when I did a presentation on Charles (among other things) at the Cleveland Flex Users Group (CLEFUG), that more people didn't know about it. So I figure there are more people out there who don't know about this amazing tool.
Charles basically allows you to see the HTTP requests made on your machine. You can inspect what was sent and the response. The great thing about it is that it knows about AMF. So if you're using RemoteObjects or AMF Polling based DataServices you can inspect the AMF stream in a human readable format, like so:

Here you can see that a getProjectUser method was called on a remote object along with the parameters it was passed and the resulting ProjectUserVO object. You can see all the attributes of that object that were serialized.

Here you can see that a getProjectUser method was called on a remote object along with the parameters it was passed and the resulting ProjectUserVO object. You can see all the attributes of that object that were serialized.
As I already mentioned, Charles can also show you the result of DataService fill requests, as long as they use AMF Polling and not RTMP. RTMP is not an HTTP based protocol, so Charles can't show you it. However, with DataService requests, you have to do a bit more digging since DataServices use a message-based format. Here's an example of what this looks like in Charles.

Once you find the polling request that has your data, you can see that the result is actually a SequencedMessage. The data for the request in the body property of that message. In this case, it contains StandardDocumentGroupVOs.
So, if you find yourself wanting to know what's going on in the AMF communication between your app and the middle tier, Charles is an excellent tool to use to find out. Of course, Charles would also show you your WebService and HTTPService communication since they are HTTP based. You can get Charles from it's website http://www.charlesproxy.com and it costs $50 for a single user license, but you can try it out for free.
Subscribe to:
Posts (Atom)