I've finally got a handle on Cairngorm, but I'm now stuck in the position of how do I reuse code between Cairngorm apps?

We need to maintain at least three different applications that should share the majority of their codebase:

+ Application 
   + Main code base
      +....
   + App1
      +business
      +...
   + App2
      +business
      +...
   + App3
      +business
      +...

What I found was that when I went in to point App 2's Delegate to a new datasource, I then had to go up to it's Command and move that to the new app, then move the controller, etc, until App2 was a complete copy of the original code base, pointing to new, concrete classes!

In traditional MVC, you can swap out the controller and such at runtime. However, I don't see that happening in Cairngorm. Everything points to concrete implementations, all the way from the View pointing to a Model for binding, to your controller calling specific Commands.

Now, I can imagine how I might hack this to get the appropriate behavior, but I'd like to know what the more experienced folk here have done? Do I simply have one monster Controller and Model that handles all?

Scott


On 2/1/06, Steven Webster <[EMAIL PROTECTED]> wrote:
Beck,

I'd err towards Scenario 2 that you described; that's what has worked
for us typically.  I'm not sure what you mean by "Use Case" in your
case, but that would be a pretty high-level of granularity for me. 

I'd probably have a single controller, and I'd have a single
ModelLocator but introduce extra hierarchy into the commands, business
and VO packages as needs be.

However, to be honest ... This isn't the kind of thing I'd advocate as
"it must be done this way".  Common sense is that your source should be
easy to navigate, easy to reuse, maintainable - and if you're achieving
those goals, you're winning IMHO.

For me, this is one of those academic debates where the debate is lifted
as soon as it's a real-world implementation and we can make informed
common-sense decisions.

So - your approach(es) look good to me.

Help ?

Steven

--
Steven Webster
Practice Director (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6108
m: +44 (0) 7917 428 947
[EMAIL PROTECTED]




> -----Original Message-----
> From: flexcoders@yahoogroups.com
> [mailto:flexcoders@yahoogroups.com] On Behalf Of Beck Novaes
> Sent: 01 February 2006 13:14
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Cairngorm Folder Structure
>
> What do you think is the best way to structure folders in a
> big Cairngorm Application?


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--

: : ) Scott


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to