Archive for January, 2006

A Wake-up Call: How Flash Can Lose the Net

Flex 2 has so much potential. Let's hope Adobe doesn't price itself out of the running.

Adobe reveals plans for a free Flex 2 compiler and a reasonably priced IDE and yet I'm terribly worried. Why?

I was on the phone today with a good friend who is also a prolific writer and we got to talking about the latest e-learning project he's working on for a company. They're not using Flex for it because – wait for it – of the price (I bet you've never heard that one before.) So, of course, I tell him all about Flex 2 and how wonderful it is and how it's going to be priced at a much lower price point and I ask him if he's taken a look at it. His response: "No, we're looking at Sparkle."

You see, this firm that he's working for – it's what we call an "enterprise". Now I looked up the term recently and apparently it doesn't mean "gullible and with money to burn" but rather "a unit of economic organization or activity; especially : a business organization" (Merriam-Webster). Note the word "economic".

Rumors have been floating around for a while now that Adobe is considering lowering the price of Flex and actually splitting it up into two or three different products: The framework, the Flex Builder tool and Enterprise Services. According to a News.com article, Adobe is planning to release a basic development kit for free that contains the Flex framework and compiler and is planning to price the Flex Builder tool at around the $1,000 price point (note to Adobe's UK team: According to XE.com, that's roughly £562, not £1,000 – please try to get it right when putting it up for sale here!) So far, this is all great news, but the final revelation casts a shadow over the announcement: Enterprise Services server is reportedly going to be priced in the $15,000 range.

Let's summarize these three moves:

  • Offering a free basic kit with the framework and compiler: Good
  • Pricing the Flex Builder tool at around the $1,000 mark: Good
  • Offering Enterprise Services as a separate product for $15,000: Bad, bad, bad! Camel, camel, camel!

Camel? Yes! As in "horse by committee." It feels to me that this decision was not taken with an eye towards the future but, rather, to satisfy both sides of an internal debate. I imagine it went something like this:

Powerful VP 1: Listen, the Flex 1/1.5 pricing scheme was great. We made great inroads into enterprises and we've sold… what is it now? At least a hundred licenses! Woohoo! We should stay the course. Did I mention "enterprise" – I love that word, you know. It's such a lovely word that I sometimes find myself repeating it over and over.

Powerful VP 2: You're a dork – we just wasted the last two years. We had a great head-start on Microsoft and how many developers do we have to show for it? A handful!

Powerful VP 1: Heeey! Only my mother calls me that! Take it back. And we actually have hundreds of developers… so there!

Powerful VP 2: Listen, before it's too late (if it's not too late already), we need to push Flex out to the masses. We need developers! The market for tools and servers is a supply market. What's scarce is developer mindshare. Developers today are faced with so many different technologies they can learn and they must pick and choose the one or two that is most useful to them. Flex is a blimp on the radar right now.

Powerful VP 1: Yeah, well nothing comes close to Flex in terms of the features it provides. Don't forget that Flash apps can maintain state on the client –

Powerful VP 2: *Yawn* Sounds like a history lesson. Haven't you heard? Ajax can do that now too. And how much does a killer full-stack framework like Ruby on Rails cost? Remember it's a server product!

Powerful VP 1: Uhhh, donno… ummm… $15,000?

Powerful VP 2: It's free, el dorko!

Powerful VP 1: Hey… only Uncle Gonzales calls me that… take it back! And… and, anyway, Flex is really interactive and expressive and like so totally artsy and all.

Powerful VP 2: Have you seen Microsoft Expression?

Powerful VP 1: Yeah, well, that's not cross-platform! Hah, so there!

Powerful VP 2: Tell me, how many enterprises run .Net? How many enterprises couldn't give a flying mongoose whether or not their apps run cross-platform because they are so totally and utterly invested in Microsoft technologies?

Powerful VP 1: So what exactly are you trying to say?

Powerful VP 2: That Santa Claus isn't real!

Powerful VP 1: What? WHAAAAT???? Nooooo!

Powerful VP 2: I'm saying that on the one hand we have Ajax. It's not perfect but there's definite momentum behind it. Already there's a rush for tools to make development easier and full-stack open source frameworks that provide a wonderfully streamlined workflow. Then, on the other hand, we have an 800-pound gorilla about to make his entrance. The last thing we need is to price ourselves out of the fight. We need to make it as easy as possible for developers to create data-rich, rich-client applications.

