July 2005 Archives

From Flash to Flex

| 3 Comments | No TrackBacks

Mark your calendars for August 26th. I'll be giving a presentation in Philadelphia from 7:30-9:30 about making the transition from Flash to Flex. If you're a Flash developer curious about Flex this is for you. Also, if you're new to Flex and want to find out a little bit more, you're welcome to attend as well.

August 26, 2005 - From Flash to Flex

The road to Flex is easier than you might think, especially if you come from a Flash background. In this presentation, Darron will be explaining how he made the shift from Flash to Flex for development and the processes and techniques that he has taken to get there. You'll learn how to use Flex as a client side compiler, how to switch from the Stage to MXML, how Flex simplifies the development model, how to leverage your existing Flash and ActionScript skills, the "quickest" way to port an application from Flash to Flex, and general tips and tricks from his experience along the way. Darron will go all the way from downloading the Flex trial and the open source Eclipse IDE, to getting it installed and compiling your first .mxml file to a .swf. Flex isn't scary, and we invite you to come see how it can positively affect your own development skills and projects.

As always, I'll post the slides and examples for download here once the presentation is over. I'm not sure if it will be recorded, but if it is I'll link to that as well.

The venue is yet to be determined, but given a choice of going out on a Friday night or geeking out with me... well, I hope to see you there!

Big thanks to Rob for setting this up!

Xmi2As - ActionScript 2.0 Code Generator

| 8 Comments | 1 TrackBack

This tool will convert your UML Class Diagrams into ActionScript 2.0 code.

screenshot.jpg

Xmi2As is a pretty simple code generation framework written in Java and licensed under the GPL. Currently it supports ActionScript 2.0 code generation, but is easily extensible for your language of choice.

To add support for generation of a new language, take a look at AS2CodeGenerator.java, and model your MyLanguaugeCodeGenerator.java after it.

Usage is as follows:

Launch the .exe and browse for the .xmi file (exported from your favorite UML modeling program, like ArgoUML). Pick the directory to put the generated classes, and hit generate. You can also use it from the command line: > xmi2as model.xmi output_directory

There is a problem with the GUI on OSX. For some reason my layout code is busted on OSX, but seems to work fine on Windows. This is the first time I've ever had an issue like this with Java SWT. It could be related to the fixed size of the shell, but I don't have a Mac to test on. So... either someone else will need to fix it, or it will probably just always be broken.

However, you can still use the command line version from the Mac as well. Untested since I don't have a Mac, but you should be able to issue a command such as: java -classpath
"./jaxen-core.jar;./jaxen-jdom.jar;./jdom.jar;./saxpath.jar;./swt-
pi.jar;./swt.jar;./xerces.jar;./Xmi2As.jar;./xml-apis.jar"
com.darronschall.xmi2as.Xmi2As model.xmi output_dir

I've tested this against a few class diagrams and all seems to work well, but if you run into anything really weird let me know. There's still a piece of functionality missing, and that's generating all of the import statements for classes and interfaces. For now you'll have to add the imports by hand, but I'll probably fix that when I get a chance. I also want to add a command line switch for generating javadoc comments (currently its turned on, and the only way to turn it off is to recompile the code). I should probably add a switch for the desired output language as well... like, -as for ActionScript.

There are a bunch of "TODO"'s in the code. Thus, this isn't 100% complete but it works pretty well for me. Hopefully you'll find this useful too.

The home page for the project can be found at http://osflash.org/doku.php?id=xmi2as. Many thanks to OSFlash for hosting the SVN repository!

Enjoy!

What does IFBIN mean to you?

| 8 Comments | No TrackBacks

Time.

Today marks the public launch of IFBIN, a new company led by Ted Patrick. IFBIN is a code distribution service that provides example software for learning and reuse. The core focus is two products - Flash by Example, and Flex by Example.

Visit the website to find a beta download for the IFBIN service which provides access to the examples. Currently the download is for Windows users only, but a Mac version is on the way.

The IFBIN service will save you time. How many times has the following happened to you...

You get an idea for something that you don't quite know how to implement. You search online, spend 30 minutes following links that don't pan out, ask around on mailing lists and wait for answers that don't really help at all, but finally stumble upon some code on some website. You download the code and try to use it, but there's no documentation at all. You end up getting syntax errors all over the place, or realized that you needed to download a supporting class that wasn't included but was part of some class library that you search on the internet for but can't find except that when you do find it the installation process is a nightmare, etc, etc, etc.

How much time do you spend finding "solutions" that don't work or that are broken or that can't be extended easily or that don't do anything to help you understand the problem in the first place?

IFBIN is about saving time. It takes one click to install an example. After the automated installation process completes, open up the example, compile it, and see it work. Every time. The examples are well documented so not only do they work out of the box, but you can actually understand what the code is doing.

IFBIN is Great Software Examples by Industry Experts. As Rob stated, the author list reads like a "Who's Who" in the Flash community, of which I'm very excited to be a part of.

The example pool is continuously growing, and we're just starting to build steam. If there's anything you'd be particularly interested in seeing, speak up. Examples can range from code snippets to frameworks to full applications, and nothing is out of bounds.

This is going to be a wild ride.. hang on!

NeoSwiff writes your layout code...

| 13 Comments | 1 TrackBack

Just discovered this one today - NeoSwiff can do automatic resizing / layout of controls whenever the content pane is resized. It's very simple to set up and use. Here's a quick example:

Anchoring example. Resize the window to see some of the buttons expand / resize, and note that some buttons keep their size but change locations. This is all done with Anchoring (and Docking support is there as well, just not demonstrated in this example).

I created this example with SharpDevelop. First, I made a new Windows application and started up a form in design mode. I dragged a few buttons onto the form and set their "Anchor" properties to demonstrate the dynamic layout / resizing of the components. See MSDN for more about Anchoring Controls on Windows Forms.

I took the code from SharpDevelop and pasted it into the standalone NeoSwiff IDE, hit compile, and got a Flash application that looked and behaved exactly like the Windows counterpart created in SharpDevelop.

This is just sick (you know, pimp, killa, swell, whatever). The code is reproduced in its entirety below in the extended entry. Again, mind you, I didn't type any of this code, but rather it was created for me at design time in SharpDevelop, so I don't want to hear any "the code looks ugly" remarks. NeoSwiff compiled it all without issue (other than having to remove the string[] args from the Main entry point).

Have fun with this. Layout / resizing code is the worst thing I had to do in Flash, and it looks like NeoSwiff takes care of it all behind the scenes for you. Rock! \m/

Flash Player 8 Beta: Test your content!

| 3 Comments | No TrackBacks

This has been all over the aggregators lately, but I'm mentioning it again because it's very important.

Macromedia has released a public beta of the next Flash Player, version 8. The beta is intended for developers and content creators to make sure that their existing Flash content runs as expected in the new player version.

While people have been trying to discover / use the new features, and some have succeeded with working demos, let me just reiterate what JD was saying all day yesterday on mailing lists:

New features will be documented when the new authoring tool nears release. Right now the critically important goal is backwards-compatibility testing... that's the thing we've got to be confident of before release to the general public, thanks.

The Player is much harder to update in the hands of the general public than in the hands of developers. Now is the time to make sure all compatibility bugs are found / fixed, before the Player is officially released into the wild. Although, Ted posted a great read about the new update process.

Do your part, download the Flash Player 8 Public Beta and make sure your existing content works as expected. If you find any compatibility bugs, please submit them here: http://www.macromedia.com/go/fp_public_beta_feedback .

Also, if you're looking for a site to test the beta player against, check out Good Experience Games.

Reconnecting

| 6 Comments | No TrackBacks

It's been almost 3 weeks since I've touched a computer. I'm back from Jamaica and now happily married!

So what did I miss while I was gone? A few things I've noticed:

.. and theres probably more I missed as well. Is there anything else I need to know about before resuming my regularly scheduled program?

Oh, and Flash Forward New York is this week. Sadly, I won't be able to attend. After taking off so much time for the wedding / honeymoon, I'm not going to be able to make it out. Maybe next year...

Flex.org - The Directory for Flex

Archives