My favorites | Sign in
Project Logo
             
Search
for
Updated Apr 09, 2008 by Thom...@Universalmind.com
CairngormMyths  
Learn about myths and misconceptions of using Cairngorm MVC

Myths and Misconceptions of Cairngorm MVC

  1. Flex already has a framework. I do not need Cairngorm MVC.
  2. Answer:
2) Cairngorm is Flex only.
Answer:
3) Why do I need to consider Cairngorm when I can use my own - better - MVC framework.
Answer:
4) I have to create so many files.
Cairngorm requires many, many classes: events, commands, delegates. Answer:
5) My UI code is polluted with CairngormEventDispatcher.getInstance().dispatchEvent()
Answer:
6) Why do I have to use Delegates?
Answer:
7) I can store all my application data in the ModelLocator
Answer:

Comment by somewh...@gondalba.ch, Jul 07, 2008
  1. Flex already has a framework. I do not need Cairngorm MVC.
Answer: That's right. If you think you wont't need it, you won't need. But I think again.

2) Cairngorm is Flex only.

Answer: That's wrong.
3) Why do I need to consider Cairngorm when I can use my own - better - MVC framework.
Answer: It's open source
4) I have to create so many files.
Cairngorm requires many, many classes: events, commands, delegates. Answer: That's right.
5) My UI code is polluted with CairngormEventDispatcher?.getInstance().dispatchEvent()
Answer: wrap it.
6) Why do I have to use Delegates?
Answer: You don't
7) I can store all my application data in the ModelLocator?
Answer: true
Comment by cecile.feefils, Jul 12, 2008
  1. Flex already has a framework. I do not need Cairngorm MVC.
Answer: If you think you don't need it, so don't use it
2) Cairngorm is Flex only.
Answer: No
3) Why do I need to consider Cairngorm when I can use my own - better - MVC framework.
Answer: If you have better MVC framework , that's cool for you. All the people don't have the time to create a better framework and Cairngorm for them is a good choice.
4) I have to create so many files.
Cairngorm requires many, many classes: events, commands, delegates. Answer: You say that because you're creating the code. Now juste imagine, you have to maintain this same code (that you don't create). You'll be really happy to found code structured in the same way.
5) My UI code is polluted with CairngormEventDispatcher?.getInstance().dispatchEvent()
Answer: call wwf.
6) Why do I have to use Delegates?
Answer: this a Pattern, if you don't like it, don't use it (see 4).
7) I can store all my application data in the ModelLocator?
Answer: You can. Personnaly I have for large application one ApplicationModuleLocator? and many ModuleModelLocator?.
Comment by lukemark...@yahoo.co.uk, Mar 11, 2009
  1. Flex already has a framework. I do not need Cairngorm MVC.
Answer: Its a pattern, it has some shortcomings but its a good pattern and stops developers reinventing the wheel on big projects
2) Cairngorm is Flex only.
Answer: You can use it with flash too.
3) Why do I need to consider Cairngorm when I can use my own - better - MVC framework.
Answer: Sure there are other MVC helper frameworks you might even roll your own, good for you.
4) I have to create so many files.
Answer: You are very lazy, I can do it in my sleep.
5) My UI code is polluted with CairngormEventDispatcher??.getInstance().dispatchEvent()
Answer: new WhateverYourCairngormEventIsCalled?().dispatch(); You dont have to call the singleton every time just make the event dispatch itself.
6) Why do I have to use Delegates?
Answer: Delegates are a logical grouping of the functionality you command might operate, it keeps things neat and tidy if your command must do many different operations, you dont have to use one if you dont want to just create the token and add the command in the execute method.
7) I can store all my application data in the ModelLocator??
Answer: Yes you can, obviously logically laying out your models in the locator helps manage this.
Comment by stan.berka, May 18, 2009
  1. Flex already has a framework. I do not need Cairngorm MVC.
Answer: Cairngorm adds a nice structure, MVC-based, to your app, which otherwise might become unmanageable.
2) Cairngorm is Flex only.
Answer: Not Flex only, not Flash only. GWT app, for example, would benefit from it just as well.
3) Why do I need to consider Cairngorm when I can use my own - better - MVC framework.
Answer: Pure-MVC is another choice. But Cairngorm is supported by Adobe. And both are open source. PureMVC has been ported to all popular platforms, but Cairngorm gets 4x more hits on Google as of today. Choose either and use in your Flex apps.
4) I have to create so many files.
Cairngorm requires many, many classes: events, commands, delegates. Answer: True. But they're simple. There are some eclipse plugins out there to help you, for example Cairngorm Plugin.
5) My UI code is polluted with CairngormEventDispatcher?.getInstance().dispatchEvent()
Answer: event.dispatch() will make the event dispatch itself
6) Why do I have to use Delegates?
Answer: it will save you later time (and hair) to have an extra layer which intermediates btwn. any server interaction and your Flex client
7) I can store all my application data in the ModelLocator?
Answer: true. Unless there is some data that should be private.

Sign in to add a comment
Hosted by Google Code