An online retailer wants to deploy a blogging web site about the industry to
help generate more traffic to its e-Commerce web site. The company wants to create the blogging
site using Java EE technologies to make sure that every blog entry is indexed by search engines.
Which Java EE technology should the company use to create its blogging site?
A. A JSF-oriented application using EJBs and JPA for persistence
B. A JSP-oriented application using EJBs and JPA for persistence
C. A web-centric JSF-oriented application using JPA for persistence
D. A web-centric JSP-oriented application using JPA for persistence
I disagree. The correct answer should be C. Why they would favor JSP over JSF?
There is rarely a specific "right" or "wrong" software design option for a specific set of requirements. In regards to multiple choice questions regarding software design, the so-called "correct" answer is based on the opinion of the test author and what they think is either the correct or best answer. Your goal as a test taker is to decipher the train of thought of the test author and guess at what they think is "correct." This may or may not result in what you think is the correct or best option.
Aside, most likely the dynamic nature of a Java Sever Faces implementation would make it difficult to meet the requirement that "every blog entry is indexed by search engines." There are different types of web applications mentioned in the question. While a JSF implementation might be considered the best choice for an e-commerce site, it may not be best for a blogging site if there are indexing requirements based on static pages. There is a BIG assumption that you will not store blog entries in a relational database which would not be exposed to search engine indexing anyhow. Whether its JSP or JSF on the front-end doesn't matter much if the data is stored in a database.
This is a poorly designed question.
We can only imagine what the test author means by "JSF-oriented" and "web-centric JSF-oriented". Using EJB is a best practice for web-based applications. Answers B and D are the same.
Joined: Jul 17, 2008
Thanks Jimmy Clark for enlightening me.
I almost forget when JSF xhtml is translated into html, the created html is hard to understand since it uses all system generated id's.
First, answers B and D are not the same, because D specifies "web-centric". My understanding is that in the certification/quizzing lingo, this means a two-tier web-application. That is, a web-framework like JSF running directly on the persistence layer, without a dedicated business logic.
I do agree with you that we can only guess at the train of thought here. I think one point for arriving at D might be that it's the simplest solution to meet the requirements.