First impressions on Crazedcoders cairngorm generator

I finally could have a look at the code generated by the new crazedcoders tool. I was still enable to test it, as the sql file was not available, but the sample files provided are enough to make a first impression.

About the PHP code

As expected, the tool generates a DAO file for each VO. I wish it was a bit commented, to have a better understanding of it, as some methods weren't very legible (IMHO).

One thing that surprised me is that it did not create a service. Instead, the Flex application is supposed to directly call the DAO objects. I'm not really convinced by this approach.

About the Flex code

The tool uses a mini - Framework, with a TypedArrayCollection class which extends ArrayCollection to make it type safe and add a few features. This can be considered as a bit intrusive, but I think it's very clever.

The generated forms are quite impressive too. The use of validators is definitely a must have feature, which I will probably shamelessly add to FCG in the coming builds ! ;)

It also seems to use an intriguing option to cache data.

Now, I should also say that the generated code does not use Business Delegates. I think the users should at least have the choice..

And there's only one command per Value Object , with a big switch statement in the execute and in the result. I'm really not sure about this neither.

That's it for this quick preview-from-guy-who-didn't-actually-test-it.

Overall, I have to say that I was pretty impressed with it. Of course, there is still room for improvement but it's very promising.
I can't wait to test it and check the next builds.

Anonymous on June 06th 2008

Awesome entry, no link?

david_deraedt on June 07th 2008

Uh uh... Sorry for that.
Here's the link to the tool :
http://www.crazedcoders.com/php/codegen.php

And here's a blog post presenting it
http://viconflex.blogspot.com/2007/10/not-another-flex-amfphp-cairngorm....