More Powerful VP: OK, guys, I'm going to cut you off here. We'll continue this over Halo… for now, let's just all get along! Here's what we'll do and it'll make both of you happy…

(Any similarity to real life people or events is totally coincidental – I seriously have no inside knowledge about what, if any, conversations went on about this or the parties involved and I wasn't thinking of anyone in particular while I wrote this.)

So yes, in the end we have a solution that's two-thirds correct. But the crucial bit that's missing is Enterprise Services.

From what information is publicly available currently and from the public demonstrations at Spark Europe and other events, it appears that Enterprise Services will provide a simple, efficient and robust mechanism for building data-rich applications easily. Just what we need to compete with the sort of development times available with, say, Ruby on Rails.

Couple Enterprise Services with the amazing new Eclipse-based Flex Builder tool and the kick-ass Flex framework written from scratch on sweet, performant AS3, running on the new AVM 2 in Flash Player 8.5 and we have the makings of a champion. A champion that can easily conquer the Internet as the latter finally morphs into an application platform. But price one of the three critical modules at $15,000 and I predict that you will, in the next few years, watch in horror as Microsoft and the Ajax world share the spoils and Flash is relegated to the sidelines; to remain the darling of banner ads, online games and, perhaps, the odd application.

Please, Adobe, blame the price point on a miscommunication and reconsider this decision. Make the decision to use Flex a no-brainer for developers and businesses and let's watch as Flex applications gain the sort of ubiquity that the Flash Player currently has. I want the typical response of a web developer to be "Yeah, we use it" instead of "Huh?" when I mention Flex.

This is a historic moment and this is a historic decision. You made a mistake while pricing Flex 1 and we wasted two years that could have been spent building developer mindshare. Don't make the same mistake again or, this time, we can lose the Net.

Arp, meet Tartan: A viable solution for Coldfusion Flash Remoting using Value Objects

Arp and Tartan: Bringing patterns-based development to Flash and ColdfusionSam Shrefler just announced on the OSFlash mailing list that he has released a Contact Manager sample application showing how to use Arp and Tartan together.

Arp is a pattern-based framework for the Flash Platform, written by yours truly and Tartan is a similar framework for the server-side written in Coldfusion by the OpenXCF. Their command-driven architectures and use of Value Objects makes the two frameworks a perfect fit. Tartan, furthermore, overcomes the below-par Flash Remoting support in the current release version of CF. If you want to see what I'm talking about, take a look at the base tartan.vo.ValueObject class (CFC) to see the workarounds necessary to enable the passing of custom value objects -- something we take for granted in OpenAMF, for example.

This combination is your best bet if you want to use Flash, Flash Remoting and CF together to create pattern-based Rich Internet Applications and will be officially endorsed by Arp.

Download Sam's Arp-Tartan Contact Manager sample application.

Great work, Sam!

They broke my YubNub!

They broke my commands... they broooke my commands!

Last week, I created a couple of YubNub commands for searching the Flex Alpha 1 LiveDocs. I must've rubbed somebody at Adobe the wrong way, because it appears that the Flex 1 Alpha LiveDocs pages were taken down and thus my poor commands are now broken :) Why? Whhhyyyy? What did they ever do to you? They were just simple little commands... they never hurt anyone...

Of course, as with anything else Alpha, things can (and do) change frequently. I'll update the commands once the LiveDocs are back up again.

Last Day for Hot Shots Early-Bird Discount

Today is the last day for the early bird discount for the Hot Shots courses! Sign up today to lock in the early-bird price of £145/course :)

Update: So, how chronologically challenged can one person be? Seeing as how January has *31* days (hey... I knew that, ok!) And seeing as today is the 30th... well... *tomorrow* is the last day for the discount.

But what's time anyway... it's all relative... umm... ok, I'll stop digging now! :P

Nested comments in MXML

Block comments -- no, don't!Recently, while using Flex 2 Alpha 1, I found that I could not comment out a section of MXML that itself contained comments. As a developer, I'm used to quickly commenting out bits of code while debugging and Flex Builder even provides a handy shortcut for this: Source -> Block Comment.

Unfortunately, this feature currently has two shortcomings that make it a less-than-ideal solution.

Firstly, as I mentioned above, it cannot be used to comment out MXML that itself contains comments and, secondly, it cannot be used to comment out ActionScript code within mx:Script tags.

The second issue shouldn't be too hard to fix and even the first one can be avoided with a little workaround.

The first shortcoming is actually a limitation of XML: You can't nest XML comments.

