Solved

Need to learn to read a Class Diagram

Posted on 2010-08-14
10
525 Views
Last Modified: 2013-12-17
I can not read the attached Class Diagram.

Please describe the meaning of the various pointers and inter-relationships.

I am trying to understand View-Model-ViewModel and find it tricky...


Thanks,
newbieweb
ViewModelClassDiagram.png
0
Comment
Question by:newbieweb
  • 6
  • 3
10 Comments
 

Author Comment

by:newbieweb
ID: 33438497
Also, this demo project has a second Class Diagram which might explain the first...

Thanks,
newbieweb
ClassDiagram2.png
0
 
LVL 42

Assisted Solution

by:sedgwick
sedgwick earned 150 total points
ID: 33440119
what exactly u don't understand?
i assume u have object-oriented knowledge which is a fundamental to understand the relationships of the classes here.
i can go through each diagram and describe in words what are the relationships between the classes if u like.
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 350 total points
ID: 33440498
The second one is easier to read, since it is just a simple inheritance chain:

CommandViewModel : ViewModelBase
WorkspaceViewModel : ViewModelBase

CustomerViewModel : WorkspaceViewModel, IDataErrorInfo
AllCustomersViewModel : WorkspaceViewModel
MainWindowViewModel : WorkspaceViewModel

Since I moved passed the Class Diagram tool to other things, I don't have a lot of experience with the all the symbols.  In the first diagram, it looks like dependency/association links.  I would be curious to know what those single, and double-arrow links mean.  

0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 

Author Comment

by:newbieweb
ID: 33440667
I am interested in the English desriptions for the arrows, etc. which connect the charts.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33442104
It might help to know how to read the class diagram, if you include the source code that was used to generate the diagram...
0
 

Author Comment

by:newbieweb
ID: 33442184
Here is the link where I downloaded this MVVM demo from MS.

http://code.msdn.microsoft.com/mag200902MVVM/Release/ProjectReleases.aspx?ReleaseId=2026

I was trying to learn to read the class diagram so I could then understand the code:)
0
 

Author Comment

by:newbieweb
ID: 33442197
I have shifted my attention away from this demo to trying to get my Winforms app to use its first WPF form.

I could really use help on my other post:

http://www.experts-exchange.com/Microsoft/Development/Microsoft_Programming/WPF_and_Silverlight/Q_26404120.html

if you get the chance.  I have trouble with the namespace.

Thanks.
0
 

Author Comment

by:newbieweb
ID: 33442398
I am going back to the tried and true WinForms and Visual Studio 2008.  I'm going to close out this question to save you all the time...

I find that an error in the XAML causes Visual Studio 2010 to hand and hang.  So I have no time right now for that steep learning curve.

Model-View-Presenter, WinForms, LINQ and Entity Framework wil have to do :)
0
 

Author Closing Comment

by:newbieweb
ID: 33442404
Thanks.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 33442457
I think that it is still a question worth answering, since I don't use the Class Diagram tool, so I don't know what those errors are referring to.

The CustomerViewModel has a private field (_customer), which depends on the Customer class.  That arrow is a dependency indicator between the two classes.

The AllCustomersViewModel.AllCustomers property is an ObservableCollection of CustomerViewModel, which is an association.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question