Cairngen 2.0

Thursday, November 15th, 2007

It has been awhile since the release of Cairngen 1.0, and the feedback I have received from the community has been very encouraging. I am happy to have provided a first-of-it’s-kind utility which allows developers to save time when building Flex applications on Adobe Cairngorm. Additionally, many of you have contacted me with some really cool new features that you have added, some of which are now available in this latest release.

Objective
The main objective of Cairngen 2.0 was to address 2 issues which were inherent to Cairngen 1.0. The first being that Event / Command mappings were not automated. In Cairngen 1.0 developers had the ability to generate sequences which consisted of an Event, Command and optional Business Delegate. And although this was very useful as it generated all of the required classes, handled upcasting events and instantiating Business Delegates, developers were still required to implement addCommand() in the FrontController manually. The second issue was that Event types were not generated as uppercase. Event types are static constants therefore they should always be uppercase. This is not required, however it is a best practice. Again developers could easily generate the required Event class but they would have to manually modify the event type to make it uppercase.

These two issues were the main thing preventing Cairngen from full circle code generation and implementation. Cairngen 2.0 addresses these 2 issues by automating the process, thus allowing for even faster development of Cairngorm projects.

So what’s new in Cairngen 2.0?

  • FrontController addCommand automation
    Event / Command mappings via the FrontController are now automated. When generating a sequence (Event, Command, Business Delegate) the FrontController will be modified to implement an additional addCommand for the Event and Command. This is achieved by a simple //todo comment which is uses as a token and replaced when sequences are generated.
  • Event TYPE
    Event type constants are now generated as upper case. Additionally the value of the event type is set to the fully qualified namespace of the event, thus preventing it from possible collisions with other Events.
  • User prompted before deleting
    You will now be prompted prior to deleting directories in Cairngen 2.0. You can override this by setting the new “prompt.on.delete” property to false
  • Class file copyright header
    Developers can add a specific copyright header for each class file generated. When specified the header will be added before the package definition.
  • Remote class VOs
    The ability to generate and register remote classes with a VO is now available
  • Logging
    Developers can toggle between logging the console output. This can be accomplished by setting the “log.output” property to true or false
  • What’s next?
    I don’t know, you tell me? If you have additional features you would like to see added to Cairngen, or if you have extended Cairngen to provide these features, feel free to leave a comment on this page. I am planning on adding some new features in the near future. One of which will be the ability to detect duplicate addCommands.

    I would like to thank the many developers who have contributed to the development of Cairngen 2.0. I am in the process of compiling a list of contributors, at which point I will update the release notes.

    Cairngen is licensed under the MIT License.

    Ant and Ant-contrib are licensed under The Apache Software License

    Download Cairngen 2.0

    { 6 comments to read ... please submit one more! }

    { 1 Pingbacks/Trackbacks }

    1. Eric Feminella: Solutions Architect, Rich Internet Applications » Blog Archive » Cairngen 2.1