Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: First release of fabricator gem, feedback please! (new version/update)  (Read 5859 times)
Steffen Egelund Jensen
Newbie
*
Posts: 7


View Profile Email
« on: March 03, 2009, 04:34:26 »

Hi Darshan et all

I have been working on and off on the fabrication generator last week and is now able to generate the first scaffold fabrication app with two modules. As mentioned most of the code is based on the simple routing demo. The generator creates two modules: an authentication module and a dashboard module both compiled as swfs and loaded when needed.

It is still in a rather early state but I thought it would be a good idea to release it now so that I can avoid moving in a wrong direction.

As a remark I have solved the problems with custom proxy, command, mediator, package etc that Jason suggested. But this feature will first be included in a future release.

The source is hosted at github -> http://github.com/sejensen/fabricator/tree/master
And the ruby gem is released at rubyforge -> http://rubyforge.org/projects/pure-fab-gen/
(It took some time to get the project approved, but by using rubyforge everyone can easily install the gem)

Usage instructions: (this is on mac with osx 10.5, assumes that ruby and rubygems are installed)
install gem: sudo gem install fabricator (currently version 0.0.5)
generate app: pureapp  AppName org.my.custom.package 'app title'
import project in flex builder as flex project: run AppNameShell.mxml

To create module codestructure
cd AppName
Run ruby script/generate pure_module ModuleName

example ruby script/generate pure_module Address -> results in AddressModule.mxml plus generated code for the new module. You have to overwrite the files when asked this is required to be able to genrate all the modules you want and still get all of them build etc.

Disclaimer for now the module is not included in the app, Since I am currently refactoring mediator and container code. but I thought being able to generate the skeleton and classes was a good start and the new module gets compiled as seperate swf.

That should be it! Hope to get some feedback, also on the currently generated code which is a little sparse. And if anyone have an idea of a more complex general app to generate that would be great?.

Enjoy  ;)
/Steffen
P.S. I hope the name fabricator is okay?



« Last Edit: March 05, 2009, 03:23:09 by Steffen Egelund Jensen » Logged
Jason MacDonald
Sr. Member
****
Posts: 243


View Profile Email
« Reply #1 on: March 03, 2009, 06:55:56 »

Cool! I'll try to play with it when I get a few spare mins.
Logged
Darshan Sawardekar
Sr. Member
****
Posts: 85


View Profile Email
« Reply #2 on: March 04, 2009, 10:45:48 »

Hey Steffen,

I tried the gem and got everything to compile properly. Great job, this is going to really speed up my development process. And I have no problem with you/anyone using fabricator or fabrication in the name.

I had a few issues with getting the gem install. I was getting errors like
:
...rubygems.rb:578:in `report_activate_error': Could not find RubyGem newgem (>= 1.2.3) (Gem::LoadError)

I tried updating newgem which seemed to have problem with a similar error but for the cucumber gem instead, etc.
:
...rubygems.rb:578:in `report_activate_error': Could not find RubyGem cucumber (>= 0.1.8) (Gem::LoadError)

What finally worked for me,
:
gem update rails (to get the newer version of active support which was reported by cucumber)
gem install newgem
gem install cucumber
gem install fabricator

I think there are some dependencies issues with the gem install. But after that I got the pureapp command working fine. Looking forward to the items on your todo list. ;-)

peace,
darshan
Logged
Steffen Egelund Jensen
Newbie
*
Posts: 7


View Profile Email
« Reply #3 on: March 05, 2009, 01:50:23 »

What finally worked for me,
:
gem update rails (to get the newer version of active support which was reported by cucumber)
gem install newgem
gem install cucumber
gem install fabricator

I think there are some dependencies issues with the gem install. But after that I got the pureapp command working fine. Looking forward to the items on your todo list. ;-)

Hi Darshan

Thank you for your reply. I am in the process of finishing the module component generator and hope to release it soon but are going on vacation to London this weekend and have to work on a project with a deadline  :(.

My primary concern right now is how to handle loading and presenting the newly generated modules and how to handle switching between them. So if you have any great example code or ideas on how you are doing this in your own projects I would really love to incorporate it in the gem.

My wish is that the gem generated application will include full functional production ready code, where all the user has to do is to fill in the domain specific code. I have talked with our CTO and we would like to include unittest, guitest (flexmonkey?) and coverage meetering for all the generated code. I would also like a branch of the gem that includes a functional backend either rails with the RestfulX framework or a fullblown j2ee stack with BlazeDS or GraniteDS for server push and amf. But of course all this will first be included when the core functionality is good enough.

Sorry about the gem problems!, I will look into how I can manage dependencies.
Normally I just run sudo gem update (to update all gems) when I have problems like this. But newgem and cucumber should of course be installed if they are needed. The gem is also based on the hoe gem so unless newgem handles this dependency This could also give problems.

Kind regards
Steffen
Logged
manuraj.dhanda
Jr. Member
**
Posts: 13


View Profile Email
« Reply #4 on: October 12, 2009, 10:42:13 »

Thanks for this great utility.

I am just starting up with pureMVC and this utility made it en easy start. I am successfully using it for my experimental code.

While I was working with this utility, I had noticed a couple of missing things in code generation.
At first, it generates authentication and dashboard modules successfully, ready to compile.

But after that whenever I add a module using this util, it completely ignores the "shell controller" part. It never generates the code for "LoadXXXModuleCommand.as" and also does not register the command with "XXXShellStartupCommand.as".

Other than that I think NavBar belongs to shell, as it will be holding navigation to all modules(I assume that).

Overall, it's a wonderful job and made it lot easier to learn pureMVC for me.
Thanks for this great job.

Keep it up.

-Manu.
Logged
Pages: [1]
Print