Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
You guys haven't done this much, have ya? I suggest you study this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic