PureMVC Architects Lounge

Announcements and General Discussion => Public Demos, Tools and Applications => Topic started by: gjastrab on December 05, 2008, 01:12:36



Title: PureMVC AS Code Generator - PureMVCGen
Post by: gjastrab on December 05, 2008, 01:12:36
Hi everyone,

I just released an early version of my ANT-based PureMVC Flex/AS code generator.  It's distributed as a gem on rubyforge and github to make it easier to interact with.  I'll try to write some documentation over the weekend for it, but the tool itself outputs fairly decent instructions.

If you already have ruby and rubygems installed, them simply:

gem install puremvc-gen

or download it directly from rubyforge: http://rubyforge.org/projects/gjastrab/ (http://rubyforge.org/projects/gjastrab/)

The source is up at Github: http://github.com/gjastrab/puremvc-gen/tree/master (http://github.com/gjastrab/puremvc-gen/tree/master) so feel free to check it out and give me some comments.

I'll post a more official announcement on our company's blog (http://blog.smartlogicsolutions.com (http://blog.smartlogicsolutions.com)) in a little bit with some more detailed instructions, but to get started, simply specify a proj.properties file in the directory you want to start a new PureMVC project in

If you type puremvc-gen check it will tell you what this properties file needs to include.  If you've included the correct properties then just type puremvc-gen init and it will create your PureMVC scaffold, including a main MXML file, proper directory structure, Facade, StartupCommand, and a PrepareActorsCommand.

Type puremvc-gen -h to see the other available commands, but to generate the other PureMVC classes:

puremvc-gen new command (defaults to simple)
puremvc-gen new command -m (or --macro)
puremvc-gen new mediator
puremvc-gen new proxy

It currently only generates standard PureMVC code, but it will generate multicore compliant code as well quite soon.

Please check it out and give me some feedback and suggestions.  I'll update the github page soon to include better documentation and a roadmap of planned features.  Thanks!


Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: gjastrab on December 05, 2008, 02:49:05
Just blogged with more detailed instructions and an example:

http://blog.smartlogicsolutions.com/2008/12/05/introducing-puremvcgen-an-ant-based-puremvc-flex-generator/ (http://blog.smartlogicsolutions.com/2008/12/05/introducing-puremvcgen-an-ant-based-puremvc-flex-generator/)


Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: Darshan Sawardekar on December 09, 2008, 07:09:59
Hey Greg,

This looks cool. Looking forward to the multicore version. ;-)

peace,
darshan


Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: gjastrab on December 10, 2008, 10:20:41
Thanks darshan, I'll try to get it in this weekend along w/ moving the events folder out of the core directory, as Cliff suggested to me offline.

I just tried installing this in a windows VM for the first time, and it looks like everything installed correctly, but ANT isn't running or outputing anything.

Has anyone else tried to install it on Windows?


Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: ghostmonk on December 10, 2008, 12:55:55
I've been trying to use this on windows XP and Vista.

I installed ant, got everything up, but have been foiled in actually getting your gem to generate files.

Another guy in the office has had no problem running this on OSX, so we've decided this must be a platform problem.

If you have any input, that would be great.



Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: gjastrab on December 10, 2008, 01:34:18
Thanks for confirming ghostmonk.  It's weird 'cause it correctly told me that ANT wasn't installed when I tried to run it after installing just the generator, but once I installed ANT, nothing gets output.  I'll try to get it figured out ASAP.


Title: Re: PureMVC AS Code Generator - PureMVCGen
Post by: gjastrab on December 18, 2008, 03:36:50
I just pushed the 0.1.1 release of the generator, so it will now properly work on Windows.  I also moved the events directory into the views, as suggested by Cliff.  (There are no generation tasks that do anything with events yet, but that's in the pipeline).

Since I just pushed it isn't showing up yet on rubyforge, but if you run

gem search -r puremvc-gen

once it is listing puremvc-gen (0.1.1, 0.1.0) it will be ready for you to install.

If you've already installed it then run:

gem update puremvc-gem

to update to 0.1.1, otherwise if you just

gem install puremvc-gem

you should get the 0.1.1 version.