Arc90, Inc. - Now Providing Soundtrack Services | Home | On Programmers, Programming Languages, and Frameworks

Filed under Lab on October 8, 2007 by Andy Lewisohn

Introducing: Modular

I'm a big fan of Cairngorm, I use it extensively in my projects and have always been happy with the results. That was until I tried getting it to work with Modules. All of a sudden, Cairngorm didn't seem so hot. Not one to just let go of a tried and true architecture, I decided to come up with a solution. There's been quite a bit of talk already on this subject, and my answer is based on some of what I found. It's over in the lab, check it out: Modular.

Post a Comment Digg Del.icio.us

Trackback Pings (TrackBack URL for this entry)

http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/86.

Comments

good looking Andy,

It was was cool how you rolled in the eventSequencing into the dispatcher, dope..

I've just got to the stage where after having reverted from Modules to the monolithic app, i now have to roll back to modules, so i'll definitely be making use of your work.

Your work is a good start.

From memory there are still a few areas to address.

I think you need a Module wrapper, like CairngormModule.
It should facilitate unloading, passing data between ModelLocators and bindings.

Since the recent changes to Modules and the support from Alex Harai on a few key issues I believe that making Cairngorm and Modules work is definitely be possible.

Bjorn

Posted on October 10, 2007 7:52 PM by Bjorn

Hey Andy,

Check out the Event Sequencing in the Prana framework svn.
http://www.herrodius.com/blog/?p=81

Bjorn

Posted on October 10, 2007 9:00 PM by Bjorn

looks promising. I'm not that experienced in using Modules and Cairngorm so I was wondering how the situation with loading a cairngorm enabled module in a cairngorm enabled application ends up. They share the controller ? They share modellocator ? Or can I use a different FrontController and ModelLocator in both the module and application ?

thanks,
Dennis

Posted on October 24, 2007 9:56 AM by Dennis

allright. After some digging into it looks like only the Modules need their classes derived from Modular right ? getAssociatedFactory will never keep returning null for the shell application if I understand it correct...


anyone able to confirm this ?

Posted on October 25, 2007 11:53 AM by Dennis

Dennis,

That's right. Only the modules need to use Modular. Your parent application just uses the regular Cairngorm library. My modules have their own front controller and their own models.

-Andy

Posted on October 25, 2007 12:01 PM by Andy Lewisohn

Hi Andy,

thanks for the confirmation. It works great now. I was wondering how you are dealing with parent-module communication. Do you use Cairngorm for that ?

Dennis

Posted on December 20, 2007 4:53 AM by Dennis

Thanks for pointing me to this valuable resource.

Posted on January 20, 2008 1:26 AM by foreclosure solutions

This is great, I really hope to be able to use it, does any one have an example or tutorial on how to use this.

Posted on March 13, 2008 5:27 PM by rmunix

any updates on this or examples? Not that I don't want to experiment, but examples never hurt :)

Good work!

Posted on March 20, 2008 6:08 PM by John Wilker

This does NOT work with multiple instances of the same module.
ModuleManager.getAssociatedFactory(obj).name returns the same name for the same module factory

You still need to pass a unique id to each of your module, and create new instances of CairngormEventDispatcher accordingly

Posted on March 23, 2008 8:02 PM by Vu

Post a Comment:

Arc90, Inc. - Now Providing Soundtrack Services | Main | On Programmers, Programming Languages, and Frameworks