Flex Pasta » Try Penne, have more fun adding new features!

Try Penne, have more fun adding new features!

I ponder a simple Cairngorm vs. Penne example. I want to add on to the Italian Store(find the code under Introducing The Penne Framework). I want to add a feature to the application to allow the user to delete a pasta type.

Using Cairngorm:

  1. Add a trash can to the datagrid.
  2. Add a new class DeletePastaTypeEvent.
  3. Implement the clone method with the deleted pasta type as payload. Create a static variable for the event type making sure the “type string” hasn’t been used anywhere else.
  4. Invoke the event from the trash can click handler.
  5. Add a new DeletePastaTypeCommand.
  6. Add a new method “deletePastaType()” in the PastaTypeDelegate Class.
  7. Add a line in FrontController mapping the DeletePastaTypeEvent to the DeletePastaTypeCommand.
  8. Fill in all the execute, result, fault methods in DeletePastaTypeCommand with the cookie cutter code.

Eight steps, which doesn’t even include having to add or change a model locator.

Using Penne:

  1. Add a trash can to the datagrid.
  2. Add a new method “deletePastaType()” in the IPastaRemoteRq, implementing it in PastaRemoteRq.
  3. Add a new method “deletePastaType(pastaTypes:ArrayCollection)” in the IPastaRemoteRs, implementing it in PastaRemoteRs.
  4. Invoke the request method from the trash can click handler.

Twice as many steps in Cairngorm vs Penne. Penne also required no class creation, vs two with Cairngorm. When looking at my datagrid in Penne, I can click right through to the deletePastaType and see what is happening. With Cairngorm, I have to dig up another file, DeletePastaTypeCommand.

I welcome your comments and feedback.

3 Comments

  • 1. Madhu replies at 11th July 2008, 3:15 pm :

    Thank you for the nice analysis of Cairngorm framework. I agree with you 100%.

  • 2. Stefan Horochovec replies at 24th July 2008, 6:22 am :

    Hello

    I dont find the website for penne framework and your documentation… the Penne have a website? Thanks

  • 3. Brian Telintelo replies at 26th July 2008, 3:23 pm :

    Nope, this is it. Penne is new and all the documentation is here. I recommend downloading the example application and going from there. More documentation to come, but it takes time.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>