Sponsored Link •
I would probably be much more of a user interface (UI) guy if the tools didn't cause me to tear out handfuls of my now-precious thinning hair. Every single time I try to find a new and better way to do UI I run into everything from edge cases that the language designers didn't think were important, to downright bad design.
For quite awhile I've felt that programming Flash with Flex was going to be the good solution, because they started from scratch to specifically solve the UI problem, and "adapted" to the browser via a virtual machine (VM). Through one of my conferences, I knew about Flex before Adobe bought the company that created the technology, and it always seemed promising. For a time I was even writing and speaking about Flex.
Now that I examine my feelings a bit more deeply, I realize that my intuition was telling me, "Yes, but." As in, "But it's not going to work out in the long term." (My intuition is very mysterious and there's no logic to how it knows things. If there was logic, I guess I wouldn't need intuition).
This is not the fault of Flex, but rather an accumulation of occurrences (things like those I try to puzzle through in Reinventing Business). Of course a big change happened when Flash didn't keep up with handheld devices and it became clear that Flash was a drain on batteries (if we'd gotten better battery technology then things might have gone a different way, but even then manufacturers would probably just have made smaller devices. On handhelds, code efficiency is going to be an issue for a long time). Worse, Steve Jobs declared "no Flash on iOS." It's hard to ignore the direction of Apple these days. I know that Adobe is working on a solution for this, translating Flex into some kind of HTML5; perhaps this will pull the fat out of the fire but that remains to be seen.
Friends have been reporting stability issues with Flash. I've had it lock up the Chrome browser a couple of times. Basic quality control issues on such a (relatively) old (and essential) piece of software is a troubling development.
One of the big nails in the coffin for me happened when Adobe decided to drop support for Flex on Linux. It's not just the fact that they've backed away from a promise, it's the deeper implication: it means that bean counters rather than technologists are setting the goals for a technology company, and that has never turned out well.
I still do like Flex and see it as a solution when you can control where it's being used, but if I was trying to build a general-purpose application that had the remotest chance of being used on handhelds (and these days, when is that not a possibility?) I'd have to use HTML5.
I do notice Adobe seems to be branching out; there's now a FlashBuilder 4.5 for PHP, although I have no idea what it even means to build Flash for PHP, unless it creates the front end as Flash and automatically connects it to a PHP back end and writes the necessary communication code for you. And FlashBuilder 4.5 is supposed to create apps that run on Flash-hostile handhelds like iOS, so all might not be lost in the Flash world.
I'd sure love to see Adobe use its formidable talents to create the ultimate HTML5 development environment. With their ability and reputation for tools, they could charge well for it and make a lot of money (after this article was written, Adobe announced an HTML5 tool for animation). I'm not holding my breath, but I'd strongly suggest they consider it. (The only recommendation I've gotten so far for an HTML5 IDE is Aptana so I don't yet know this space very well).
Closures appear to be the most misunderstood language feature I've ever seen. I cannot count the number of times I've seen writers equate closures to anonymous functions. This confused me for the longest time when I was trying to figure them out, and the propagation of this idea has confused many others as well (I suspect that a huge number of people in the Java community have been actually asking for anonymous functions when they've been saying closures).
Closure means that a block of code "closes over" variables defined outside that block. More importantly, those variables persist even after they would ordinarily have gone out of scope and disappeared. The closure captures and retains surrounding variables.
One thing that's very frustrating is how long we've been doing this, and how many opportunities that the various committees have had to try to fix things. I'm going to guess that there's been too much at stake and pressures from corporations have prevented anything useful from happening.
I don't know who to blame for the way that this has all happened. W3C, I suppose. It doesn't really matter. I can't imagine how we've managed to collect and save all these worst-possible decisions, but it looks like we're totally stuck with this mass of mess.
Really, after all this time there's no way to include standard headers and footers on a web page? And CSS -- who thought that was a good idea? (They couldn't even make a uniformly-adopted standard). It doesn't seem like complaining is going to do any good, either. These standards, as far as I can tell, are created in some kind of weird vacuum.
The other layer of abstraction we need is a pluggable DOM. Again, this would allow much better DOMs to replace the crippled one that we must cope with now. Both the VM and pluggable DOM would be tricky to design and implement because of both backward compatibility and the need for cooperation within a single page. But it's important, because the browser is arguably the single most important piece of software in the world -- it's becoming the OS for the user -- and this problem needs to be solved.
|Bruce Eckel (www.BruceEckel.com) provides development assistance in Python with user interfaces in Flex. He is the author of Thinking in Java (Prentice-Hall, 1998, 2nd Edition, 2000, 3rd Edition, 2003, 4th Edition, 2005), the Hands-On Java Seminar CD ROM (available on the Web site), Thinking in C++ (PH 1995; 2nd edition 2000, Volume 2 with Chuck Allison, 2003), C++ Inside & Out (Osborne/McGraw-Hill 1993), among others. He's given hundreds of presentations throughout the world, published over 150 articles in numerous magazines, was a founding member of the ANSI/ISO C++ committee and speaks regularly at conferences.|