Flex Builder Source Folders Need to Go Back in the Oven
October 31, 2007 on 2:56 pm | In Flex, Uncategorized | 7 Comments“The pain, the pain…”
– Jonathan Harris as Dr. Zachary Smith in the original Lost in Space
Dr. Smith was famous for whining, and so am I. Here’s my latest: Flex Builder does not work very well with multiple source folders in a project’s path. Probably the worst breakage is that integrated SVN source control (via the Subclipse plugin) doesn’t work inside them (FB-9989). Second worst would be that library projects can’t compile classes from multiple source folders (FB-9988). Yet another baddie: FB-5564: if you use Ctrl-click to navigate to a definition in a class which is in a linked source folder, a new window is opened unnecessarily, as if FB didn’t know that two files were actually the same. All this is too bad, because source folders are a really good solution to another serious problem with Flex Builder, and one that is probably harder for Adobe to fix: poor performance with multiple library projects.
If you’re using Flex Builder on some large applications with a number of library projects, you may have noticed it gets real slow. Yeah, I’ve noticed that too. It’s too bad, because using lots of small-to-medium libraries forces developers to be much more careful about dependencies between packages.
At Allurent, our approach to this problem has been to structure our Flex Builder projects for speed rather than strict dependency checking. We use Ant for all production builds (it builds multiple .swcs for dependency checking), while developers can use Flex Builder for incremental builds while they work on a project, if they want. To get around the big slowdown problem, we create mega-projects that include all the libraries’ source code directly via multiple source paths. While such projects are slow to open and start up, once you build them and warm up Eclipse’s caches they perform quite well.
The big fly in the jam jar — I know it’s usually ointment that metaphorical flies get stuck in, but that phrase gets kind of old, doesn’t it? — is that source folders are kind of semi-functional in Flex Builder. The fact that Subclipse doesn’t treat the contents of source folders as versioned (even if they are) is really frustrating. Maybe some folks out there are frustrated too. If you are please consider voting on the above bugs!
MAX 2007 in Barcelona: Talk Materials Online
October 18, 2007 on 10:45 pm | In Flex, Programming | 3 CommentsI just got back tonight from a very pleasant 4 day stay in Barcelona, where I spoke at the MAX Europe conference. I’ll be posting soon on some of the touristic and cultural aspects of Barcelona (with several observations on the Barcelona Metro’s user interface); this is just a quick note to let attendees and other interested parties know that the materials from my talks are available.
The sessions I gave this time were:
- The Euro-edition of an interactive panel on Flex Best Practices featuring myself, Steven Webster, Sascha Wolter and Dirk Eismann. This one was considerably less formal than the American version and had a lot more give and take; I feel I was able to apply some good lessons and feedback from the first one. I don’t have notes on the panel, since I was moderating it — you just had to be there!
- A presentation called Practical Patterns in Flex, which I adapted from Jim Echmalian’s talk at 360Flex earlier this year. This features a brand new take on the Model-View-Controller-Service architecture, and highlights the use of specific design patterns to remedy problems of encapsulating responsibility, dealing with asynchronous operations, and gaining access to the “right” controller without using messy singletons. I put together a working sample application in source code form that accompanies the talk.
- Another talk entitled Continuous Integration for Flex with Ant and FlexUnit, originally assembled by Daniel Rinehart for MAX North America.
I don’t have a lot of news about the conference that’s any different from my earlier observations on MAX North America. The food was better at MAX Europe (when there was some), and the sessions were smaller which made them more intimate. However, as a number of speakers noticed, people ask many fewer questions during the session in Europe — but more of them come up afterwards to talk.
Like the Chicago MAX, this conference was situated in a part of town where there are basically no amenities or activities besides hotels and the conference center. And unlike Chicago, there was a distinctly seedy feeling to the neighborhood once outside the immediate neighborhood of the conference. But… it was really easy to get into town on the Metro and see the sights. Barcelona is a truly wonderful city: more on that later!
UrlKit 0.70 with various fixes and Flex 3 Support on Google Code
October 9, 2007 on 8:44 pm | In Flex, Programming | 5 CommentsI’ve finally moved UrlKit over to Google Code, in the course of which I applied a number of contributed bug fixes (thanks to Tom Ortega and Cyprian Kowalczyk for their help with IE and Opera). It now lives on its very own UrlKit Google Project Page complete with bug database, wiki, browseable SVN repository, and everything that an open source project ought to have. I also did a bunch of work on build scripts to make it much easier to build, test and cut new distributions.
Apart from these fixes, the other main work that took place in 0.70 was the introduction of support for the new Flex 3 deep linking features provided by BrowserManager. Basically, the Flex 3 framework takes care of all the browser-dependent Javascript history support for UrlKit, which is great because I absolutely hate working on that part of it! In this scenario, UrlKit provides the URL parsing/generation logic on top of the basic, unadorned deep linking support you get with Flex 3.
I ran into a bug with Flex 3, unsurprisingly since it’s in Beta — the BrowserManager interface appears not to work in a key case (although I think it used to). This bug is logged as SDK-12955 if you care about such things — and you should, since you can boost the likelihood of it getting fixed by voting on this bug!
By the way, this is the first time I’ve used Google Code personally, and I must say it’s a breeze. And I feel so much better about the project, knowing that people consuming open source projects expect the kind of features that Google Code and Sourceforge offer as a minimum. I wish it had been around when I first hosted the project (Sourceforge was there, of course, but I’m glad I was lazy, I mean I’m glad I waited.)
Adobe MAX 2007: Highlights, Shout-outs, Brags
October 6, 2007 on 8:21 pm | In Flex, Programming | No CommentsI spent a good part of the last week in the Chicago area, attending and speaking at Adobe’s MAX conference along with my colleague Daniel Rinehart. It was a great show this year, with a lot of excitement surrounding the new technologies and concepts on display, particularly AIR, Adobe’s new desktop application technology that blends the capabilities of Flash, HTML and PDF.
A lot of great stuff was shown at the conference, and many folks have blogged the details well (Daniel for one) so I won’t bore with another repeat of it all. There were a number of highlights, including Thermo (code name for a forthcoming design tool aimed at Flex UIs that has some powerful capabilities for designers, allowing them to seamlessly move from comps to a “real” app in small, simple steps of refinement). I was also impressed by the move towards breaking out VOIP/collaboration capabilities (like those found in Adobe Connect) into separate Flex components that could be deployed in any application. I think Adobe is moving in a smart way to make their stuff more open and more invention-friendly so that developers can use their technologies as a springboard, not a black box.
Of course, I have to give big props to my friends and former colleagues at Virtual Ubiquity, the creators of the Flex-based word processor Buzzword. At MAX it was announced that their company was acquired by Adobe, and little wonder. Buzzword is going to rock Word, OpenOffice and Writely/Google Docs, and what better vehicle to propel Adobe into the online-productivity-app world?
This show was particularly exciting for me because Adobe Chief Architect Kevin Lynch demoed my company Allurent’s “Desktop Connection” for Anthropologie as part of the keynote on the first day. We think AIR is a really promising vehicle for platform-independent rich media applications on the desktop, and at Allurent we’ve been busily prototyping and working up ideas on how to exploit its best features. Desktop Connection is a kind of digital brochure, intended as a premium shopping experience for valued Anthropologie customers. It’s an AIR app that can be used either online or offline (since it comes with data for the whole catalog plus a bunch of preloaded media).
The feature that got the most audible reaction from the audience (and the most subsequent queries from developers and designers at the show) was the search-by-color feature:

