UML Modelling and design class diagrams (For business logic?) [RESOLVED]
Hi all
I was hoping some of you could share your insight with uml diagrams.
I have a question regarding UML modelling, specifically with Design Class Diagrams.
I am in the process of modelling a system, and i need to know which classes i need to make design class diagrams for.
I have base classes such as "Customer" that stores the actual information like "First Name" etc. I also have business logic classes that hold the business logic relating to the customer component... e.g. search methods for finding customers etc.
Do i make "Design Class Diagrams" for the Business logic classes as well? and if so, what do i put down as attributes?
Re: UML Modelling and design class diagrams (For business logic?)
Quote:
Originally posted by Rockhopper
Hi all
I was hoping some of you could share your insight with uml diagrams.
I have a question regarding UML modelling, specifically with Design Class Diagrams.
I am in the process of modelling a system, and i need to know which classes i need to make design class diagrams for.
I have base classes such as "Customer" that stores the actual information like "First Name" etc. I also have business logic classes that hold the business logic relating to the customer component... e.g. search methods for finding customers etc.
Do i make "Design Class Diagrams" for the Business logic classes as well? and if so, what do i put down as attributes?
Class diagram should be as detailed as possible. So if you include as many as neccessary to describe the system. I tend to design all Classes and use "Generate Code" feature to generate the base classes.
Yes you would put business logic in the Class Diagram too. Depending on what they are they might be Methos or even a seperate class.
In your case
Code:
Class : Customer
Attributes :
Name
Address :
Phone :
etc....
Methos : Search():
Edit():
Delete():
Add():
Hope this helps
Re: UML Modelling and design class diagrams (For business logic?)
Quote:
Originally posted by Rockhopper
Do i make "Design Class Diagrams" for the Business logic classes as well? and if so, what do i put down as attributes?
nothing. If classes are stateless (the business logic ones) then they don't have attributes- only methods
personally i wouldn't include classes that belong outside the immediate layer - mark them as 'object' if unknown and add a little note that points the reader to an associated diagram somewhere.
UML is part of iterative design process - you'll never get it right in the first take, you need to keep revisiting diagrams over and over as your project evolves (at least that's what you tell your boss ;) )