when should we use use-case diagram and when we should use class diagram?

155 views
Skip to first unread message

Danial RikhtehGaran

unread,
Oct 31, 2013, 6:41:18 AM10/31/13
to umlf...@googlegroups.com
i'm php developer using MVC architecture that i'm new to UML
i know use-case , class , object , activity, sequence diagrams but i don't know for modeling a application where i should start.
i know use-case and class diagrams are structural diagrams and activity and sequence are behavior diagrams

but my questions are:
1. for modeling a app when i should use use-case diagram and when i should use class diagram?
2. does class diagram has abstract concept? because when i'm developing web app i have some controller and model or view also several classes that i use for different purpose (like insert data to database - validate form inputs and so on) but they don't look like to examples of class diagram that i'v seen until now so my question is class diagram is used for show concept of our system and it doesn't need to generate real class code form it ? 

for example modeling a ticket reservation that may have some classes like this:

but we don't write class codes like this and it can be different in programming but for view the concept we are using class diagrams . is it true ?

Remy Fannader

unread,
Nov 3, 2013, 2:33:47 AM11/3/13
to umlf...@googlegroups.com
Summarily, UC diagrams describe the logic of users' interactions with systems, Class diagrams describe data structures shared with other applications and can also be used for views.
Remy.

H. S. Lahman

unread,
Nov 1, 2013, 12:41:34 PM11/1/13
to umlf...@googlegroups.com
Responding to RikhtehGaran...

for example modeling a ticket reservation that may have some classes like this:

but we don't write class codes like this and it can be different in programming but for view the concept we are using class diagrams . is it true ?

The only reason this would not be the way you write the code is because you are using php. The OOPLs all provide very straight forward constructs that are exactly equivalent to the constructs in your diagram; they are just in text form.

<Hot Button>
Several years ago I read an article in a refereed journal that stated that the first markup language was invented in 1986. How soon they forget! Markup and scripting languages were very popular in the '50s and '60s. However, they all but disappeared by the mid-'70s. The reason is that they are a nightmare to maintain for large applications. Unfortunately web development has given them a new lease on life.

The reason the php code doesn't look like the class diagram is because php is the antithesis of good OO practice. It reflects all the worst features of the procedural languages of the '60s, like Basic and FORTRAN. Show me a buggy website and I will show you a site developed with Javascript or php.
</Hot Button>


-- 
Life is the only flaw in an otherwise perfect nonexistence
   -- Schopenhauer

Imagine how much more difficult physics would be if electrons had feelings
   -- Richard Feynman

Rene Descartes went into a bar. The bartender asked if he would like a drink. Descartes said, "I think not," and disappeared.

Entropy isn't what it used to be.
   -- mwalshe89

H. S. Lahman
H.la...@verizon.net
website: http://www.hslahman.com/
software blog: http://pathfinderpeople.blogs.com/hslahman/index.html
software book: Model Based Development, Addison-Wesley, 2011
geology book: The Evolution and Utilization of Marine Resources, MIT Press, 1972

Danial RikhtehGaran

unread,
Nov 4, 2013, 2:12:57 PM11/4/13
to umlf...@googlegroups.com
Thank you very much Lahman 
it was the best answer that i could get
in PHP you are right and i think it's near to end of php life
and decide do my web applications in Python 
and do my desktop applications in Java

Danial RikhtehGaran

unread,
Nov 4, 2013, 2:11:17 PM11/4/13
to umlf...@googlegroups.com
Thank you very much Lahman 
it was the best answer that i could get
in PHP you are right and i think it's near to end of php life
and decide do my web applications in Python 
and do my desktop applications in Java

--
--
You received this message because you are subscribed to the Google
Groups "UML Forum" group.
Public website: www.umlforum.com
To post to this group, send email to umlf...@googlegroups.com
To unsubscribe from this group, send email to
umlforum+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/umlforum?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "UML Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to umlforum+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages