Googolflex!!
  • Home
  • About
  • Contracting

Recent Posts

  • Sprint’s new “Simply ‘Almost’ Everything®” Plans
  • CSS Changes in Flex 4
  • Dotted Underline LinkButton (Flex)

About The Author : jwd

This is John Dusbabek's tech blog. John is a software engineer and Flex developer in Provo, UT, where he lives with his lovely wife and four sons.

Recent Comments

  • Nikos on Flex: Binding to an Interface
  • Iain Hosking on Apache mod_proxy_balancer: No Protocol handler was valid

Archive for May, 2008

May
30

Book Review: Flex 3 Cookbook

Posted by: jwd | Comments (0)

This is the review of the book I posted to Amazon.com, when I’ve got more time I’d really like to expand on what I’ve already written.
I got off to a rocky start with the Flex 3 Cookbook, by Joshua Noble, et al.  Many of the recipes would be well suited for someone who is just beginning to develop in Flex. If you're a beginner, that's a good thing; if you're a more advanced user (one who has progressed beyond using states and doing your layouts in the designer) it might be a bit of a turn off.

Fortunately there are enough advanced recipes scattered throughout the book (in greater and greater density as you move to later chapters) to keep your interest. Chapters 17, 18 and 19 were my favorites (Browser Communication; Modules and RSL; and AIR, respectively).

My only real criticism of the book is that it bears many of the signs of being rushed to market (i.e. typos, unpolished code). I expect that on a blog, but find it detracting in a book.

There are a handful of recipes I’m surprised made it past the editors, ‘4.3 Create a Suggestive TextInput’ being the worst. Not only is the output terrible, but there’s a variable in the code that was undoubtedly part of a previous draft of the recipe, but is not used in the recipe printed in the book. Any developer can appreciate the need to get to market quickly, unfortunately it’s not as easy to change a printed volume as it is to change source code.  Ironically, this was the first example from the book that grabbed my interest… I’ve created suggestive inputs in the past for various components and was amazed that Noble had been able to do it so few lines of code.  It was also the first one I coded up, and as I mentioned, it was very disappointing (although my colleagues and I had a good laugh at it).

I would have been happier, and probably given the book 5 stars, if the title had been pushed back another month and greater attention paid to details like these. Overall, I got enough information from the book to make it worth every dollar I paid for it.

Some time has passed since I originally wrote this review, and I’m happy to say that I find myself referring to it more and more often. It will never be of the same caliber as “Programming Flex 2″ by Kazoun and Lott, but it has proven a valuable reference despite the lackluster editing).

Categories : Uncategorized
Comments (0)
May
17

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

Posted by: jwd | Comments (0)

I first came across Flex Solutions, Essential Techniques for Flex 2 and 3 Developers, by Marco Casario, several months ago.  I was getting an itch to buy a new Flex book and this was one of the titles that turned up in my searches.  It received fairly high reviews at Amazon, but I was unimpressed with it when I browsed the contents for an hour at B&N.  I remember having a “been there, seen that” kind of feeling at the time—the result being that I decided against it at the time.

It happened this spring that I found myself starting an internship at Nike, and that I would be mostly working with Flex (UI) and ColdFusion (backend).  My ColdFusion experience is next to zero, in fact if you don’t count the simple change I made to a simple hit counter I made back when it was still Allaire ColdFusion—my experience IS zero.  I started looking into expanding my ColdFusion library, specifically as it relates to Flex, and my searches lead me once again to Flex Solutions.  For whatever reason, I decided in favor of this book, and I’ve been regretting it ever since.

Sadly the only ColdFusion covered in the book was the bare basics.  If that’s all there is to working with Flex and ColdFusion, and nothing more, then I’ve got it made this summer.  My job should be a piece of cake.  I don’t fault the book too much on this point, after all it’s not a ColdFusion book.  In my defense, ColdFusion is mentioned 3 times in the product description on Amazon, as in “How to use the ColdFusion Extensions for Flex Builder,” under the What You’ll Learn heading.  Sadly you’ll only learn how to install the extensions, you might gain a vague understanding of what they are.  With regards to how to use them, Casario provides this instruction:

You can learn more about the ColdFusion extensions for Adobe Flex Builder in the video tutorials at the following site: www.adobe.com/devnet/coldfusion/articles/wizards.html.”

The article is dated August 28, 2006;  I haven’t watched it but I can only guess that it will be more helpful than Flex Solutions.

This book falls into the same category as most of the other Flex books I’ve read, and that is the “jack of all trades” category.  That’s probably a great thing if you need to sell books, but if you’ve been working with Flex for over a year and are looking for a book to guide you to the next level, it’s a bad thing.  It’s as though the publishers can’t resist adding those one or two chapters with an introduction to Flex in them, as if leaving out those 50-100 pages would make the book less valuable a resource.  I expect to find that in a book titled Flex for Beginners/Dummies or An Introduction to Flex, but not in a book that aims to be a cookbook.

I would like to say two things in Casario’s defense with regards to that matter.  First, is that it’s not even remotely as bad as those Deitel & Deitel ‘XXX How to Program’ books, where the first 5000 pages explain what a computer is and how to use the world wide web.  Second, he does add an Expert Tips subsection to each recipe.  None of them are that profound, but I wish the publisher could have extracted all those out and offered it as a pocket book or something.

The conclusion is that I would actually recommend this book to someone who’s a little less experienced with Flex.  If you’ve gone through Adobe’s tutorials and you need a few tips to help you finish your “big” application,  I could see the contents of this book being very helpful.  If you’d already consider yourself an advanced Flex developer, you’ll probably end up thinking this book is a waste of money.  Next time I’ll go with my instincts.

Now for a bit more criticism of Flex books in general.  Perhaps I’m too demanding.  I think I may have purchased Programming Flex 2 (Kazoun & Lott) with perfect timing.  I was at the perfect position along my Flex learning curve, the book had all the information I needed and at the right level, and I loved the book.  So much in fact, that I’ve often considered buying the Flex 3 edition even though I know I probably won’t find much new material in it.  I still refer to it often.

I absolutely refuse to accept that I know everything there is to know about Flex and/or Actionscript, but Flex Solutions and most other books I’ve read on the topic have given me very little under the category of “things I don’t know yet”.  I skipped directly to sections with topics I wasn’t as familiar with, but found only the same information I had already seen or heard.  Perhaps when I’ve had time to go through the book more thoroughly my opinion may have changed.

In the meantime, would someone PLEASE write an ADVANCED book about Flex?  Or is that even possible?  Is Flex just one of those things where a book can only take you so far, and you have to find the road to mastery on your own?  I’d write it myself if I considered myself qualified, or if I felt inclined to spend my time writing a book.  I’d undoubtedly hate it too, for reasons I stated above.  Anyway, I’m expecting a copy of the Flex 3 Cookbook soon, which I’ve been anticipating for a while now.  I just hope it doesn’t let me down.

Categories : Actionscript, Book Reviews, Cold Fusion, Flex 2, Flex 3
Comments (0)
May
16

Book Review: Programming Amazon Web Services

Posted by: jwd | Comments (0)

I don’t know if they’re just a more established tech book publishing company, but I usually have a good experience with O’Reilly books.  Programming Amazon Web Services, subtitled S3, EC2, SQS, FPS, and SimpleDB, by James Murty, was great.  5 stars.

I enjoyed this book mainly because I love using Amazon’s web services for recreation and work.  If I didn’t enjoy Amazon’s web services in the first place I probably would have found the book excessively detailed.  In chapter 5 the author writes, “This chapter delves into the nitty-gritty aspects of running a Linux server in EC2,” and he ain’t kidding!  This book really gets down into the API (and this is true for all the services treated in the book, not just EC2).

So if you’re looking to do some casual computing on EC2 or S3, you’d probably be better off without this book.  I’d recommend installing the Firefox plugins for EC2 and S3, and going from there.  Here’s a link (from the web site of a class I took last fall) that will probably be useful to someone in that situation.  On that page you’ll find links to some tutorial pages, and a webcast or two.

  • http://classes.eclab.byu.edu/462/lectures/index.cgi?Lab1

On the other hand, if your intention is one of the following:

  • Author a tool similar to the Firefox EC2 plugin.
  • Create complex scripts to manage your EC2 instances or S3 buckets.
  • Write a code library for any of the Amazon web services.
  • Increase your understanding of what’s going on when you use the Firefox plugins.

Then this is the book for you.

That said, this book exposed me to FPS and SimpleDB for the first time (never had a chance to use either).  As far as EC2, S3, and SQS go… I didn’t really learn how to do anything new with them from this book, per se.  But it did significantly increase the depth of my understanding regarding each of these services.  There’s a benefit to depth of knowledge with these kinds of technologies, because I’m sure I’ll encounter a problem in the future that can be solved with these tools, whose solution I might have overlooked before.

Categories : Amazon Web Services, Architecture, Book Reviews, CS 462, Design, EC2, Linux, S3, SQS, Scalability, SimpleDB, Virtualization, Web Services
Comments (0)
May
08

Flex: Binding to an Interface

Posted by: jwd | Comments (11)

