To single model class or more?

Alan's Avatar

Alan

21 Apr, 2011 09:38 AM

My demo application handler data object include: dropTextVO(store for drop data), settingVO(hash, last to store in sqlite),reportVO,queueVO...
So Is best to make a each value object separate in each model .or just like the dropModel, settingModel... or just One ApplictionModel?
now is using single model , its really feel bad... the geter and seter ... make the model class more than 500 lines...

  1. Support Staff 1 Posted by creynders on 21 Apr, 2011 10:07 AM

    creynders's Avatar

    Certainly not a single model.
    There's not a clear-cut answer to your question, it all depends on the data, the relation between the types of data and what you need to do with it.
    In general though there's not necessarily a 1-to-1 relationship between your VO's and your models. Meaning that data from one VO can go to different models, or a model can receive data (through a command, of course) from various VO's.

  2. 2 Posted by Alan on 21 Apr, 2011 11:32 PM

    Alan's Avatar

    I through over the examples in RL, It's seems all design in (1(model) to more(VO))

    M depends on the data.
    V
    C
    S
    aha, this 'questionVO' is not relate to RL, but on the data, as you sad ,since I lost the basic principle.

    Thanks RL
    Thanks creynders.

  3. 3 Posted by Alan on 21 Apr, 2011 11:43 PM

    Alan's Avatar

    Now. dropTextVO,reportVO,queueVO I through commands in event dispatch
    and three model
    settingModel(a db table)
    CommentModel(a db table)
    UserModel(a db table)

  4. Stray closed this discussion on 25 May, 2011 08:30 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac