How do you Extend RemoteObject?

Someone saw this old thread from the FlexCoders list and e-mailed me one solution. This was the question:

I'd like to have a custom remoteobject for specific error handling and logging. However, if I try to extend remoteobject:

public dynamic class CustomRemoteObject extends RemoteObject { ... }

It is completely unusable in an mxml file. If I try to declare any inside of it, I get a "could not resolve to a component implemenation":


<components:CustomRemoteObject>
<mx:method ...> <!-- compiler error -->
</components:CustomRemoteObject>

I know that is special-cased by the compiler because it doesn't have a component implementation. Is there a way to use custom remote objects in mxml with the mx:method tag? If not, is there a way to use custom remote objects in mxml and have callbacks at the method-level? Is remoteobject not supposed to be extended this way?

My answer at the time was to try this:


<components:CustomRemoteObject>
<components:method ...>
</components:CustomRemoteObject>

However, I doubt that works. As the original poster had stated, the method tag appears to be a compiler kludge. You can't extend RemoteObject and specify the methods in the same way. The method tags are not specified as an array and method is not a property on the RemoteObject class. I bet the compiler turns all the method tags into an operations array, although I haven't checked actual generated code.

The real solution to generating is to review the generated code from the Flex Compiler in a template that uses RemoteObject w/ multiple method tags and then figure out what it does; then replicate that approach in your own ActionSript.

What are some Open Source UI Testing Tools in Flex?

This question comes in from "P" and I'm kind of stuck to give him an answer.

I need to implement TDD in our flex application and condition is that we need to use a open source. My application is primarily has drag and drop functionality. I tried and analyzed several Test automation tools such as FlexMonkey, webdriver etc. they work fine till some extent.But they fail to recognize drag and drop actions and customcomponents.

Basic problem is that all Automated Testing tools identifies 'id' to perform any action. And in case of drag and drop all ids are generated on runtime Can you please suggest me any tool which can help or any change in my code which can help.

I'm at a bit of a loss. Obviously from P's question he needs a UI Testing tool; and FlexMonkey is the most well known in the Flex world. But, it wouldn't work for him.

I said that to get FlexMonkey to work with custom components, he may need to create a custom automation delegate and recompile Flex Monkey. But, I could never get that to work myself and eventually had to put it aside to focus on other things.

So, dear readers, what would you suggest? Are there other options out there?


I do like fielding questions from the audience, and have been doing a lot of that over on Stack Overflow and the Flextras Friday Lunch Podcast.

If you have questions feel free to ask me privately or stop by a Flextras Friday Lunch session.

You can get personal, confidential help from me [with screen sharing] via www.AskTheFlexpert.com.

You can also fine me at 360|Flex in DC this September.

Do ColdFusion and Flex really place nice together?

A comment came in on one of my earlier blog posts; and I thought the conversation was interesting enough that I'm promoting it to a post.

The original blog post was about getting ColdFusion and Flex to share objects (CFC and ActionSCript Classes) back and forth. There is a cool automatic conversion from CFCs to ActionScript objects provided by the built-in ColdFusion AMF Gateway.

To make this work you have to specify the properties in the CFC, and the ActionScript object in the same order, using the same case sensitivity, and with the same data type. This is where Ionectu drops in:

"Adobe has gone through a lot of trouble to make sure that ColdFusion and Flex play really nice together"

Translation : `Adobe` is retarded and here`s why, it`s quite simple.

With compilable languages, It`s a must to at least pretend to be able to create it once and leave it alone. It`s OOP not HTML ... amf remoting is `dependency central`. NORMAL people need to be able to change one end and not scrue up the entire thing, this is what development is about (in part), continuity, to have a flow that can be easily redirected.

Amf remoting remindes me of something along the lines of

if(this.file == "index") displayPage(1); else if(this.file == "page2") displayPage(2); else if(this.file == "page3") displayPage(3); else if(this.file == "page4") displayPage(4); else buy a hamster and teach it oop, it`s gonna come up with something better than Adobe did

The hell ?! Are all Adobe employees Google or Microsoft "rejects" ? (that`s not a nice thing to say, I know and I`m sorry, I`m just really pissed off, it just rubs me wrong.)

I, personally, think it is a big leap to call Adobe retarded for the Flex Remoting implementation in ColdFusion. It seems reasonable to me that when two completely separate systems have any similar objects used for the purpose of communicating between these two systems that when you change something on one system a similar change will have to made in the second.

As one example, If you change a database table, you may also have to change a Gateway Object or Data Access Object that relates to that table.

The sole purposes of Value Objects / Data Transfer Objects is to share data between two systems, in our case CF and Flex. IF you make changes to one side of the equation, it makes sense to me that you have to make changes to the other side.

Yes, the exchange is finicky in the order of properties on the objects, the data types of said properties, and the case sensitivity of the property names. CF is not case sensitive--most of the time--but Flex and most programming languages are. I accept the case sensitivity requirement without complaint.

I don't understand Ionectu comparison to the "If" condition. At the end of the day most development is some kind of if condition, isn't it?

I, basically, told that to the commenter, and he followed up:

In, Adobe`s making sure that CF and Flex play nice together they kind of forgot to teach them, how to understand and help each other. At the moment all that they can do is copy values from point a to point b (if you have points defined) (If you don`t you`re better off using wsdl btw). They don`t play nice togheter.. they just copy values from point a to point 1 from point b to point 2, the concept is the simplest I`ve ever seen .... this value goes here, this one here, and .... hm.. yep yep this goes here. Yeah that it. Client.as ....

And if that took them year(s).. well then that`s just sad. They could have spend some time "implementing" some "usability"