The shopper can click on any point in a color wheel, or in a pixel of an image dragged in from the desktop or a browser, and the app displays a cluster of products with nearby colors, grouping similar hues together in the display. Although I don’t get much time to hack these days, this was a feature that I personally conceived and coded up myself, so that made it extra gratifying to see the reception from folks at the show!
Many developers and designers at the show came by the AIRPark (a set of barren white metal picnic benches on an Astroturf rectangle, in case you’re wondering what that might mean) to compliment us on the great-looking app and ask us how we implemented this feature. In case you’re one of them, well, the non-secret part of the sauce is this: apparel manufacturers typically create tiny “color swatch” image files that are used to convey color choices on their website. We take the average color values of these swatches, transform them into HSV (hue/saturation/value) triples and put them into our database. Then we build a special index based on a perceptual notion of “color distance” (check out color spaces on Wikipedia if you’re interested), and use that for a fuzzy match to the target color. The results are then sorted in a simple way to place similar hues near each other — for instance, in the example above, you see some orange items placed together although the target color was a shade of red.
Oh yeah, and my panel on Flex Best Practices went pretty well. I wanted there to be more blood, guts and arguing; in the end I think I was too polite and went easy on the contestants panelists. But at least the audience got to hear a bunch of contrasting, dissonant opinions on basic questions. I’m going to have to make Barcelona a real WWF-style smackdown. Hope to see you there!
Flex Best Practices Melee at MAX
September 11, 2007 on 7:56 pm | In Flex, Programming | 1 CommentAt MAX North America and MAX Europe this fall, I’m very pleased and excited to be moderating a discussion panel titled “Flex Best Practices”. A bunch of interesting folks will be on the panel, none of them lacking when it comes to having an opinion: Steven Webster (Adobe Consulting), Dave Coletta (Virtual Ubiquity/Buzzword), Dave Wolf (Cynergy), and Anatole Tartakovsky (Farata Systems).
I can promise a few things about this panel:
- No Canned Dog Food. There will be no PowerPoint slides or videos shown in this panel, just unfettered, spontaneous discussion. Some of it could involve you, if you’re in the audience.
- Concrete, Topical Questions. I’m canvassing the Flex developers around me (including readers of this blog) for the issues that are bothering them as they work right now. We’re not going to discuss how many MXML tags can fit on the head of a pin. We’ll probably talk about ways that we’ve seen Flex projects run off the rails and self-destruct, though.
- Contradictory Answers. In discussions of practice, we should cherish contradictions — they are a sign that we’re talking about something that is actually interesting, on which there are multiple points of view. I don’t think we’ll have to worry about everyone on this panel agreeing on everything! And the disagreements may help us all get closer to our own answers.
We’ll certainly be touching on frameworks, coding standards, multidisciplinary workflow, team structure, software modelling. What else? Please post a comment with your ideas, if you have some!
Antennae Flex Ant Templates now on Google Code
June 22, 2007 on 3:58 pm | In Flex, Programming | No CommentsA while back I announced Antennae, a powerful set of templates for building complex Flex projects with Ant. I’m very pleased to share the news that Daniel Rinehart has taken over leadership of this project and has moved it over to a new home on Google Code. This is a great move for the further evolution of Antennae.
Daniel is also going to be speaking on the topic of automating Flex builds at MAX 2007 — if you’re going, be sure to catch his talk!
…and A Moment of Coolness
June 20, 2007 on 11:13 am | In Flex, Programming | 1 CommentLet’s not overlook a Moment of Coolness (see previous posting): I was able to log a bug against the Flex framework in Adobe’s public bug database, and refer to it in an online post. This is some real progress towards openness, and a milestone for the platform. It bodes well for the health and progress of Flex.
There’s been a lot of discussion of Silverlight vs. Flex [Continued...]
Moment of Weakness: Weak Event Listeners Can Be Dangerous
June 20, 2007 on 1:43 am | In Flex, Programming | 8 CommentsIt’s been a funny week, in which I’ve run into two different killer bugs, both of which were caused by the same dangerous (but occasionally useful) programming practice: weak event listeners in ActionScript 3. I’m going to write a bit about this scenario, because it’s very hard to debug and it’s a very non-obvious mistake that I think many people can make. (Even the Flex team can run into this: one of the bugs I found was in the Flex 3 Beta framework, SDK-11389.) And, yes, this can occur in other languages: I’ve seen it in Java too.
Both bugs manifested themselves as an event which, unpredictably, would fail to be dispatched to a waiting listener. When I say “unpredictably”, I mean, about 1 out of 3 times, with no apparent rhyme or reason. It took a lot of troublesome debugging to reach the conclusion: “hey, there’s this object which I can see adding itself as a listener for event X, and then X gets dispatched and the object never gets notified.” It took a bit longer to reach the next conclusion: the object wasn’t getting notified because it didn’t even exist any more!
In both cases, the missing object was a weak event listener. [Continued...]
Adobe Flex goes open source
April 26, 2007 on 11:37 am | In Flex, Programming | 4 CommentsI have a release to get out the door this week, it’s almost time to go to the office, and I haven’t had breakfast yet. What am I doing writing a post right now?
It must be because Adobe has announced they’re open sourcing Flex. I have to hand it to Adobe: this is a great move on their part, for a bunch of different reasons:
- There’s a large, able body of developers who are ready to put their energy behind making Flex a standout platform. The quality and the feature completeness can improve greatly if the project is managed well.
- These days, information about a platform that remains proprietary and under wraps is an adoption barrier, not a competitive advantage. Although the framework code was already available, we didn’t have public access to the dev tool sources, the bug database, the development roadmap, and many other staples of OS projects.
- Flex vs. the competing MS Silverlight/WPF is no longer a mere feature comparison game, it’s a philosophy comparison.
- In contrast to the more balkanized AJAX platform world, this creates a clearly dominant open-source platform in the rich-internet-client space.
Now the big questions are going to be the little questions. For instance, from the Flex Open Source FAQ:
Our goal is to make the initial open source distribution as close to the commercial distributions of the Flex SDK as possible. Due to restrictions on some components that have been licensed from third parties or come from other Adobe products, some portions of the current free Flex 2 SDK may be made available in binary form only.
Hmmm…. what will those pieces be?
Anyway, I’m pleased and pumped that my favorite client platform of the present day is heading in a really constructive direction.
An ActionScript interpreter, courtesy of JavaScript and Apollo
April 12, 2007 on 10:28 pm | In Flex, Programming, Uncategorized | 3 CommentsI’ve been experimenting quite a bit this week with Apollo, in preparation for a wee talk on the subject at Harvard. I’ve been building out that dependency analysis tool in Apollo and exploring the cool Javascript/Actionscript bridging capabilities in a series of examples.
Something amusing came up in the course of exploring script bridging: because JavaScript has the eval() function, and because AS3 objects are visible in an Apollo HTML DOM as fully fledged Javascript objects, one can easily use eval() in a Javascript context to evaluate live AS3 function calls, property assignments, and so on. Very, very nice!
For example,
<head>
<script>var obj;</script>
</head>
<body>
<input id="expr" type="text" size="80"/>
<a href="#" onClick="eval(document.getElementById('expr').value)">
Evaluate
</a>
</body>
If you stuff this HTML into an HtmlControl, set that control’s window.obj to some AS3 object (say a Label for argument’s sake), then you can eval expressions like obj.setStyle(”fontFamily”, “Tahoma”) inside the HtmlControl and watch them take effect before your eyes. Should be a great debugging hack in Apollo.
Entries and comments feeds.
Valid XHTML and CSS.
All content copyright (c) 2006-2007 Joseph Berkovitz. All Rights Reserved.