locked
Layer diagrams and namespaces RRS feed

  • Question

  • Hi guys,

    I'm trying to model namespaces and sub-namespaces in a layer diagram.

    Three namespaces:

    - A
    - A.AB
    - C

    Each namespace sits in its separate layer. The three layers have the following dependencies:

    A.AB -> A because classes in A.AB use classes in A
    A.AB -> C because classes in A.AB also use classes in C

    The validation now reports a missing dependency A -> C, because the A.AB classes are aparently also considered part of the A namespace.

    Is there any way around this and keep the layer referencing the A namespace from including all subnamespaces? I definitely don't want to nest the A and A.AB layers.

    Thanks!

    Cheers,

    Markus

    Wednesday, September 22, 2010 4:13 PM

Answers

  • Hmm, unfortunately that’s currently by design. When you associate a namespace with a layer, it associates all nested namespaces too. Normally, that is what you want. But we found ourselves that sometimes it would be nice to put exceptions – especially in the case where you have tests in a sub-namespace.  The only workaround is to associate all the types directly. I understand that is a pain though.

    -Chris.

    Wednesday, October 6, 2010 10:18 AM

All replies

  • After trying for 10mins, I am still not able to get the question properly. 

    Assume the following: A business logic layer where business entities are listed- order, customer (AB)

    Assume another layer called data access where- commit to database (A) and commit by calling some service or commit to file (C)

    why will A have missing dependency on C. Can you provide with order mgmt or some other realistic example as to what exactly you are trying to achieve.

     

    -Phani

    Monday, September 27, 2010 10:18 AM
  • Hmm, unfortunately that’s currently by design. When you associate a namespace with a layer, it associates all nested namespaces too. Normally, that is what you want. But we found ourselves that sometimes it would be nice to put exceptions – especially in the case where you have tests in a sub-namespace.  The only workaround is to associate all the types directly. I understand that is a pain though.

    -Chris.

    Wednesday, October 6, 2010 10:18 AM