aspose file tools*
The moose likes JSF and the fly likes Why use JSF with AJAX instead of jsp/struts or jsp/Ajax Servlet or php for AJAX apps? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Why use JSF with AJAX instead of jsp/struts or jsp/Ajax Servlet or php for AJAX apps?" Watch "Why use JSF with AJAX instead of jsp/struts or jsp/Ajax Servlet or php for AJAX apps?" New topic
Author

Why use JSF with AJAX instead of jsp/struts or jsp/Ajax Servlet or php for AJAX apps?

Rish Khopkar
Greenhorn

Joined: Oct 21, 2003
Posts: 5
Hi Guys, I'm new to JSF and AJAX and was wondering about the hype of the synergy of the two technologies.

There is a lot of hype on the JSF and AJAX combination. I can understand that if you are trying to write custom Components that you want to be AJAX enabled, JSF and AJAX with the component model, the Phase Listener and the ability to jar everything include the javascript up into the component makes a lot of sense.

But let's say that I'm just trying to write an AJAX powered web-application, and not necessarily reusable custom components. Why is JSF any better than struts/jsp or jsp/Ajax Servlet (using Ajax Anywhere or AjaxTags or even something like Dojo), or php (using one of the other PHP frameworks)?

In summary, let's say you are not a rich component toolkit writer, but that you're just trying to write an AJAX enabled application. Is there something about JSF that makes it easier to write an AJAX enabled application than with struts/jsp or jsp/Ajax Servlet or php?

Amarish
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Ajax can be used in any technology. Ajax with .NET, PHP, CF, ETC. I would not call it hype! Been around for years and been in the public eye for the last year.

You basiclaly can pick the technology you are confortable with and integrate Ajax into your application. The same clientside code can run on any backend server. How the code is added to the page can be anything from adding the JavaScript manually to adding a component/control to the page.

Eric
Rish Khopkar
Greenhorn

Joined: Oct 21, 2003
Posts: 5
I think I might not have stated my question clearly. I'm not disupting the importance of AJAX.

What I'm asking is in the java world, is it better to use AJAX with JSF rather than using AJAX with Struts, or Ajax Servlet if you're just writing an AJAX powered Application (NOT Writing a Rich Internet Component Toolkit), and if so why is that?

Amarish
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

I don't think there is any advantage to Ajax + JSF over Ajax + <insert technology here> beyond the scope of JSF vs <insert technology here>.


GenRocket - Experts at Building Test Data
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

I think JSF provides the UI components to use, which are nice. And I also think the navigation, conversion, and validation is a bit easier than Struts.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

Originally posted by Mark Spritzler:
I think JSF provides the UI components to use, which are nice. And I also think the navigation, conversion, and validation is a bit easier than Struts.

Mark


True, but that has nothing to do with Ajax.
Sergey Smirnov
Ranch Hand

Joined: May 29, 2003
Posts: 167
Originally posted by Gregg Bolinger:

True, but that has nothing to do with Ajax.

True also, but that does not mean all this stuff should not be used during the ajax request.
[ April 11, 2006: Message edited by: Sergey Smirnov ]
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Originally posted by Gregg Bolinger:


True, but that has nothing to do with Ajax.


And, I think we factored out the Ajax stuff, since that is the common technology and would be the same. So the question ends up boiling down to the other technology. JSF, Struts, JSP/Servlets, or PHP. SO I kind of wanted to point out the difference between them. More so for JSF and Struts.

I think JSP/Servlet and PHP would be more programming at a lower level.

Mark
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why use JSF with AJAX instead of jsp/struts or jsp/Ajax Servlet or php for AJAX apps?