> don't belong in the model package though, that's where the model belongs, not > data classes
Erhm, then maybe I don't know what a model is :-) Say, I have a list of users. I would create a userList ArrayCollection and stick that into the model (bindable and all that). Now, this ArrayCollection is actually a bunch of User objects. I would therefore put the User class into the model package, and not in the vo package. Are you saying you would call this a UserVO and place it in the vo package? Thanks for the response btw! -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Muzak Sent: 06 August 2009 21:02 To: [email protected] Subject: Re: [flexcoders] cairngorm convention: vo or model? > 1) the class only transfers data to/from a server: postfix "VO" and put it > in the vo folder > > I'm working with someone who does (1) even when the class is never sent > across the wire. That's what I do as well. Doesn't matter if it's meant for transfering data to/from server or not. They certainly don't belong in the model package though, that's where the model belongs, not data classes. If you prefer having a distinction between objects that will be sent to server and those that won't, maybe use a "data" and a "vo" package. > And also: I've read somewhere that VO's should not contain any logic, and > that you should be able to initialise all of its properties via the > constructor. What do you think? VO's usually don't contain any logic but there's no law against it AFAIK :) I never use the constructor to initialize properties. regards, Muzak ----- Original Message ----- From: "Jorge Maiquez" <[email protected]> To: <[email protected]> Sent: Thursday, August 06, 2009 2:07 PM Subject: [flexcoders] cairngorm convention: vo or model? >I have a some doubts about implementing Cairngorm correctly (and I guess MVC > in general). I'm trying to decide where to place some of my data > storing/transferring classes, and I was wondering if anyone has any rules of > thumb for this kind of thing. > > > > These are the guidelines that I have been following until now: > > > > 1) the class only transfers data to/from a server: postfix "VO" and put it > in the vo folder > > 2) the class only stores data for the local application: put it in the model > folder > > 3) the class does both of the above: put it in the model folder (don't > postfix "VO") > > > > I'm working with someone who does (1) even when the class is never sent > across the wire. > > > > What's the "right" way to do this? > > > > And also: I've read somewhere that VO's should not contain any logic, and > that you should be able to initialise all of its properties via the > constructor. What do you think? > > > > TIA! > > -Jorge > > > > ------------------------------------ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links