How can they as a company think that it`s a success ... "Ok we did it!" .. "To use it you just have to set the same name, set the same position, set an id, on both ends ... and that might do it, I think that`s all". "We`ll call this a ... bridge? no , no, that`s not FLASHy enough.. we`ll call it a protocol.. yeah protocol" ... How can they call that a protocol :wallbash: when clearly it can`t even stand on it`s own "two" feet.

I believe there are huge benefits to using AMF, such as performance and packet size; so I don't agree that we'd be better off using WSDL.

The real question I have is, how else would you implement it? I'm not quite sure.

I can respect that it'd be nice if Flex and CF were a bit more aware of each other.

Why do the properties have to be defined in the same order? Why can't the AMF Gateway use the alias properties in CF and Flex to associate the CFC to the Class and then do some magic to match up properties and data types?

What are your thoughts on this issue?

Want to discuss this in person? Come visit the Flextras booth at 360|Flex in DC this September.

360|Flex comes to Washington DC in September

In my 8th grade year book we had the opportunity to write biographies for each other. Most of them were slightly humorous; and many had us dying in weird and bizarre ways. What happened to me?

After replacing much of my body parts with computer hardware, I electrocuted myself during a failed world takeover by falling into the reflection pool between the Washington Monument and Lincoln Memorial.

I don't want to give away any spoilers, but I strongly recommend you make a trip to 360|Flex DC this September to welcome in my new world order. There will be Zombies involved. Thank you Brian Nolan.

360|Flex, if you didn't know, is my favorite Flex conference, and it will land in DC on September 19th.

You can register here or try to respond to their call for papers and get yourself a presentation spot.

Note: Image stole from http://www.visitingdc.com/memorial/washington-monument-address.htm

Which IDE Do you use for Building Flex Applications?

This question comes in from a long time development friend, Aaron:

What I was wondering on is what version of the Flash Builder do you use and why? I see a premium and basic versions, in regards to the premium I am not so sure I care about [the extra features]

I use Flash Builder 4 Premium, mainly because it is easily available to me since DotComIt is a member of the Adobe Partner Program.

That said, in the course of my normal development I don't use any Premium specific features. The premium features are the profiler, the network monitor, and unit testing integration. ( And CF Builder is included with Premium ).

In terms of the Network Monitor, I use ServiceCapture if I need it. It works great, and is already a tool in my set. I have no need to change.

With regards to Unit Testing integration, I I was never able to get it to work during the prerelease cycle and eventually gave up. When I need unit testing, such as building components for Flextras, I create an AIR project and use FlexUnit.

The Profiler is more interesting, though. It is used for performance tuning; which is important in many enterprise class applications. However, I've not had much experience with it.

There are also some alternate IDEs out there including FDT and IntelliJ as well as some Visual Studio plugins. I haven't explored any of them in depth, but I've heard good things about many of them.

Bullet Proofing Flex Components - By Jeffry Houser - Recording

The recording from my recent presentation I gave at the Online Flash Platform Meetup group is now available.

The presentation was a Flex 4 modded version of my Bullet Proofing Flex Components presentation.

Jeffry Houser's 360|Flex San Jose Session Survey Results

I tend to Tweet a lot more than I blog. A lot of questions--and answers--that would have previously turned into blog posts are now summed up in 140 characters or so. Brevity is hard; and I'm constantly impressed by my own personal technical support structure.

You probably know I spoke at 360|Flex in San Jose a while back. As part of presentation, attendees get to rate my performance. The results for this year are in. I like to give my thoughts about the results.

The Stats

First, I'm bummed that the average rating was 3.3158. One a scale of 1-5; I like to be higher. At least it's not low; but just mid range. This is not too be completely unexpected as I was dealing with something entirely new to both myself and most of the Flex Community. Deepa showed up to listen in and ended up fielding a lot of questions near the end. Thank you to Deepa. ( Deepa's domain appears to be expired, so I am not linking to it ).

Aside from the average rating, 89.47% of respondents found the session informative. That is a much nicer number.

Was the speaker authoritative?

I never worry to much about this question, especially when I speak about Building Flex Components. I have unique experience, thanks to Flextras. One comment is spot on:

On things he had researched he was, but as questions got outside of that, not so much.

This is very true. I know what I know; and don't try to BS through what I don't. A few folks give a nice shout out to Deepa for covering me on some of the other questions.

Was the session informative?

A lot of presentations are intended for beginners, and I believe this one was too. I covered a lot of stuff at a high level, without getting too dirty into the details. I was a bit worried because there were two other presentations--before mine--that covered similar topics. But, we all had a slightly different take; so it didn't turn out too bad and I was very well received.

This is especially flattering:

This has been the most useful session for understanding the differences in philosophy between Flex 3 and 4. The very simple examples were amazingly good at showing the principles without "fluff."

I've been told similar things in the past about both my presentation and writing style. I can take complicated things and break hem down into small digestible chunks.

Another comment here:

This session was a lot better than I was expecting. Not sure what I was expecting, but it was much more useful than I anticipated.

Thank You! Except I probably failed a bit in the topic description; or perhaps even the topic title. I'll admit the topic title was a bit open ended. I do better when I'm direct without hyperbole.

Were the Slides Useful?

I also get picked on for slides being sucky. It's not my strong suite; never has been. My slides got rated better here than usual, although someone commented that a few went by too quick.

Additional Comments

I love the catch all question and be sure to add them to every survey.

The teamwork between Deepa and Jeff was really good as well, and it was great she was here as this is brand new and it would be hard for anyone outside Adobe to know every detail.

Someone understood my ignorance on a few of the topics. Thank You!

I leave with one final quote:

it was exactly what it needed to be.

Thanks! I can't think of a better way to finish of this post.

Flash and the City: 3 weeks away

Flash and the City is coming up quick. This is a conference in New York City all about developing apps for the Flash platform.

I'll be there speaking about building Flex Components, a topic near to my heart:

Flextras will also be a sponsor.

Jeffry Houser won't be contributing to any Flex 4 books No matter what Amazon.com thinks

The Setup

A "Better than average" associate of mine approached me about contributing a chapter to a Flex book he was cowriting. My chapter was to focus on building Flex Components; something I do a lot of with my company, Flextras. It seemed like a good fit, so I agreed.

Eventually, talks with the publisher broke down. While I feel bad about leaving my friend in the lurch I'm not quite sure if this is my fault. This is my take on the situation because I want to get it out of my system.

The Build Up

First, I was approached last December about this opportunity. I've turned down Flex book authorship agreements before; but since this was just a single chapter the amount of effort was significantly lower. I was willing to sign on. I was put in touch with the publisher contact in early January and I requested a contract. They asked for chapter delivery in early February.

Can you please send me a contract?

I always ask two questions when asked to provide content to someone else with regards to such situations. The first is "What about ownership?" It is my long term goal, whether good or bad, to own as much of me as possible.

The second is "What is my compensation?" I always ask about compensation, never how much I get paid. Compensation can come in many forms, and sometimes recognition or exposure can take place of cash. In this case, I think the chapter authorship would have been a great way for me to promote my business of selling Flex Components.

The compensation offered was a flat fee, $400. My friend thought the rights of my contribution would revert to him and his main co-author. I was uncomfortable with that, but said I would have to see the final contract wording.

I waited for the contract from the publisher. They contacted me in the final days of January to extend the chapter delivery to the middle of February and to let me know that the contract was on the way.

I waited some more. In late February they contacted me to ask where my contribution was. I told them I was still waiting for the contract delivery before I would put the writing into my schedule. They said they would get back to me; and they did.

I finally got the contract the week before I left for the 360|Flex conference. As a sponsor and a presenter I had too much on my plate to even look at it; but I prioritized it for the day I got back from 360|Flex.

I decided that they had kept me waiting for 2 months; I could keep them waiting for two weeks. Perhaps that was my failure.

What does this contract really mean?

The day I got back from the conference, I reviewed the contract and sent them a list of questions and concerns. The contract was a work made for hire agreement; and I had to sign away all rights to the content. This was not unexpected on my point, but was a bit contradictory with what my friend had led me to believe. It may be possible that I'd be signing my rights to the publisher who would then be signing them over to the two main authors.

I wanted to clarify some things about the work made for hire and derivative works. There are only so many ways for a single person to regurgitate the same content. I, in theory, make money off selling Flex components and my primary means of promotion is through writing and presenting about how to create components. I needed to protect my right to continue to do that.

The chapter content could easily be considered a derivative work of screencasts I created with The Flex Show; or presentations I have given. I needed to protect my rights to still present and distribute said content. I also needed to protect my right to create future screencasts or presentations or articles on the same topics without them being considered infringement. I consider many of those things to be complimentary and non competing, but they are certainly derivative. I wanted the contract to clarify my ability to do that.

I also asked for some additional compensation, such as a listing in the "About the Author" page of the book. I also wanted to restrict the use of my name in promoting future editions of the book. If someone were to rip out, or re-write, my contribution at some future point I didn't want my name still attached to it.

I also asked for rights to distribute my chapter contribution digitally. I didn't expect that to fly; but wanted to ask anyway. I'd have loved to offer up the chapter to the readers of DotComIt's newsletter.

I also asked that, if the book were to ever go out of print, that the chapter rights would revert back to me. I wasn't sure this would fly, but I did negotiate such rights regarding my ColdFusion books.

I'm still Playing the Waiting Game

I waited two weeks. The publisher contacted me again, this time to ask for the status on my contribution. I said the contract issues were not settled and I was waiting on them. I re-iterated some of my concerns.

Silence!

I wait another month with no word before contacting them asking for status. They told me they no longer have need of the chapter. I asked why. But given their communication thus far, I am not expecting to hear anything back.

I feel slightly bad to have "ditched out" on my friends. The publisher put no effort into bringing me on board; so when the ball landed in my court I delayed due to other pressing issues. That was my reaction, which probably didn't help things along. But, all in all I was not the hold up.

Would you buy a book because it has my name on it?

I decided, in this post, not to make mention of the book or the two main authors. But, if you search on Amazon for my name; I'm apparently listed as an author. I have a slight problem with the publisher using my name to falsely promote their book. I'm pretty sure I am not the only contributing author beyond the two main authors; so why my name? Could it be because I'm moderately well known in The Flex Developer Community as the producer of The Flex Show perhaps?

Will my name sell books? I doubt it. If so, will it harm my personal brand if people buy a book with my name on it only to discover I had no contribution in the book? I'm not sure on that one...

Jeffry Houser's Adventures at the premiere Flex Conference

I'm sure plenty of folks will be writing about the recent 360|Flex conference in San Jose. Once again I think that John and Tom hit it out of the park. But, my opinions are probably biased since I've become good friends w/ both of them. Instead of writing the obligatory ego praising yes-man post; I thought I'd share this video of my slippers.

Tom found it hard to believe that I wear through a pair of slippers every few months. But, it just so happens that a home body like me wears slippers more than shoes. My shoes last a long time; but I burn through slippers quickly. Why were we talking about foot apparel? It's just one of the many awesome conversations I had about 360|Flex. Don't worry, though. There were plenty of Flex and AIR and HTML5 related conversations too.

Here are some of my other thoughts, in random order:

  • I was walking through the hotel corrider on Saturday and was recongnized as "The Flextras Guy". It is a bit odd to be recongnized for something other than producer of The Flex Show.
  • The Flex Show got to interview a bunch of conference attendees. Blaine did most of the interviewing. I did the editing. Because of a paperwork snafu; I held off on posting Tom's exit interview. Bad us! If we don't work it out, I'll give the recording to Tom / 360|Conferences and they can post it on their respective sites. I can be pretty particular about having all my ducks in a row. We hope to get this addressed soon. I also delayed some of Elad's talk about Flash and the City. It wouldn't be appropriate to put such a long 'promotion' in episodes paid for by a competitor. They'll show up soon, though.
  • I started drinking Pepsi again. Tomorrow is detox time.
  • I think I really screwed up my community keynote minute by not preparing. I spoke a bit about The Flex Show, which was great. I spoke a bit about Flextras, which was also great. Tom told me to mention the Flextras Friday Lunch podcast; but it just didn't come out of my tongue. That was a mistake. I could have also used it to push The Flex Show USB Drives and AskTheFlexpert. Oh, well.
  • The last day of the last session, had a Panel about the future of the Flash Platform. This rocked. It works out really well to bring everyone back together for the final session. I was surprised so many people stuck around for it. Usually things are empty by end of the third day of a conference.
    They had panels on Day 2 also. Between keynotes, panels, and parties, attendees started and finished the day together. I got to be on the final panel. For the first time I felt I contributed positively to a panel. I've never seen such a large crowd hanging around on the last day of the conference. I hope I was as brilliant as I thought.
  • I got a lot of good feedback on my presentation comparing Spark and Halo architectures. I was a bit worried about content repetition because two other people were using a similar "slide deck." Additionally I had less Spark experience than either of them.
    Deepa covered me by showing up and answering a handful of questions that were beyond the realm of my experience. She actually apologized for 'taking over' when I went to thank her. I was thankful to have her there.
  • I did not get to be interviewed on RIA Radio. They were just too busy w/ other folks and I didn't get the chance to slip in. But I hope to make that happen soon. Zach thinks it'd be awesome to have "The Flex Show" folks on RIA Radio, and vice versa. I think it'd be fun too.
  • I am starting to know more and more people in the community by name. Although I met a bunch of new faces too. Some of them were twitter friends that I met for he first time. More people seem to know me than I know them, though. That will, hopefully change, over time.
  • I got to meet Dan Wilson in person. Despite the fact that I've been a bit of an ass about not liking model glue he didn't beat me up. I appreciate that.
  • This is the first time I got to chat w/ Jesse Warden in depth. We met briefly at RIA Unleashed, but this time we had some free time to speak. He is a bundle of energy.
  • I spoke to Ted Patrick about the stuff that I'm doing with Flextras. He said he thought it'd be interesting if Adobe had some type of program to certify components for quality. I thought it was an interesting idea; although I'm not quite sure how it would work. There is a huge difference between a "one off" components and a component that is built to be easily extensible and bullet proof.
  • Kevin and Liz may be the most sickeningly adorable couple ever; but it gets me high to see two people so in love w/ each other.
  • I did not get to have dinner w/ John the final night. It's a bit of a bummer; as we have become pretty good friends. I really enjoy our off-air chats. Thankfully we did get in some face time at dinner the day before.
  • If none of that is appealing to you; we also had Screaming Monkeys from Digital Primates and Root Beer Floats.

More Entries

All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002.