We recently ran into a problem using our TrueMVC framework (which prescribes coding models to an interface and binding directly to the models) in that it was not obvious how to make the properties (getters/setters) of an interface bindable.

Consider the following interface:

package model {
  public interface ISimpleModel {
    function get name() : String;
	function set name(v : String) : void;
  }
}

Having the following implementation:

package model {
  public class SimpleModel implements ISimpleModel {
    private var _name : String = '';    

	public function SimpleModel() {}       

	public function get name() : String { return _name; }
	public function set name(v : String) : void {
	  _name = v;
	}
  }
}

Our goal is to bind to the name property of type ISimpleModel. If we add the [Bindable] tag above the get function declaration in the interface we get the error message:

[Bindable] not allowed on global or package-level functions

If we add the [Bindable] tag above the get function definition in the implemtation, or if we use no [Bindable] tag at all (except above our various model instances) then we get a warning:

Data binding will not be able to detect assignments to "name"

Which when executing the code, we observe to be correct.

To get binding to work correctly, you should declare the interface bindable like this:

[Bindable]
public interface ISimpleModel {
  .
  .

And then either declare the implementation class, or specific getter/setter pairs bindable. The warnings and errors go away, and the bindings will work.

Download the poorly commented source for this post here.

In the comments below, Alex Uhlmann suggests using a named Bindable metadata tag on the accessor in the interface.

package model {
  public interface ISimpleModel {
    [Bindable(event="propertyChange")]
    function get name() : String;
    function set name(v : String) : void;
  }
}

There should be a corresponding Bindable metadata tag in the implementation, although the event name doesn’t have to be manually specified again. This is the solution we originally wanted since it allows us to avoid class-level binding in cases where we only want property-level.

Categories : Actionscript, Design Patterns, Flex 2, Flex 3, MTC Framework, TrueMVC
Comments (11)
May
06

Reducing Outlook.pst File Size

Posted by: jwd | Comments (0)

So I haven’t taken Win2003 x64 off my laptop yet, but I am preparing.  One thing I noticed the last time I reinstalled my OS was that my Outlook.pst file was getting fairly large (it was around 550MB at the time and has since grown to over 700MB), which made it somewhat of a pain to backup and restore.  About the same time I also installed Office 2007; I also started to notice a decrease in Outlook’s performance and attributed this to the upgrade.

As performance became more and more noticably sluggish I began paying attention to the “auto-archive” prompts that sometimes appear, and I decided to start moving some of my stuff to an archive folder or else deleting it.  While doing this I noticed that the size of my archive.pst was growing significantly, but my Outlook.pst file remained more or less the same size.  I looked into this and discovered the process for compacting the .pst file.

The process is as follows:

  1. From the File menu select Data File Management
  2. Select the file you want to compact (in my case Outlook.pst, the default) and press the Settings button.
  3. Press the Compact Now button.

Here’s a link to the Office support page where I found the instructions Reduce the size of a .pst file.

My .pst file is now around 95MB, and Outlook’s startup performance has improved significantly.  Something else I found, in case anyone wants to create a size limit for their .pst files, go here.

Categories : Applications
Comments (0)
May
03

Book Review: Rich Internet Applications with Adobe Flex & Java

Posted by: jwd | Comments (1)

This is a review of Rich Internet Applications with Adobe Flex and Java (subtitled Secrets of the Masters), authored by Yakov Fain, Dr. Victor Rasputnis, and Anatole Tartakovsky.  Published by SYS-CON Media, 2007.  4 stars.

I ordered this book for two reasons.  The first was that I had read reports that it was purported to be the only book on Flex written for professionals, and second because I was powering my Flex applications with a Java backend and I needed some guidance on how to best accomplish that.  Although I think the book has compensating merits that made it a great value for the money, I was somewhat diappointed with regards to my two initial purposes.

There wasn’t as much Java as I had hoped.  A lot of the material covered in the book would be relevant to almost any backend (which can be seen as a positive aspect of the book as well as a negative).  If you’re looking for specifics for tying Java backends and Flex frontends together, this isn’t the book you want.  You’ll be better served reading Adobe’s BlazeDS documentation with regards to that.  The book does have about 10 pages in chapter 5 that discuss using the Java Messaging Service, chapter 6 has some Java but gives the DAOFlex Code Generator (the author’s automation product) excessive treatment.  Disclaimer: I should mention that I wasn’t using Java Messaging, nor did I want to use DAOFlex in any of the projects, so I didn’t find those chapters very useful.  Chapter 7 was the only chapter heavily related to Java that I founds useful.

With regards to being a book for professionals, I was a little disappointed with the first 150 pages (which I would classify as beginner material).  What’s an RIA, what’s Flex Builder, etc…  It would make the book more appealing to beginners, but I was able to skip over all of it.

