Results 1 to 3 of 3

Thread: What is this diagram?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    What is this diagram?




    The above is an extract of a diagram I have (not made by me!)

    But to those of you who understand, what does it show in terms of classes and interfaces and what derives from what and from which interfaces?

    I want to hear your thoughts. This is potentially for a WCF contract. My thinking is that the contract will be the interface (IProductMessage)

    it doesnt matter what this is trying to represent in terms of "real life" but just want to know what you think about the classes and structure and if it makes sense to you and if so, what it is.


    Also, for data coming in to the WCF contract, how would it be possible to determine the concrete type of class from the above, if we are getting the IProductMessage? I guess there would be some internal logic to determine based on the "ProductHeader" perhaps on what type of class it is?

    Anyway - your thoughts!

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  2. #2
    Frenzied Member TheBigB's Avatar
    Join Date
    Mar 2006
    Location
    *Stack Trace*
    Posts
    1,511

    Re: What is this diagram?

    Howdy,
    This seems to be a class diagram (made in paint *cries*). Where the point of focus lies, is the IProductMessage. The lines without arrows seem to be indicating a 'using'-relation where the lines with arrows would be 'implements/extends'-relations. So every class with arrows coming from it in this diagram, implement the IProductMessage interface. And for example the InputProductReportMessage extends the abstract ProductReportBase class.

    I can't tell you how you will be able to use these classes from the diagram just by looking at it. I haven't worked with WCF yet, so I'm clueless here, but perhaps somebody else has.

    Quote Originally Posted by Techno View Post
    Also, for data coming in to the WCF contract, how would it be possible to determine the concrete type of class from the above, if we are getting the IProductMessage? I guess there would be some internal logic to determine based on the "ProductHeader" perhaps on what type of class it is?
    To test for the given object's type or the type of one of it's ancestors you can use this:
    Code:
    if(msg is AlarmMessage)
    Last edited by TheBigB; May 4th, 2012 at 01:03 PM.
    Delete it. They just clutter threads anyway.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    Re: What is this diagram?

    true, there is that way of doing it too...

    thanks! it helped

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width