This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Doubt on a web tier Question from Cade & Humphrey's Study Guide 2nd edition

 
Danny Soon
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question is as follows:

XYZ Corp has retained you as the architect for their latest web app: XYZOnline. This app allows customers to search, browse, and order catalog content online. XYZOnlin access the inventory and payment system as web services. What architecture do you recommend?
A. JSP/JSF pages accessing the web service layer using stateless session beans.
B. Servlets accessing the web services directly using JAX-WS as necessary.
C. JSP/JSF pages accessing web services layer using JAX-WS as necessary.
D. JSP/JSF page accessing the web services using JMS.

Answer is C. I don't understand. JSP/JSF View should not have any business logic. If you want to fullfil inventory and payment operations, you need some business logic. Business logic should not be present in View, right? If you look Web service as presentation data model, you should use View helper like JSTL or Custome tags to adapt View to the data model, right?

I guess that C is selected because of JSF which can use backing bean or custome UI component to access web services. Do you aggree?

I selected B. But its explanation is that B uses Servlets to generate the presentation. Is it because B doesn't metioned Presentation solution?
 
deepak adlakha
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looking at the options available, I would have select C.

Because there is no mention of scale issue, so no point going for EJB's. so one option is out.

Servlets wont be used for presentation, so that option is also out.

JMS to access web service, i dont think.

So option which is left is C. Yes i agree there should not be any business logic in presentation tier, but using some beans in JSF, i think accessing web service will be idle solution by looking at the problem statement.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic