• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

basic use case doubt

 
Rahul Siddharth
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone.

I'm new to UML but basically a developer.I have a jsp in which I had 2 functions, one to add and the other to modify an account.Do I need to write two use cases(1.add,2.modify) or just one use case that describes both the functions?.

Thanks in advance.
 
Rajah Nagur
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say you require 2 use cases, because Each use case should describe how the actor will interact with the system to achieve a specific goal
[ August 11, 2008: Message edited by: Rajah Nagur ]
 
Jan Cumps
Bartender
Posts: 2599
12
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a Craig Larman adept, I would suggest to use one use case for this goal.

A common exception to one use case per goal is to collapse CRUD (create,
retrieve, update, delete) separate goals into one CRUD use case, idiomatically
called Manage <X>.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp in which I had 2 functions, one to add and the other to modify an account.Do I need to write two use cases(1.add,2.modify) or just one use case that describes both the functions?.


First, you should move these functions to a servlet. A Java Server Page should be used for displaying information and providing a GUI for humans to send data to a web server via HTML forms.

Second, since adding an account and modifying an account are two distinctly different operations, you should write two Use cases.
 
Jeff Langr
author
Ranch Hand
Posts: 799
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jan Cumps:
As a Craig Larman adept, I would suggest to use one use case for this goal.


Technically, these are two separate goals that a user wishes to accomplish when interacting with the system, so they are at least conceptually two separate use cases. While there may be some advantage to collapsing them in the short term due to minimized redundant text, I think you're better off working these separately and using "includes" sections for common portions.

I think in general that you want to avoid "if" clauses in a use case. For example, the use case for "add account" may require an external lookup to a credit service, but this would not be appropriate for a "change account" use case.

Jeff
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic