Tuesday, June 26, 2007

Free ActionScript3 Code Generation from Violet UML

At IndustryNext, we are in the interesting position of building cutting-edge projects, with cutting-edge tech for somewhat more established companies than your typical web 2.0 startup.

Part of keeping the speed and quality high is leveraging tools for code analysis and code generation to help keep a handle on dynamic language development. (E.g. I wouldn't ban the use of eval in Ruby, but I'd sure as heck want a tool that can tell me where in the codebase it's being used, and why.) In some cases, we're pioneering these methods.

Generating consistent code from models is a step in this direction. (In JavaScript, just guaranteeing consistent variable names can save no small amount of debugging.)

In order to make it easier to play with object models in ActionScript 3, I spent a little time integrating Cay Horstmann's lightweight Violet UML modeling tool with David Holroyd's metaas library for manipulating ActionScript.

The result is VASGen (Violet UML ActionScript 3 Generator) 0.1, an initial release of a free code generation tool that supports generating classes, interfaces, field, properties, methods, and various types of relationships from Violet's Class Diagram editor.

The project page includes details on what works and what doesn't in this release. If you build applications in AS3 and you like UML models, please give it a try and let me know what you think.

13 comments:

Unknown said...

Great iniciative! Seens very useful, i hope i can use it!

Anonymous said...

this is really nice and simple.. i might use it for my students.

Freddie Fisher said...
This comment has been removed by the author.
Freddie Fisher said...

Wonderful program! I've been looking for something like this for ages!

Observation: if you write methodName() anywhere in the Class diagram, the program will give a strange java error when you try to generate AS3. If you have no arguments, leave out the ().

Anonymous said...

Any idea why it wouldn't run on Leopard?

Thanks tons!

Scott

Anonymous said...

Just stumbled across Vasgen. Just what I was looking for: plain, simple to use, as3. Great, thanks.
One suggestion: to generate basic comment (function name and parameters) to stimulate people to document.

Anonymous said...

Wow, this looks really cool! I downloaded and have been messing around with it in stand alone mode on OS X 10.4. All of the visual design seems to work and the Export to -> ActionScript 3 menu item is there, but when I do the export I have no resulting source in my folder. Any ideas?

Anonymous said...

Amazing work. I love it!

Freddie Fisher said...

wonderful program! three issues:

1. interfaces should generate no visibility for their methods - no way to do this currently

2. would be nice if there was an easy way to pan around, rather than having to use the scroll bars. E.g. holding a button and moving the mouse.

3. no way of defining static members or constants.

I hope this is helpful!

Pixel Conspiracy said...

This could be very useful. I just found a couple of serious issues that I can't resolve.

1. You can't move a sub package from one package to another.

2. I changed the base package name of root package and it no longer generates code inside that package. Trying to create a new package and moving all of my previously created packages into it doesn't work. So I'm screwed.

Anonymous said...

Hi,
I have exactly the same problem as Nate,
as3 generation under OSX unfortunately doesn´t work...

Vipin said...

I am not able to download the application.. Do I need to register with Boxstr for downloading? Can I have a direct link for this?

Anonymous said...

burberry polo shirt
ed hardy clothes
Wholesale Handbags
babolat aeropro drive
cheap tennis racquets
cheap jacket
Puma basket
Cheap puma shoes
burbrery polos
ed hardy shirts