The Block Comment feature currently places comment tags <!-- --> around a selected bit of MXML. This works correctly unless the markup itself contains comments, in which case, the document ceases being valid XML. So, what's the workaround? Simple: You can use a script to comment out areas of MXML that contain comments.

So, instead of <!-- -->, the Block Comment feature could wrap the selected text with the following tags:

    <!-- MXML BLOCK COMMENT -->
    <mx:Script>
        <![CDATA[
            /*
                <!-- Put anything here,
                        including other XML comments -->
            */
        ]]>
    </mx:Script>

Concise, well-written comments that clarify the intent of code is the mark of a good programmer. The importance of commenting not just your ActionScript code but your MXML increases with Flex 2, as more logic becomes contained in the MXML via data binding, validation, states, etc. And, as more and more comments are placed in the MXML, the current Block Comment feature will break more often and for a larger number of users when commenting out blocks of code while debugging.

If, however, the suggestions herein are implemented, the Block Comment feature should become indispensible and widely used. Here's to that! :)

Just 7 days left for Hot Shots discount

A quick reminder for anyone considering attending my Hot Shots courses that the early bird registration for February's courses closes on January 31st, in just 7 days.

You can get more information and sign up here.

YubNub commands for Flex 2 and 1.5 LiveDocs

Search Flex 2 and 1.5 LiveDocs with YubNub commands

You can now search Macromedia's LiveDocs for Flex 1.5 and Flex 2 using command-line commands like flex2p mx.effects to see the documentation for the mx.effects package.

Thanks to Paul Godden's email on the Brighton New Media list, I discovered YubNub yesterday. YubNub is "a (social) command line for the Internet" allowing anyone to create commands that launch web sites and applications. How cool! Of course, I had to create one so I decided to make one to help me search LiveDocs.

The commands I ended up creating are called flex2p, flex2c, flex2d and their 1.5 counterparts, flex1p, flex1c and flex1d. To look up a package, use flex2p; for classes, use flex2c and, if you just need a shortcut to open the main LiveDocs index, use flex2d (or their equivalents for Flex 1.5.)

Examples

Using the commands is easy. Here are some examples:

LiveDocs for mx.core.Application class (Flex 2)
flex2c mx.core.Application

LiveDocs for mx.core.Application class (Flex 1.5)
flex1c mx.core.Application

LiveDocs for mx.effects package (Flex 1.5)
flex1p mx.effects

If you've been looking at the actual URLs, you would have noticed that you can invoke a command in YubNub via a URL such as:

http://yubnub.org/parser/parse?command=flex1p mx.effects

This should provide an alternative (and easy) method of providing LiveDocs integration into various IDEs. (You can, of course, issue the commands from the YubNub web site or via a plethora of third-party desktop consoles, or even a FireFox search plugin.)

Limitations

The flex2c command, in particular, isn't perfect as it doesn't open up the class within the frameset, with the correct package frame set. I tried to do that but I believe I came across a current limitation in YubNub that doesn't allow more than one level of nested commands. The command that should do that is below, but currently throws an error:

http://livedocs.macromedia.com/labs/1/flex/langref/{strReplace -find . -replace / -string %s}.html&.{strReplace -find . -replace / -string {strRight %s {substract {strLength %s} {strFind -find . -reverse true}}}}/class-list.html

Instead, I used the simpler:

http://livedocs.macromedia.com/labs/1/flex/langref/{strReplace -find . -replace / -string %s}.html

Credits

Thanks go out to Jonathan Aquino for building YubNub (in 24 hours, no less, as part of the Rails Day contest) and for telling me about the strReplace command and to Allen Ormond for writing said command (as well as quite a few other core commands!) :)

CVSDude Migration of SourceSecure Accounts Complete

SourceSecure's migration to CVSDude is complete

The migration of user accounts from SourceSecure to CVSDude was successfully completed today.

The SourceSecure web site now forwards to CVSDude and Mark Bathie and his stellar team did an amazing job of moving everyone over without any issues or downtime. If you do notice anything out of place while trying to access your account on CVSDude, please contact support@cvsdude.org or use the CVSDude Forums.

Flex 2 Simple Presentation Application and Source Code

Flex 2 Source Code for Simple Presentation Application by Aral Balkan

Here is the source code for a simple presentation application in Flex 2 that I threw together for my talk on Flex 2 at the London MMUG last week.

The application works by loading in a list of slides from an XML file, wherein each slide has an image and a title declared. It then proceeds to load in the images and presents them, in its default State, in a ViewStack (ala any Powerpoint presentation you've seen.) You can navigate between the slides either by using the NumericStepper control or via the keyboard. Additionally, it has a second State, the Index, which you can navigate to by pressing the "Index" button. The Index Sate shows you a thumbnail view of of all the loaded slides along with their titles. The transitions between slides is a simple cross-fade. If you change the presentation.xml file (eg. to create your own presentations using the application), click the "Refresh" button to reload the data.

See the slide application and view the slides for my London MMUG presentation online.

Download the source code (474kb), including the slide images and the presentation.xml.

Known issues

There are a number of known issues with the application due to bugs in Flex Alpha 1 (this is to be expected in Alpha software and I am confident that all these issues will be fixed in future alpha/beta releases.) I'm planning on covering each of the issues in a separate blog post so that other developers working with Flex Alpha 1 will be aware of the limitations of the current release. For the time being, however, here is a brief list of the known issues with this application, along with the Flex 2 Alpha bugs that they're related to:

  1. When you load the application for the first time, the slides do not show up. This occurs only when testing over the Internet, not on a local machine and is due to a bug with deferred instantiation on the ViewStack component when creationPolicy is set to "queued". Workaround: Refresh the application and the slides will load.
  2. If you refresh the application right after it starts loading, you will get a runtime error ("Load Never Completed"). This is not a bug and this exception will not be thrown by the final release version of the Flash 8.5 player. There is also a chance that the Preloader will catch this error in future releases so that it doesn't bubble up to the browser even when using the release version of the Flash 8.5 Debug Player.
  3. Clicking the application is not enough to give you focus to navigate between slides in the base State using the Left and Right arrow keys. You actually have to click in a component to do so. This is a bug with listening for the KEY_UP event on the Application form.
  4. The application lays itself out correctly only when the window is sized equal to or larger than the initial window size of the browser (FireFox 1.5)
  5. Going to the Index state a second time results in a runtime error. This appears to be a bug in the State handling code in Flex Alpha 1.
  6. The "Return to Slides" button in the Index state is not in a ControlBar in the Panel because there is a bug that prevents a ControlBar in a Panel from displaying when used in a State based on the default state.
  7. If you mouse over the area where the text in the ApplicationControlBar is ("Flex 2 by Aral Balkan (flashant.org)") before the application has fully loaded, you'll get a runtime error due to a bug with the zoom effect trying to kick in before the effect target has fully loaded
  8. The previously-mentioned zoom effect also showcases a bug in the resize code for the ApplicationControlBar, where the background element doesn't scale with the rest of the component.
  9. The current size of the application is quite large (over 300kb). This is because the SWFs generated by Flex 2 in Alpha 1 are currently not optimized. There is actually a note on this in the Known Issues section of the release notes. As I understand it, optimizations will be carried and the final release should create considerably smaller SWFs.

I'll further detail each of the bugs and highlight some of the nifty new functionality in Flex 2 that I'm using in this simple application in future posts. That includes tasty morsels such as Data Binding, States, Custom Item Renderers, Behaviors/Effects and HTTPService; not to mention the many other important new developments, like the vastly improved skinning feature, that I just didn't have time to go into during my presentation.

Flex 2, although currently in alpha, offers a quantum leap in ease of development. Personally, I find that working with Flex 2 makes life fun and I can't wait for the final release version. Of course, you don't have to wait and you can get up to speed with Flex 2 now by attending my Head Start Flex 2 and ActionScript 3 courses in February as part of my Hot Shots Seminar Series.

Arp Pizza Service Modifications for Fluorine: Open Source .Net Remoting

In case you haven't heard yet, there is a new open source remoting product available for .Net called Fluorine (and in case you're wondering, yes, the name is related to Flouride.) It was probably chosen because Flourine is the most chemically reactive of all elements and combines readily with most other elements (an apt analogy for Remoting, if you think about it) -- although it is highly poisonous (no analogy there with Flash Remoting, thankfully, but maybe it's a stab at Microsoft!)

I was happy to see that the Fluorine project is using the Arp PizzaService example and that the .Net back-end for it uses Value Objects (VOs.) There are a couple of changes that you need to make to the Arp PizzaService example (which you can see running at the AMFPHP web site) and these are clearly outlined in the Fluorine documentation.

It's great to finally see an open source Flash Remoting implementation for .Net. Great work!






Bad Behavior has blocked 0 access attempts in the last 7 days.