July 22nd, 2008

OFF-TOPIC: Been a little distracted since Sunday.

All I gotta say is:

  1. It’s been a very interesting experiment to work through…brings back fond memories from when I attempted to screw around with Caldera OpenLinux back in the day.
  2. I’m finally at a point of enjoying the fruits of the community’s labor…can you say VMWare Fusion Beta 2, Adium, and Spaces?
  3. Might need to hit some Newegg soon…

And this:

LOL_DELL_MACOSX_WINXP

I need to catch some zzz’s…signing out…oh, and the source images used above belong to companies with big $$…you know © for them or something like that.

July 17th, 2008

AS3 - My Fav Functions - hasOwnProperty()

I need to blog code samples more. To be quite frank, I don't because something in my brain always tells me my posts have to be polished and verbose and I'm always short on time. That's probably why I have a bunch of unfinished drafts sitting in my wordpress db. That being said, I'm going to attempt to short circuit my brain to allow me to post quick snippets and as a result hopefully quicker and more useful blog posts...we'll see how it goes.

So, here's the first attempt. Earlier this week a colleague of mine asked if there was a cool way to E4X filter on attributes without having them cause an RTE. The RTE would be generated in the case of nodes that don't contain the attribute.

Here's a sample block of XML:

XML:
  1. <stuff>
  2.     <item id="1"/>
  3.     <item id="2" someAttrib="hello world"/>
  4.     <item id="3"/>
  5. </stuff>

We want to filter based on @someAttrib, but when you use the E4X predicate filtering syntax, the app will RTE on the first node since it doesn't contain @someAttrib. Due to the RTE, what my colleague was doing was surrounding his code in a Try/Catch as the following example illustrates:

ACTIONSCRIPT:
  1. try
  2. {
  3.     return p_item.( @someAttrib == "hello world" ).toXMLString();
  4. }
  5. catch( e:Error )
  6. {
  7.     trace( "doh! I broke" )
  8. }

My colleague knew there was a better way, since he knows Try/Catch can very slow. So he posed the question. I answered quickly since I got to promote one of my favorite functions in AS3: hasOwnProperty(). Here's the revised code block:

ACTIONSCRIPT:
  1. if( p_item.hasOwnProperty( "@someAttrib" ) )
  2. {
  3.     return p_item.( @someAttrib == "hello world" ).toXMLString();
  4. }

Enjoy!

July 17th, 2008

Ran into the 360|Flex dudes the other day.

I must have been pretty out of it, but apparently I ran into the 360|Flex guys at the Blue Monkey the other night and had a blast...read all about it:

http://tinyurl.com/5zyqma

Talking with them about the upcoming 360|Flex...I also guess it got a little wild upstairs.

Anyway, that reminds me, you need to get registered to go to 360|Flex.  Here's the link:

http://360flex.eventbrite.com

Also, if you want to see who else they've run into recently, here's a partial list (hit up the 360 Flex site for more):

Brian Weisenthal - http://tinyurl.com/637yhw
Ben Clinkinbeard - http://tinyurl.com/6dap93
Renaun Erickson - http://tinyurl.com/5j9oy8
Kevin Fauth - http://tinyurl.com/5flrak
RJ Owen - http://tinyurl.com/6pu3vj

All I gotta say is be there or be square!

July 2nd, 2008

MAX 2008 - Debugging and Profiling with Flex Builder

Adobe MAX is the yearly premiere event that encompasses all things Adobe...Flex, AIR, ColdFusion, Photoshop, you name it.  This year it's going to be November 16 - 19, 2008 in San Francisco, California.  This will be my third year at MAX, and thanks to Ted Patrick and CO, they just keep getting better and better.

That being said, I'm very excited to be speaking at MAX 2008 about the wonderful and powerful Debugging and Profiling features of Flex Builder 3!  For those of you that have seen me at past conferences such as MAX, 360Flex, Webmaniacs, RIADevShed, and FlexCamp you'll know that I'm a sucker for good debugging tools and techniques and I love talking about this set of topics.

You can keep posted on updates to this session by using the outstanding RIA session scheduler at the MAX site and although it's early and the time and date is subject to change, here's the current abstract on the session:

Debugging and Profiling with Flex Builder

Learn how to use the powerful debugging and profiling tools included within Flex Builder to build high-performance, reliable applications. We'll cover some advanced debugger features you may not know, as well as go into detail about how to get the most out of the profiler.
Speakers:    Jun Heider
Products:    Flex Builder, Flex
When:    Wednesday, November 19, 11:00 am - 12:00 pm

I'm planning for it to be an informative and entertaining session, and if there's a chance you'll be there and have some ideas on content you'd absolutely want to see feel free to let me know.

To find out more about MAX 2008 and register, here's a link to the very sweet-looking and feature rich RIA site that was developed for the conference:

http://max.adobe.com/

See you there!

July 1st, 2008

‘ten ‘hut…register for 360

360|Flex Send a Team or an Army - http://tinyurl.com/5vm594

360|Flex is already a great deal at the full price of $480. However, what's even more amazing is the $375 per ticket price when you register as a 4 person team. It's no wonder that companies are taking advantage of this deal and are sending whole teams. If you haven't registered yet, you'd better hurry. When teams buy in bulk, the number of available tickets dwindles fast.

July 1st, 2008

Source code licensing - very good reference.

