File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Whizlab Question JSF or JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Whizlab Question JSF or JSP?" Watch "Whizlab Question JSF or JSP?" New topic

Whizlab Question JSF or JSP?

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850

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

Answer: D

I disagree. The correct answer should be C. Why they would favor JSP over JSF?

SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog-
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
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.
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 850
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.
Paul Balm
Ranch Hand

Joined: Dec 13, 2008
Posts: 63
Hi Jimmy,

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.


SCJP 1.4 -- SCJD Java 2 -- OCM JEA 5
I agree. Here's the link:
subject: Whizlab Question JSF or JSP?
jQuery in Action, 3rd edition