• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on Web tier from book

 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are the architect at ACME Corporation—the hottest Internet
start-up of the moment. The start-up provides a front-end
accessible by multiple devices, from smart phones to desktops,
and provides innovative social networking features to its members.
The key considerations for the system are performance
and scalability, and individual messages between members are
not considered important (that is, they can be resent). Select the
most appropriate implementation for this system from the following
list:
A. JSP + JSTL accessing the messaging layer directly.
B. JSF accessing EJBs, with access to the messaging layer
mediated by a JMS client and MDB.
C. JSF accessing stateful session beans—one for each connected
client.
D. JSP + JSTL accessing a JPA-based persistence tier.

in book answer is given A, where i think it should be B, any thought ?

reason given in book is
All of the other options contain a reasonable chance
that there will be an unnecessary overhead associated with the
components used—EJBs, JPA, and so on. A is the simplest
answer for the business problem described, especially when the
priority of performance and scalability is stated in the stem of
the question.
 
Marut pandey
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I feel like Option A is correct as Question says messaging can be resent so it means it does not need be durable. It also does not say messaging should be asynchronous, so there is no good reason to use EJB and JMS.
 
Dmitri Ericsson
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My opinion is that B is the right answer. JSF is because it can render to many various formats (for smart phones, desktops and so on) and not Stateful beans because they value performance.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i agree with Dmitri, because in book another question is as below, which describes JSF has been designed to support this type of use,

You are a JEE architect at ABC Bank and have been tasked with designing their next-generation UI framework for online banking.
The online banking application must be accessible by both standard browser clients and mobile devices. What do you recommend
as the simplest and most optimal solution?

A. A JSF-based architecture, leveraging the capability of device
or channel-specific JSF renderers to support both mobile
and standard browser clients.
B. A JSP-only architecture, with custom logic to probe and
handle individual devices at runtime.
C. A Servlet-based architecture.
D. A template-based architecture.

Answer: A. JSF is designed to support exactly this type of use
case—the other available options, while workable, are not the
most optimal or most simple.

so my reason choosing answer B is
1) UI on multiple devices
2) Peformance
3) scalability
 
Marut pandey
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OOPS !!! I missed one important point from the question "The start-up provides a front-end
accessible by multiple devices, from smart phones to desktops," that can be easily achieved by JSF........ so correct answer would be B. I agree with you guys.
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as this is from book SCEA 2nd edition, does any body have idea how we can discuss this with book author(Mark Cade and Humphrey Sheil) to get more clarity or if it is printing mistake then correct.

 
Dmitri Ericsson
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Humphrey Sheil has his own blog http://humphreysheil.blogspot.com/, you can add a comment there
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34863
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JigaR Parekh wrote:You are the architect at ACME Corporation—the hottest Internet
start-up of the moment. The start-up provides a front-end
accessible by multiple devices, from smart phones to desktops,
and provides innovative social networking features to its members.
The key considerations for the system are performance
and scalability, and individual messages between members are
not considered important (that is, they can be resent). Select the
most appropriate implementation for this system from the following
list:
A. JSP + JSTL accessing the messaging layer directly.
B. JSF accessing EJBs, with access to the messaging layer
mediated by a JMS client and MDB.
C. JSF accessing stateful session beans—one for each connected
client.
D. JSP + JSTL accessing a JPA-based persistence tier.

in book answer is given A, where i think it should be B, any thought ?


When I read this question in the book, I thought "A" and "D" are wrong because I would never have a JSP or JSTL go through messaging or JPA directly. At a minimum, one goes through a servlet (MVC). In the SCEA world, is JSP shorthand for "JSP and servlet" or "JSP based architecture"? This is the only way I can makes sense of things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic