• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Usecase

 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Usually,when we write a use case,we write steps which take place sequencetially.In my project,there are log sheets,in which information has to be entered,but in any order.How to account for this in a use case.Just say and the user enters all the required information
or ??
thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vishal sodani:
Usually,when we write a use case,we write steps which take place sequencetially.In my project,there are log sheets,in which information has to be entered,but in any order.How to account for this in a use case.Just say and the user enters all the required information??

What would happen if you simply did this?
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I need to specify somewhere what this information is,which will give me the domain objects.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you probably need to specify that. You could do that in the Use Case without specifying the order, of course. Or it could be specified in another document, or simply comunicated orally.
Which option is the best depends on
- who knows about the information and when he/she is available
- who needs to know about it and when
For example, in Extreme Programming, with the Customer On Site, this information probably wouldn't be written down as early. It would be communicated coarsely in the planning meetings and more detailed in discussions during implementation and by automated acceptance tests.
The less direct the communication with your customer is, the more you need to rely on less effective communication, like more detailed Use Cases etc.
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do have customer on site
This is my use case
USE CASE: RECORD FRYER LOG SHEET (PC Line)
1. The fryer man asks the system for the log sheet.
2. He identifies himself.
3. He enters the shift, product flavour, shift incharge.
4. Then, he fills out the required information Potato Consumption, Oil Consumption, Potato Wastages, Cook Time, DownTime, Fryer Dwell time.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Documents communicate to humans, so just make it understandable. We have inserted comments between the numbered steps like "The user may do the following steps in any order" or "The user may repeat these steps any number of times". The important thing is the requirement is recorded.
For a case like your set of fields, you might give them a name - user enters Shift Production Metrics - and define the exact fields in an appendix or a referenced doc. That's especially useful if you'll reference the same set of fields in other docs.
[ March 12, 2003: Message edited by: Stan James ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vishal sodani:
I do have customer on site
This is my use case
USE CASE: RECORD FRYER LOG SHEET (PC Line)
1. The fryer man asks the system for the log sheet.
2. He identifies himself.
3. He enters the shift, product flavour, shift incharge.
4. Then, he fills out the required information Potato Consumption, Oil Consumption, Potato Wastages, Cook Time, DownTime, Fryer Dwell time.

Mhh, I wonder why you are having doubts about this use case. Remember, there is no value in doing the use case "right" - the only value is in communicating the requirements.
If you are thinking about how to write down the requirements, you possibly already know them well enough to not having to write them down at all, especially with a customer available on site you can ask once you are going to implement it.
So, what are you writing this down for, anyway?
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing down for 3 reasons
1. to learn OOPS using use case
2. customer would like to have requirements specification(though I am trying to persuade otherwise,since I am developing in small iterations)
3.to help in discovering domain objects,and their interactions
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by vishal sodani:
I am writing down for 3 reasons
1. to learn OOPS using use case

In my humble opinion, use cases aren't that important for this. In fact I think the term "object oriented analysis" is somewhat misleading and might even be harmfull to the understanding of OO design and programming...

2. customer would like to have requirements specification(though I am trying to persuade otherwise,since I am developing in small iterations)

Perhaps you should try to persuade him to do an even more detailed requirements specification, in the form of automated acceptance tests?
You can find a nice tool for this at http://fitnesse.org

3.to help in discovering domain objects,and their interactions

I hope you are speaking of "conceptual objects" here and are aware of the fact that they don't often map well to objects you want to have in your design...
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link.I wanted something related to acceptance tests.
Yes,I am talking about conceptual objects,as mentioned in Larmans book.What do yu mean that they do not map to the objects I want to design?
thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As Fowler says about the conceptual perspective:

...you should treat each class as a concept in a user's mind. The class diagrams you draw are then not diagrams of data or of classes, but rather of the language of your users.

With other words, conceptual (aka analysis) models are about the *problem*, whereas the system you want to develop is about the *solution* to the problem.
What I am driving at it that the structure of the solution doesn't necessarily resemble the structure of the problem.
So, if you find a "class" in your conceptual model it doesn't mean that you must also have an equivalent class in the design of your system. A conceptual generalization/specialization relationship doesn't mean that you have to find an equivalent inheritance relationship in your system.
A good OO-System doesn't try to "model the real world". It doesn't use inheritance because there is an "is a" relationship in the problem domain, but to manage the dependencies between the components of the solution (the system you build).
Does that compute?
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A good OO-System doesn't try to "model the real world".
Yes,I agree it sounds very logical.So,after finding the conceptual classes,what should I do-how to come up with system design?what questions are to be asked?
thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question - obviously, I needed some time to think about it...
I will try formulating my thoughts betimes - stay tuned!
 
vishal sodani
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ilja,
any thoughts?
thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A happy outcome is worth waiting for, or so I hope...
I finally started a new topic on this:
http://www.coderanch.com/t/98227/patterns/design-OO-systems
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic