Forums Register Login

When to use JSF and when to use JSPs?

+Pie Number of slices to send: Send
Hello all!

I'm still preparing for SCEA part 1, soon I will take it and I still have many questions :S

About Web Tier: In some mock exam questions about choosing web technology, the correct answer is to choose using JSPs or using JSPs and Servlets. In these cases I always wonder why not to use JSF instead. I'm afraid if I'm asked about choosing between only JSPs and Servlets, or JSFaces I would always choose JSFaces regardless of the scenario. So when is it better to use each one? Wich are the proper scenarios for each?

Thank you very much!

antonio

PD = I've searched for an answer but I d'dn't find it, that's why I create a new post. Hope I did right...
+Pie Number of slices to send: Send

May be this is useful for you.

http://www.artima.com/lejava/articles/jsf_jsp.html

Cheers!
Prathap.
+Pie Number of slices to send: Send
I really thank you very much. But as far as I understood, it doesn't talk about when to use servlets/jsps and when to use JSF, right?

Any link focused on SCEA?

antonio
+Pie Number of slices to send: Send
so lets see if this helps you.

JavaServer Faces technology is to leverage familiar UI-component and web-tier concepts without limiting you to a particular scripting technology or markup language.

JSP application cannot map HTTP requests to component-specific event handling nor manage UI elements as stateful objects on the server, as a JavaServer Faces application can
+Pie Number of slices to send: Send
Thank you very much. I think this helps everybody facing the exam!

antonio
+Pie Number of slices to send: Send
At the end of the day you're always going to be using Servlets one way or another as they underpin all the Java Web technologies.

However, there are still cases where you'd use a Servlet directly. For example, if you need to stream binary data back to the client.

The point is that comparing Servlets and JSPs with JSF is not really comparing like for like. As Deepak was saying, JSF is a framework for constructing rich component-based UIs. Servlets and JSPs, assuming you're not using Facelets, are the building blocks.

The interesting questions arise when you have to choose between an action-based as opposed to component-based framework.
+Pie Number of slices to send: Send
Thank you too! Yes, that good be an interesting question, but I don't think it may come in the SCEA exam. For me Struts or Stripes are action-based frameworks, but I think using servlets and JSPs it's not considered action based at all. I don't think Sun wants to talk about action-based frameworks, as they don't have it self and as Struts was the non-standard solution for web applications during so many years, forgetting about Servlet/JSPs as a serious option.

antonio
+Pie Number of slices to send: Send
Good Discussion Friends.

Cheers!
Prathap.
+Pie Number of slices to send: Send
 

I don't think Sun wants to talk about action-based frameworks, as they don't have it self



I think it's a big mistake to rule out action-based frameworks purely because Sun has made JSF, a component-based framework, part of the Java EE standard. The old adage that one size does not fit all applies here, as even the most ardent supporter of JSF would not argue it should be used in every circumstance.

You probably won't get questions on action- vs component-based frameworks in part 1, but it's a decision you'll have to make in part 2. Personally, I don't think justifying the use of JSF purely on the grounds "it's from Sun" cuts it. You need to understand the implications for the various non-functional requirements if you're to argue your case effectively.
I didn't say it. I'm just telling you what this tiny ad said.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2873 times.
Similar Threads
JSF ever become web standard
Newbie Question: Java EE vs Tomcat+Hibernate+Struts
Display XML in JSF
Wrote SCEA Beta Test Exam Today - Feedback on the Sun Certified Architect Exam Part 1
Websphere JSF Problem
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 05:24:20.