Grant Skinner provides the community yet another valuable resource. Check out his reference on source code licensing: http://www.gskinner.com/blog/archives/2008/07/source_code_lic_1.html

June 25th, 2008

360|Flex San Jose and 40’s of Olde E!

I'm bringin' the paper bags, and Tom and John are supplying the contents.  Just kidding.

Although on a more serious note, if you don't want the above happening, please hit their site and comment on your beverage preferences:

http://tinyurl.com/4k9ads

Also, if you still haven't registered, you need to.  360 Flex is where all the cool RIA developers hang yo!

http://360flex.eventbrite.com/

June 10th, 2008

Another article on InsideRIA

Is it *dedication* or would a better word be *sick* that I wrote an InsideRIA article here in my hotel room during a family vacation in Florida?  Anyway, for those of you interested, you can read it here:

http://www.insideria.com/2008/06/flex-ria-performance-considera-2.html

Ok...off to Disney World.  I wonder how many times my son's gonna want to ride Buzz?

June 2nd, 2008

Doug’s CoverFlowContainer and Drag/Drop

A student of mine decided to use Doug McCune's CoverFlowContainer component in his class project.  He also wanted to enable drag/drop from one CoverFlowContainer to the next so I took what he had and added some Drag/Drop to it.

There were a couple things he needed supported in the drag/drop:

  • Drag image data from one coverflow component to a child array container in another coverflow component
  • Show the original image as the drag image
  • Only allow dragging into the proper coverflow  in other words don't allow dragging an image into a coverflow using image data children...only one using crate data children.

So...there were a couple things that weren't quite too fun to work with:

  • The immediate child of the CoverFlowContainer was a Repeater, getting everything to play nicely without being too kludgy required a custom component and a custom event.
  • When trying to create an Image clone by just setting the source attribute, it wouldn't be rendered in the drag image.  Found a post discussing how to work around it by using the BitmapData and BitmapAsset classes. (Unfortunately, I can't find the post in my delicious anymore...will update this if I do)
  • The DragManager.doDrag() requires a MouseEvent as it's third parameter...amazingly casting a MouseEvent subclass silently breaks it.  So I just added the source MouseEvent as a parameter to my subclass.

I know the code probably isn't optimal, and if you know a better way to do things feel free to comment on my blog.  However, being that it was a pain I figured I'd make the sample available for anyone feeling like taking a peek.

Anyway, below is a sample of the running app...view source is enabled.  Also, if you want to download the Flex Builder 3 Project Archive file, here's the link:

http://www.iheartair.com/samples/CodeZips/CoverFlowDragDrop.zip

Sample:

May 30th, 2008

Book Review: Flex Solutions - Essential Techniques for Flex 2 and 3 Developers

The highly popular ActionScript 3 Cookbook was released back in '06.

This was a really good book because it taught you the language through examples that you could use in real world situations.  A lot of the Flex and Flash developers I know really loved it.  The downside to this book was being an ActionScript book, it it didn't cover things that were Flex-specific.

At the end of '07, Flex Solutions - Essential Techniques for Flex 2 and 3 Developers was released.  I just got a copy of it recently to review, and will say it's worth checking out.

First off, this book was written by Marco Casario a very prominent and well respected member of not only the Flex community but also the Flash Lite community.  He knows his stuff, and the examples in the book prove it.

Like the AS3 Cookbook, this book expands your knowledge of the language through practical examples.  For instance:

  • Solution 1-5: Understanding the Flex event model
  • Solution 2-7: Building loosely coupled components
  • Solution 4-9: Formatting list-based controls with the labelFunction property
  • Solution 8-4: Supporting the Express Install Flash Player feature
  • Solution 10-4: Mashup applications using the LocalConnection and the Yahoo! Maps API
  • Solution 12-5: Debugging applications with the Logging framework

It even covers AIR topics:

  • Solution 14-2: Customizing OS windows using the AIR Window API
  • Solution 14-7: Keeping the application updated

The flow of the book is highly structured.  Chapters are broken down by main topic, then solution.  Then each solution has a "What's involved" section describing the underlying concepts, a "How to build it" section giving the reader a step by step walkthrough on code implementation, and "Expert tips" which took the examples a step forward.

Although I think this book is worthwhile, I do have a negative to point out.

I'm not positive, but I think Marco is Italian, and I don't think that English is his first language. I hope no one takes it the wrong way, but I think that some of the grammer distracted me while reading. I found myself re-reading paragraphs a couple times to understand the concepts being conveyed.   That being said, I would not even be able to imagine trying to write a book in a second language, for instance Italian.  In other words, although this was a negative for me as a reader, I give Marco props for writing the book in a non-native language. (If my initial assumption was correct)

The good thing is, MXML and AS code are universal, so the wealth of well-written code samples in the book made up for my inability to read through the textual portions efficiently.  As a matter of fact, if you download the code samples, Marco has provided 30+ MB worth!  He also mantains an external site for the book's code, and he makes it a point to keep it up to date.

All in all, this book is worth the money: easy to find information, written by an expert in the field, and filled with plenty of good cookbook style samples.  Good work Marco!

For those of you that are interested, here's the link:

http://www.friendsofed.com/book.html?isbn=1590598768

« Previous Entries

Gamer Jun

Pages

Credits

FireStats icon Powered by FireStats