Object size and properties.

Object size and properties.

Old forum URL: forums.lhotka.net/forums/t/3806.aspx


Pixel posted on Tuesday, October 30, 2007

Hi,

I have an object that is now approaching 40 properties in size but at any one time only 10 properties are edited on 1 of 4 screens.  Is this an area where it would be best to normalize the behaviour of the object in to 4 seperate objects?

I am a total newbie!!!!

Pixel.

triplea replied on Tuesday, October 30, 2007

If the behaviour of these 4 "sets" of data is different then probably yes. The fact that different properties are edited in different screens suggest you have 4 different use cases so make sure your objects fulfil your use cases correctly.

DavidDilworth replied on Tuesday, October 30, 2007

Good advice.  Here are some issues to consider.

Is each of the 4 screens a single part of a 4 part wizard?  Or are they all separate?

Does each screen model an object that is "valid" when all the data has been entered on that screen?  Or is more data needed to make the object valid?

Do you have a need (i.e. use case) for a "big" object - one that has all 40 properties at the same time?  Perhaps that object is an aggregate of the other 4 individual objects that each have 10 properties.

JoeFallon1 replied on Tuesday, October 30, 2007

If it is a 4 part wizard or Tabbed interface where the user fills out all 40 pieces spread out over 4 screens then it should be a single BO.

If it is 4 separate screens for 4 different reasons then it should probably be 4 BOs.

Joe

 

Copyright (c) Marimer LLC