Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

One sceaj mock question

 
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Toysrfuss, a national toy store is creating a new e-front for Order processing. Customers have to create an account to transact with them, although an account is not required for browsing the catalog. Customers can browse items and add them to a shopping cart. They can then proceed to checkout. At this time, they can update quantities and submit the order. What technologies may be best suited for this application?
Choosing 4 correct answers
1) JSP for presentation and Servlets as controllers
2) Servlets for presentation and JSP as controller.
3) Stateless Session Bean for Shopping cart.
4) Stateless session bean for catalog retrieval.
5) Stateful Session bean for shopping cart.
6) Stateful session bean for Order update
7) Entity bean for Catalog retrieval.
8) Entity bean for Order update.
My choice is
1) 5) 7) 8)
but it is wrong..
anyone knows what are right answer?
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Normally at the end of the mock you should be able to review the questions/answers and see what's wrong and find the correct answer, but I'd rather discuss about why some of your answer are probably wrong.
For instance :
7) Entity bean for Catalog retrieval
The catalog is probably something huge, with a lot of products, so I think it is fair to assume that each customer will get only o very small part of it at a time, based on some selection criteria. Basically it will be a small and static view of a very limited part of the catalog, with the only possibility of picking a product at a time and adding it to the shopping cart. So the client won't modify or alter in any other way the catalog itself, it will have just a snapshot of some data. So, no transactions involving the catalog itself, no persistence to update, no concurrency between different clients to be concerned about - each one has its static, read-only list of products, eventuallly some concurrency on the product level might be useful, but not on the catalog level.
On the other hand it looks more like a service call, gimme a list of so-and-so-products, service provided by the store to actual and potential clients, service that doesn't look client related, just a short, one-time query and retrieval of the list. Hence it looks like a stateless session bean to me.
Billy
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with Billy's opinion about choice 7, therefore, I thought the anwser is 1, 4, 5, 8
 
Message for you sir! I think it is a tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic