• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

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

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 325
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
It wasn't my idea to go to some crazy nightclub in the middle of nowhere. I just wanted to stay home and cuddle with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic