Hey guys,

I'm just starting with Cairngorm also, and I've never seen this done
specifically, but I don't see any reason you can't have multiple
ModelLocators... they're just singleton classes really.

So, you could for instance have a shared ModelLocator with state that
is shared between apps. Then state specific to a particular app
(client or server) could have their own ML. SO:

com.company.project.shared.model.SHModLoc
com.company.project.admin.model.AModLoc
com.company.project.client.model.CModLoc


what do you all think of this approach?

Thunder


--- In flexcoders@yahoogroups.com, "Douglas Knudsen"
<[EMAIL PROTECTED]> wrote:
>
> righto on that.  Say I have a command GetUserCommand() that returns
a userVO
> for the current user in session.  This is returned to the apps
modellocator,
> has stuff like name, etc, in it.
> 
> so we have
> com.company.project.admin.model.AModLoc
> com.company.project.client.model.CModLoc
> 
> 
> How does GetUserCommand()  stick the userVO result into the proper
model?
> Typically the model is hardcoded in the Command, eh?  What I've done
so far
> is used a generic model so to speak in
> com.company.project.model.GModLocsay.  Then the client app and admin
> app can access it as well as their
> respective model.
> 
> 
> DK
> 
> 
> On 7/27/06, JesterXL <[EMAIL PROTECTED]> wrote:
> >
> >  // Assuming your in your Client Application for example
> > import com.company.project.admin.events.SomeEvent;
> > import com.company.project.client.events.ClientEvent;
> >
> > var e:SomeEvent = new SomeEvent(SomeEvent.EVENT_NAME, false, true);
> > CairngormEventDispatcher.getInstance().dispatchEvent(e);
> >
> > You could do the reverse in the admin.  As a GUI guy, I probably would
> > care more about sharing commonly used View's and utility classes
vs. events
> > and commands that were probably created for their specific
projects, but it
> > could be done.
> >
> > ----- Original Message ----- *From:* Douglas
Knudsen<[EMAIL PROTECTED]>
> > *To:* flexcoders@yahoogroups.com
> > *Sent:* Thursday, July 27, 2006 9:25 AM
> > *Subject:* Re: [flexcoders] Backend/Frontend Application Development
> > (Cairngorm)
> >
> > curious how to share resources with this, say using Cairngorm.  How to
> > share a command that returns data to a modellocator?  How to
return th edata
> > to the current model locator for a sub app?
> >
> > DK
> >
> > On 7/27/06, JesterXL <[EMAIL PROTECTED]> wrote:
> > >
> > > Put 'em in seperate projects, or sub-projects.  Like:
> > >
> > > com.company.project.admin.*
> > > com.company.project.client.
> > >
> > > Or:
> > >
> > > com.company.projectadmin.*
> > > com.company.projectclient.*
> > >
> > > You should take advantage of the fact you may be using similiar
code;
> > > both
> > > of the above in the same Flex project allows you to easily do that.
> > >
> > > ----- Original Message -----
> > > From: "Stefan Schmalhaus" <[EMAIL PROTECTED]>
> > > To: <flexcoders@yahoogroups.com>
> > > Sent: Thursday, July 27, 2006 4:38 AM
> > > Subject: [flexcoders] Backend/Frontend Application Development
> > > (Cairngorm)
> > >
> > >
> > > I'm going to develop a Flex (Cairngorm-based) intranet
application for
> > > training resources. There will be a backend part for user and
content
> > > administration, and there will be a frontend for the end user.
> > >
> > > Both parts, backend and fronted, will presumably share a lot of the
> > > underlying data structure, value objects, views, etc. They will
> > > definitely use the same AMFPHP services. What's the best way to
tackle
> > > this? Should I treat them as two different Flex projects? Or can I
> > > develop them within one Flex project but with two different MXML
> > > application files?
> > >
> > > Your ideas and thoughts are very much appreciated.
> > >
> > > Stefan
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Douglas Knudsen
> > http://www.cubicleman.com
> > this is my signature, like it? 
> >
> 
> 
> 
> -- 
> Douglas Knudsen
> http://www.cubicleman.com
> this is my signature, like it?
>







--
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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to