tag:robotlegs.tenderapp.com,2009-10-18:/discussions/problems/323-the-role-of-a-modelRobotlegs: Discussion 2012-01-16T15:27:28Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-05-23T22:30:58Z2011-05-23T22:30:59ZThe role of a model<div><p>Maaten,<br>
I am not really the most qualified to answer your question, however
it would seem to me on your 1st question, you could use multiple
models if a single model were to get to large, break it down for
readability reason. Though, from your explanation it seems you have
a VO with only two properties, unless you have a lot of pages or
copy/text data I would just create a single model and a set of
properties that each reference your VO.<br>
e.g.<br>
private var pageOne:copyVO;<br>
private var pageTwo:copyVO;</p>
<p>and so on.</p>
<p>Sorry, but I don't know enough about RL to comment on your
second question. Hope I was of some help.</p></div>Joetag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-05-24T10:20:34Z2011-05-24T10:20:35ZThe role of a model<div><p>exactly what I was thinking. For me it looks a bit stupid to
create a copy model for each page. I think this would cause too
much overhead. One model that stores all copyVO's for the entire
application is also easier to manage.</p>
<p>Maarten</p></div>Maartentag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-05-24T10:47:39Z2011-05-24T10:47:39ZThe role of a model<div><p>I'd use one model too.</p>
<p>Then, for your second question:<br>
Well, everything in an application is data obviously. Unless you
have very good reasons to be storing references to display objects
in a model, I wouldn't do it. I could imagine this to be the case
in some kind of graphics editing application (and even in that
case, I'm not sure it would be necessary), but otherwise ...?<br>
Models are basically for data storage, manipulation and sharing.
It's not as if <em>all</em> data needs to be put into a model.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-05-30T07:53:33Z2011-05-30T07:53:36ZThe role of a model<div><p>Ok, in that case, I'm doing it right. At the moment, I'm not
storing any references to views in my models. Each mediator/view is
completely independent, so that's the way to it. The thing is that
I thought it might be usefull to centralize all references to
pages(views) in my application model.</p></div>Maartentag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-06-02T22:29:58Z2011-06-02T22:29:58ZThe role of a model<div><p>If you really want a model for each view, this is not unheard of
when using a Presentation Model pattern. Joel put together this
kick-ass demo application that uses presentation models. Not only
that but he only uses signals...no events! It is my new favorite
Flex example app.</p>
<p><a href=
"http://joelhooks.com/2010/01/16/robotlegs-image-gallery-example-using-as3-signals-and-the-presentation-model/">
http://joelhooks.com/2010/01/16/robotlegs-image-gallery-example-usi...</a></p></div>Tony Smithtag:robotlegs.tenderapp.com,2009-10-18:Comment/73921092011-11-02T15:27:58Z2011-11-02T15:27:58ZThe role of a model<div><p>Hi Maarten,<br>
If you want to continue this discussion, feel free to reopen it.
I’m closing the thread now.<br>
Please open new threads for new issues.<br>
Thank you.<br>
Ondina</p></div>Ondina D.F.