Topic
  • 2 replies
  • Latest Post - ‏2013-03-23T02:17:09Z by spriet
SystemAdmin
SystemAdmin
6089 Posts

Pinned topic Design of BO

‏2013-01-30T11:18:10Z |
Hi,
I am not sure whether to put this question here or not, but could not thought of better place than this. Apologise for any confusion.

My question is regarding a BO model design in WID.

Now question is - is repeating the same BO ( or referenced by two fields) in a single BO is a bad design or not, in general ?

If this is not clear, let me give an example. I have a customer BO, which has Billing and Correspondence Address. I create Customer with two fields of correspAdd and billAdd, which both refer to same child BO ( Address ). So the question is same, is referring address BO from field CorrsAdd and BillAdd is better of should I have one field (may be an array) with an extra indicator saying this is Billing or this
is Correspondence.

I hope you understand by now.

Looking forward for a response.
Updated on 2013-03-23T02:17:09Z at 2013-03-23T02:17:09Z by spriet
  • SystemAdmin
    SystemAdmin
    6089 Posts

    Re: Design of BO

    ‏2013-02-08T16:01:13Z  
    Hi,

    You can refer address BO for CorrsAdd and BillAdd. It's a good design(I feel it) as you are not creating multiple BO's with same variables.

    Cheers,
    Sachin
  • spriet
    spriet
    58 Posts

    Re: Design of BO

    ‏2013-03-23T02:17:09Z  
    It really depends on the situation. A good example is the typical purchase order xml schema. It has a shipTo and a billTo address and in this case it is 2 local fields (aka local elements) that reference the same USAddress xml schema complex type (aka BO).

    So in general there is nothing wrong with this design. What you want to avoid is duplicating the structure unless there is absolutely a need to do that. Typically that is bad design since it could result in a refactoring nightmare.

    Dave Spriet
    BPM Architect, BPM SWAT