 Now that I’ve voiced my criticisms, let me explain why I still think the book is great and worth every dollar I paid for it.  The first thing I have to mention is that within minutes of ordering the book, they had emailed me a PDF version of it to use while I waited on the mail.  That was really above and beyond.

The book provides excellent coverage on creating custom components (see chapter 8, Enhancing and Extending Flex Controls, for starters).  Specifically data aware custom components.  If you follow along in the book, you’ll end up creating a pretty awesome combo box that is both data aware and has auto complete.  You can also skip ahead and just get the component, although I’d recommend downloading the source for it directly from their site, as there are a few minor typos in the code (in the book, that is) that might hang a novice up.

They go into a fair bit of detail with customizing a tree control (thought not to the same depth they did with the combo box).  the treatment given on the TreeItemRenderer was very helpful, and applicable to other types of renderers.  They also go through the process of creating a custom “Advanced” datagrid, which I would recommend to anyone interested in creating custom components.

One of the gems in this book is chapter 15, Integrating with External Applications.  At the time I got this book, I could not find similar instruction on the Web.  The example goes through embedding an Excel spreadsheet using an ActiveX control, and integrating it into a Flex application.  They also go through several other ways of itegrating the two applications (i.e. embedding Flex in an Excel worksheet, having independent instances of each app communicating) which can be generalized to other applications.

The book was really great, and definitely an asset to my Flex library.  It has a few shortcomings (like an overly verbose index) but overall I’d highly recommend it for anyone looking to advance their Flex-ability (hey, everyone is allowed to use at least one Flex pun in their lives).

Categories : Actionscript, Book Reviews, Flex 2, Java
Comments (1)
May
02

A Little Goes a Long Way (Redoable comment fix)

Posted by: jwd | Comments (5)

I’m thankful that I not only have an interest in software development and programming in general, but also that I am pretty comfortable in most programming languages (even ones I don’t use on a regular basis).  Most of them are very similar and of common enough lineage, that if you need to do something simple in a language you’ve never used before, it’s not usually that difficult.

For example, take this Redoable WordPress theme I’m so fond of (this is actually a very bad illustration, because I am very comfortable in PHP).  I’ve had two problems with it since installing it.  The first was that annoying “Install Firefox” banner that couldn’t be turned off in the admin panel.  Firefox is great, but why annoy people with it who (like me) prefer to use IE?  It wasn’t really that hard to track it down in the source code and remove it completely.  I didn’t bother fixing the code that was checking if the flag was set, I just took out the whole thing.  That’s what I’m talking about (I feel confident that I could have accomplished that if it had been written in any other scripting language).

I had a similar problem today.  I was responding to a couple comments  and got an error after the first one warning me that I could only post every 15 seconds (”Hold on cowboy!”).  It’d be a nice feature if it worked correctly, but I don’t get enough traffic on my site to have to worry about that at the moment.  So a simple grep command later, I was in the file and I commented out the check.  Worked perfectly.

In case there are any others out there using Redoable 1.2, and don’t want to bother having to fix it: the file is in the wp-content/themes/redoable folder.  It’s called comments-ajax.php, and I commented out this block of code:

if ( ($time_newcomment - $time_lastcomment) < 15 ) {
  do_action('comment_flood_trigger', $time_lastcomment, $time_newcomment);
  fail(__('Sorry, you can only post a new comment once every 15 seconds. Slow down cowboy.','redo_domain') );
}

Found around line number 81 or so. You could probably comment out more, but I find that less is often better when I don’t know exactly what I’m doing.

Categories : Languages, PHP, Redoable 1.2
Comments (5)
May
02

Book Review: Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started

Posted by: jwd | Comments (0)

I finally got my copy of Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started, by Ben Forta, Raymond Camden, and Charlie Arehart.

When I found out I needed to learn ColdFusion for an internship I’m doing with Nike over the summer, I asked around and everyone tells me that Ben Forta is “the man” when it comes to ColdFusion.  The previous edition of this series was highly rated by most readers.  Although this particular volume of this edition seems to be rated “not as great” by people who rated the same volume of the previous edition, I still purchased the book because A) I was starting, literally, from scratch when it comes to ColdFusion, and B) I have no intention of reading the previous edition at present.

As advertised, I found this to be a book for beginners.  Somebody with no programming experience whatsoever could probably pick up this book and create some kind of web application with ColdFusion (probably not a very good one, but still he goes through IDEs, database theory and SQL so the clueless reader would definitely gain some exposure).  I found it helpful that he covered the two most common IDEs (Dreamweaver and CFEclipse), he didn’t make an assumption as to which the reader would be using.  Unfortunately, there was an assumption as to which ColdFusion server the reader would be using… ColdFusion Server from Adobe.  I don’t know how stable the competing open source versions are, so it was probably not realistic to expect any treatment in the book, though it would have been nice.

Another thing I noticed after just reading this one chapter, Forta’s “TIP” breakouts are surprisingly relevant and helpful.  The “NOTE”s aren’t that bad either.  Anyone who has ever read a Deitel & Deitel book, where the tips and pointers and debugging tips (and what have you) get out of hand quickly, will be able to appreciate this.

I’ll be honest and say that there were large portions of the book I skimmed.  I have no need for constructing a ColdFusion application from scratch, I prefer non-XML based scripting languages for that, that don’t require an application server (like PHP or Python).  My main intent was getting up to speed on ColdFusion so I could use it to support my Flex UIs.  So here’s a brief rundown of what was helpful and what I mostly skimmed:

I’d recommend skipping Part I (chapters 1-7) on account of very basic content.  Chapter 1 was informative (though not useful), I wouldn’t bother with the rest of it unless you are just getting started with programming.  If you have a choice of IDE (i.e. cost is not an issue) then you might benefit from the discussion on those, contained in this section.

Chapter 8, 9, 11, 16, 17.  These mostly covered concepts in the ColdFusion language.  The chapters between these deal mostly with ColdFusion forms and pages.  Don’t bother with those unless you’re going to use ColdFusion for your web page templates, it’s definitely not relevant to Flex development.  Chapter 18 was another informative chapter, though not useful.  Chapters 19 and 20 (on the Web Application Framework and Sessions, respectively) were helpful in my specific circumstance, because I’ve had to deal with them a lot.  In writing Flex applications that integrate with legacy ColdFusion applications, situations have arisen where an understanding of these things came in handy.  If I was writing a ColdFusion backend for Flex from scratch, I would probably not find much of it relevant.

There’s a lot of information packed into this book, all of it relevant to ColdFusion though it might not all be relevant to what you’d like to do with it.  Overall it was a very good introduction to ColdFusion, but I don’t think it will serve as a general purpose CF reference (I’ve found myself perusing it less and less as I’ve become more comfortable, though I still don’t consider myself an expert).

Categories : Book Reviews
Comments (0)

Search

Feedburner

Subscribe to

Get the latest updates delivered via email

Calendar

May 2008
M T W T F S S
« Apr   Jun »
 1234
567891011
12131415161718
19202122232425
262728293031  

Archives

  • July 2010 (1)
  • June 2010 (2)
  • May 2010 (1)
  • February 2010 (11)
  • January 2010 (3)
  • December 2009 (5)
  • November 2009 (1)
  • August 2009 (8)
  • July 2009 (8)
  • May 2009 (4)
  • April 2009 (1)
  • March 2009 (6)
  • January 2009 (1)
  • November 2008 (4)
  • October 2008 (5)
  • September 2008 (1)
  • August 2008 (5)
  • July 2008 (1)
  • June 2008 (2)
  • May 2008 (8)
  • April 2008 (5)
  • March 2008 (2)
  • February 2008 (3)
  • January 2008 (1)
  • December 2007 (6)
  • November 2007 (9)
  • October 2007 (1)
  • September 2007 (2)

Categories

Tag Cloud

adobe apache Architecture book review C++ centos client server architecture Custom Components database Design error message fedora flash catalyst flex Flex 3 Flex 4 fms iis 6 Interaction Design load balancing master-master master-slave mod_proxy_balancer Monkey Patching MySQL no protocol p2p peer to peer Perl PHP Red5 regex replication self registration selinux Shell Scripting shortcut manager skins socket policy file sockets states stored procedures stratus tools workflow

Coworkers

  • Casey Jackman
  • Sean Murphy

Family

  • Emily & CJ
  • Family Blog
  • Gary Dusbabek

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

RSS FlexExamples

  • Styling the text selection format on a Spark TextArea control in Flex 4
  • Setting the scale mode on a Spark Image control in Flex Hero
  • Setting the fill mode on a Spark Image control in Flex Hero
  • Setting a bitmap image fill on a Spark Form container in Flex Hero
  • Setting a bitmap image fill on a Spark FormHeading control in Flex Hero

Spam Blocked

847 spam comments
blocked by
Akismet

Sponsored Links

JUICE Chat

BYU Adobe Users Group


Copyright © 2010 All Rights Reserved
Flexx Theme by iThemes
Powered by WordPress