Cairngorm Plugin Sneak Peek

This is very much work in progress, but I thought it was about time I shared my work on the Cairngorm Plugin. At the very least this blog post is intended to give myself a kick to get it finished! I would like to release a Beta version in the next couple of months.

The intention of the first release is to focus on the Front Controller and simplify the addition of new CairngormEvents and their corresponding Commands.

In the mean time I would like to provide some detail on what I have done so far and describe some of my ideas. In the whole the plugin is complete, I have all the moving parts, I just need to bring them together.

Cairngorm Nature

So the basic idea is you will be able to add the Cairngorm Nature to your Flex/AIR project:CairngormNature.pngWhen you add the nature (and I haven’t done this bit yet) you will be able to configure the preferences for you Cairngorm project and it will create the basic Cairngorm project structure. At some later stage I may add a Cairngorm project wizard that will just do it all on project creation.

Cairngorm Preferences

The pattern of maintaining Java or Flex SDKs under your workspace preferences should be a familiar one. The Cairngorm Preferences (which is complete) follows this pattern. It allows you to have multiple versions of Cairngorm configured under your preferences:CairngormPrefernces.pngThe intention is the Cairngorm distribution will not only provide the Cairngorm.swc, but include the codegen templates. This way we won’t need to update the plugin every time Cairngorm changes and it will also give you relative freedom to change the templates if you don’t like my code style 🙂

Project Properties

Every project will have its own Cairngorm Properties (which is complete). This will associate the project with the required Cairngorm installation so it can access the codegen templates. It will also allow you to configure the default packages for events and commands:ProjectProperties.png

New Class Wizards

The Cairngorm Plugin will provide a few new Class wizards for codegen, this will include a Cairngorm Command, Cairngorm Event, Cairngorm Controller:NewWizards.png

New Cairngorm Command

The New Cairngorm Command wizard (which requires some refactoring) will allow you to create a new Cairngorm Command and Cairngorm Event, which will be added to your selected Front Controller:Command.png

New Cairngorm Event

This is exactly the same as the Cairngorm Command wizard.

New Cairngorm Controller

The new Cairngorm Controller wizard (which requires some refactoring) will allow you to add a new Front Controller. Sorry no screen shot at the moment as it is currently broken.

Summary

I have a bunch of ideas floating around in my head and I would love to hear your ideas. My intention is to get the Beta version out and then form a team around the plugin on opensource.adobe.com to take it forward, at this point I hope to publish a roadmap. So now I have said there is going to be a Cairngorm Plugin I just need to get it finished!

8 Responses to Cairngorm Plugin Sneak Peek

  1. Nick Collins says:

    Have you see Luis Lejter’s Enterprise IDE plugin? Right now it’s primary focus is Cairngorm generation, so it has a lot of these features and more. You can look at it here http://www.idefactory.com/content/?page_id=9 .

  2. This is great news, Peter !Do you plan to provide server side (Java, PHP, .NET,… you name it) code parser to automatically generate the corresponding cairngorm classes ? If the plugin is about productivity, I think this feature is essential.Also, how open will the plug in be, in terms of extensibility? I’m not familiar with eclipse plugin development so I guess this question might not be very relevant…

  3. Peter Martin says:

    Hi Nick,Yes I am aware of Luis’s plugin, but I have not looked at in any detail.CheersPeter.

  4. Peter Martin says:

    Hi David,No ideas around the server side as yet, but I will definitely consider your suggestion.My only thoughts around extensibility at this time is code templates. If there is the opportunity to make anything else extensible I will take a look. Eclipse does provide the necessary hooks.CheersPeter.

  5. espen says:

    Have you considered using meta data for configuring commands to respond to CG events? Similar to how it’s done in Spring MVC. This would remove the need for the configuration of the command/event in the front controller.With the plug-in all that’s required would a compiler argument isn’t that right?

  6. Leif Wells says:

    Have you thought about shortening the user’s process by creating an Event and then having the Command generated automatically based upon that Event? I mean, generally speaking, if I create an Cairngorm Event, there is going to be a Command that needs creating as well. Having this process as one step (or perhaps using the Next and Finish buttons to move through the process would be nice.Thanks for the preview.LeifAtlanta

  7. Peter Martin says:

    Hi Leif,The intention is you can create a Command and an Event in a single step, which will be added to the Controller.CheersPeter.

  8. Peter Martin says:

    I have looked at metadata (Ely Greenfield’s blog shows an example), but not in the context you suggested. I generally like the idea, but I am slightly hesitant about having to add a compiler argument.However, the intention in the first instance is to support Caingorm as is and then build it out from there, so yes it could be a possibility for the future.