• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

Communication between modules using cairngorm

New Here ,
May 29, 2011 May 29, 2011

Copy link to clipboard

Copied

Hi all,

I'm looking for the best practice of communication between modules using cairngorm.

I read the document which offers three ways (http://livedocs.adobe.com/flex/3/html/help.html?content=modular_7.html😞

1. Using query string

2. Using interfaces   

3. Accessing through parent

However, I am using componentized approach (http://sourceforge.net/adobe/cairngorm/wiki/ApplyingthePresentationModel-ComponentizedvsHierarchical...)

for the presentation model. Meaning I want to use presentor to handle all data passing between modules, and have a presentor which is a part of a module to handle the data passing in the different views of the module.

I am getting a bit confused with the structure when building the app. The main application component is being injected with all the modules and the application presentor.

Do you have a suggestion of a correct structure?

Thanks alot!


Assaf

TOPICS
Cairngorm

Views

2.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2011 May 30, 2011

Copy link to clipboard

Copied

interface is the best choice

-> Akshar Kaul <-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2011 May 30, 2011

Copy link to clipboard

Copied

Can you explain why?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 30, 2011 May 30, 2011

Copy link to clipboard

Copied

LATEST

because when you are using interfaces you can check whether the component is

type of that interface. if it is then you can simply type cast it and call

any method you have defined in interface knowing that it wont crash at

runtime.

but in accessing through parent you dont have this control... your

application can crash at runtime if you call some non existing function.

query string a bit too cumbersome to do and if you change something in the

component you have to make changes in every place.

-> Akshar Kaul <-

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines