Blog

  • Firefly: Lego Serenity

    This bloke named Chris Doyle made the spaceship named Serenity from the sci-fi TV show Firefly out of Legos. It was also made into a movie named Serenity. He made the cast, has it light up, and even created wallpapers. I love the interweb.

    Via her majesty.

  • Simultaneous Fork

    I am developing in ActionScript 2 and ActionScript 3 at the same time. I decided to branch the project when I got a stable build. However, upon finding a bug during conversion (Flex Builder 2 rules), I had to document the change (quick note in Notepad) and go back and fix it in the AS2 codebase.

    Upon a 4 hour development stint in the AS2 codebase, I found 3 bugs and fixed them in 3 different classes. I forgot to document them. Now, I’m contemplating the best way to handle a forked build in the allotted timeframe.

    It seems the best thing to do is get the AS2 codebase to a working point, freeze it, and then start converting the existing AS2 codebase from that point forward to AS3. The mantra “garbage in, garbage out” seems to come into play here. Starting with an already flawed codebase seems a guarenteed failure scenario. I’ve read about a successful venture using the Subversion branch feature. They had to fork the build since they wanted to try something else, found out it wasn’t such a good idea, and removed the build without affecting the main codebase.

    The key now becomes being able to successfully do a time estimate so you know when you have to freeze so you allot yourself enough time to convert the code base, test, and get it to a freezing point as well.

    Anyone had experience writing in dual-languages for the same codebase before? How did you handle it?

  • Flex 2 Beta 1: The 411

    Adobe has released the Flex 2 Beta 1 at the labs. What is Flex 2? Just read the first paragraph if you’re in a hurry.

    The big news is that the Flex SDK will include the Flex Framework 2 and the command line compiler (compc) + documentation for free with no licensing or extra charges to develop and deploy applications.

    So what’s new & cool and what’s changed from Alpha to Beta? You can find out on the labs, but I’ll go into more detail here.

    Flex Enterprise Services 2

    Flex Enterprise Services 2 is basically a Remote Shared Object server. Yes, there are other hooks for connecting to various back-ends with the goal of getting the server pushing data to clients, but to me, it’s a bigger deal. For years I’ve been in love with Flash Communication Server, now called Flash Media Server 2, because of it’s Remote Shared Object. Basically, an RSO is an object that has it’s data synced amongst n-clients in real-time. You don’t have to write sync code, you merely get events when it’s updated, and any client can update the object. This is awesome.

    However, Flash Media Server, a.k.a. Flashcom, had a lot of feature baggage involved with creating licenses. The majority of the apps I wanted to create had absolutely nothing to do with real-time video and audio conferencing, thus paying for those features seemed dumb. XMLSocket and Jabber are alternatives, but I hate parsing XML, even if it’s abstracted in a library. I like it low-level, simple, and fast. Flex abstracts this into 1 tag. Sick! Even cooler is the ability to use it free of charge for a limited amount of users on a non-clustered server. YUM!

    So, I like to think of FMS as Video + Audio server whereas FES is a Remote Shared Object server. My future’s more clear. I know what I’m talking about at MXDU 2007. Let’s hope Influxis.com (or MediaTemple.net) implements this into their product plans. I’d be willing to pay more since this is exactly what I want and need for projects.

    Flex Framework 2

    The ultimate component set has some new features you can now utilize in the beta. The inline MXML item renderers is basically an easier way to do cellrenderers. Instead of having to create a class and associate with your List or DataGrid, you can now build it inline, meaning pure MXML. A lot cleaner, a lot more centralized, and less dependencies. You can even define an <mx:Script> tag in there to support methods if need be. Dig it.

    The layouts for Application and Panel now support the big 3; absolute, vertical, and horizontal. Typically in the past, you’d nest a VBox, HBox, or a Canvas in there to do your layout. Now it’s just a property of the containers which results in less tags, better performance of your app, and faster to design.

    Also, you can now make Ghost Children; basically CSS’ visible:none. For Containers, you can now designate children as Ghosts, and they won’t be included in the layout. This makes them tons more flexible since sometimes you want things in a component, but don’t want to be forced to have it included in the layout routines.

    Flex Builder 2

    You can now treat projects, MXML and ActionScript, as SWC resources. SWC’s are to Flex as JAR’s are to Java. Basically, you can treat your project as 1 big SWC, and all resources, classes, etc. are packaged up into an SWC; a zip file that other projects can then use. This helps when development components and utility classes because it greatly reduces the amount of folders and files in your project, and for larger projects, keeps things modular, more organized. You can now just link to the SWC as a project library. It’s supported for Remote Shared Libraries too, but in my opinion, the infrastructure to keep them organized for large projects isn’t there… yet.

    I’ve already talked about the View Source built-in, which is my favorite addition.

    The code hinting has gotten tons better. If you type in a class, and it’s not imported, it’ll automatically add the import up top. Additionally, when writing nested MXML tags, it’ll only show the tags that are associated with that component you are currently in which helps a ton if you’ve forgotten the property name, and quickly types it for you.

    We also now have the HTML template source in our projects to control the HTML wrapper that our SWF’s are embedded in. The good news is HistoryManager is included in this, but you can also tweak if need be.

    The Help is really nice. If you select something, and hit F1, the Help tab will open and show topics for what you highlighted. If you keep it open, and highlight other stuff, it’ll re-search. Don’t forget to highlight the WHOLE classpath; meaning, highligh flash.events.Event instead of just Event.

    ActionScript 3

    There is the Void to void which I mentioned yesterday. It’s merely a find and replace to change those, although, getting out of habit typing uppercase is hard… 3 years of habit isn’t undone in 1 day.

    Object can no longer store undefined, but it can store null. As such a new type, no type, called “*” is introduced. This also has the benefit of telling the compiler, “Yes, I untyped it for a reason, bro, trust me.” So:

    private var v:*;
    
    public function f(p:*):*
    {
            ...
    }

    Is the same as:

    private var v;
    
    public function f(p)
    {
            ...
    }

    Only the compiler will leave you alone for the first one.

    The coercion rules are a little weird, so I’ll defer to the docs for those who care.

    Event’s have been cleaned up; there are no “Type” classes. Meaning, EventType is gone, and everything is in Event, like Event.COMPLETE for example. Same goes for KeyboardEvent, and MouseEvent, etc. It’s easier to just delete the Type imports up top in your class, then do a find and replace; pretty quick.

    Effects now use play and end vs. playEffect and endEffect… less to type! Additionally, they now support pausing, reversing, and resuming. Hell to the yeah.

    Conclusion

    That’s the good stuff. Yes, ColdFusion now supports ValueObjects, and the Charting Components are there, too. We still need a simplier framework or set of ANT scripts for RSL’s, but I’m still learning all the ramifications and specifications that go into it, so hopefully either someone will blog a solution soon, or it’ll be in the next beta. For a full list of changes, check the docs and the labs site.

    BTW, this is where the Flash Platform shows it is a more innovative and useful model vs. AJAX. When new features are released, getting the public to upgrade their Flash Players to the latest version to take advantage of those features happens light years quicker and easier than getting those same customers to upgrade their browser(s). Some numbers to corraborate.

    Other bloggers with converage:

  • Flex 2: View Source

    Coolest feature ever! My favorite new feature from the Flex Beta 1. With the press of your button, you’re Flex projects are setup to be viewed in the web browser with a pakcaged zip file linked. Your actual Flex application will have View Source in the right click menu. You just press a frikin’ button and that’s it!!!

    While the Flash community has already been a very open community with sharing code, I think this will have a major positive impact on newcomers from other disciplines. If you make it easy and brainless, people will share.

    Because of the extra directories Subversion adds (.svn) it may take awhile to run for those types of projects; beware.

    For both Source links below which illustrate the link (you can right click and View Source on the first link), drag the black divider to the right so you can see the veritcal scrollbar and see more code. Apparently the SWF refreshes too late to show the veritcal scrollbar.

    You’ll need the Flash Player 8.5 to view the below.

    For those who don’t, here are some screenshots:
    Source 1 | Source 2

    My Eberron D&D Character Creator sample app I work on to test out Flex 2’s features is here. Right click and View Source after you click the App link!!! (MXML + AS + CSS):

    App | Source

    The Diesel + Battlefield ActionScript 3 blitting engine project is here (You can’t right click and View Source on this one, not sure why yet):

    Source