Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shopping Cart / customer In Cade's Diagram

 
Josep Andreas
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know why there is an association between the shopping cart and the customer in cade's diagram?

IMO the shopping cart can/does exist without the customer (the customer only has to logon when he/she wants to process the order..??);
Also, the customer does not need to have a reference to the shopping cart.

Only the order-processor needs to know about the shopping cart, and about the customer.

Or is some customer data also stored in the shopping cart? but, I cannot find any prove of this in the other diagrams...



Can somebody explain this?

regards,
J
[ January 22, 2005: Message edited by: Josep Andreas ]
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Becuase without a customer a shopping cart doesnt exist.
The association is required becuase eventually a shopping cart belongs to a customer.
And if u have the customerId u can retrieve cached shopping carts if need be the case. Dont know how viable that is in a scalable solution though.

HTH
Dhiren
 
Deepak Pant
Ranch Hand
Posts: 446
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Josep/Dhiren,

I am also confused. I don't think two separate classes Order and ShoppingCart are needed.

If ShoppingCart is needed then it should associate itself with the product and then with Order.

It is definitely not a SFSB otherwise he would have depicted that. It doesn't look like composite entity because Order is already there.

See not every class in the class diagram will become entity bean. So it could be some value object used for holding product and customer reference in session.

I am not convinced as to why it is needed otherwise..

Thanks,
Deepak
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic