473,573 Members | 2,822 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Pros & Cons of JSF/Ajax

I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.

Thanks.

Steve
Apr 8 '06 #1
10 6297
On Sat, 08 Apr 2006 21:10:56 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.


The biggest problem with Ajax is you have a different JavaScript
implementation in every browser with different bugs and different
proprietary extensions. You also are then limited to browsers with
JavaScript.

JSF on the other hand is not going to be able to pull off clever
client side tricks like keystroke editing.

If you have a captive audience all using the same browser and version,
Ajax looks better. If you have the general public as your audience
then JSF looks better.

Obviously there are many other factors to consider.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Apr 8 '06 #2
Roedy,

Thank you for your reply.

I am considering replacing a Java applet and have concerns that JSF and Ajax may not be adequate.

Some of the things the applet does is dynamically populate trees, tables, tabs, panes, comboBoxes, etc., on a page based on user
selections on the same page. The applet communicates with the server to get the required data when the information is not available
at the client. It also presents multiple pages to the user (e.g., JFrames) where info on one page is based upon user selections on
one or more other pages.

Besides keystroke editing, are there other things I will not be able to do with JSF? In particular, do the above sound doable or
might I have some problems?

Thanks for any feedback.

Steve
--

"Roedy Green" <my************ *************** ***@munged.inva lid> wrote in message news:1e******** *************** *********@4ax.c om...
On Sat, 08 Apr 2006 21:10:56 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
I need to build a very dynamic client and would be interested in knowing the pros and
cons of using JSF and Ajax to accomplish this.


The biggest problem with Ajax is you have a different JavaScript
implementation in every browser with different bugs and different
proprietary extensions. You also are then limited to browsers with
JavaScript.

JSF on the other hand is not going to be able to pull off clever
client side tricks like keystroke editing.

If you have a captive audience all using the same browser and version,
Ajax looks better. If you have the general public as your audience
then JSF looks better.

Obviously there are many other factors to consider.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Apr 8 '06 #3
Steve schrieb:
I am considering replacing a Java applet and have concerns that JSF
and Ajax may not be adequate.

Some of the things the applet does is dynamically populate trees,
tables, tabs, panes, comboBoxes, etc., on a page based on user
selections on the same page. The applet communicates with the
server to get the required data when the information is not available
at the client. It also presents multiple pages to the user (e.g.,
JFrames) where info on one page is based upon user selections on
one or more other pages.

Besides keystroke editing, are there other things I will not be able
to do with JSF?

Do you know what problems JSF and Ajax solve?
Browsers forget the GUI state with each page reload. But they reload the
entire page every time you click a link submit a form. This leads to
annoying delays, and makes it very difficult to maintain the UI state of
complex pages.

JSF is a component-oriented UI framework for the serverside. It takes
care of the UI state, and a reliable language and environment is
available to manipute data.

Using AJAX, you can send a request without reloading the whole page, and
just replace the changed elements [1]. This eliminates the delays, and
can preserve the UI state completely.
It should be possible to provide the functionality you have outlined
with a server side framework in combination with AJAX. But do you have
to use JSF?

In a recent interview [2], Jacob Hookom replied to the question "Do you
support Ajax natively?":

| For AJAX, we’re planning on pursuing an extension to JSF 1.2 called
| Avatar, based on various EG members’ ideas that will allow any and all
| parts of JSF to be used in AJAX applications. [...]
|
| The next revision of JSF (2.0) will probably include a case for a
| “Partial Faces Request” (AJAX). Also, there will probably be more use
| of annotations to ease the component development aspect of the spec.

In plain language: JSF has *no* support for AJAX right now.

I would definitely not try to build an AJAX app using JSF. You might
want to read the answers of other developers representing other java web
frameworks. I found them very interesting.
The best java web framework with AJAX support might be Wicket. Have a
look at the website [3] and ask for the current state of AJAX support on
the mailing list [4]. AFAIK, there already is Dojo and Scriptaculous
support.
Timo

_______

1: Some people misunderstand AJAX as writing the complete application in
Javascript. This is possible, but it has some major drawbacks. The
Javascript implementations are equal, but the DOM implementations are
not. I am not the only one with this opinion:
http://www.loudthinking.com/arc/000428.html

2: http://www.virtuas.com/files/JavaWeb...SweetSpots.pdf

3: http://wicket.sourceforge.net/

4: http://lists.sourceforge.net/lists/listinfo/wicket-user
Apr 9 '06 #4
On Sat, 08 Apr 2006 22:54:04 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
Besides keystroke editing, are there other things I will not be able to do with JSF? In particular, do the above sound doable or
might I have some problems?


Vanilla HTML does not have much in the way of smarts. the Form and
table is about as clever at is gets.

You might also consider JAWS. see
http://mindprod.com/jgloss/javawebstart.html

What the disadvantages of signed Applet for you?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Apr 9 '06 #5
Thanks for your comments.

I constructed a prototype using a signed applet but my customer is concerned about deploying JREs to all the client workstations.
They suggested JSF as a possible alternative but I am concerned about using a server-side solution when a highly dynamic client is
needed.

Steve

--

"Timo Stamm" <ti********@arc or.de> wrote in message news:44******** *************** @newsread2.arco r-online.net...
Steve schrieb:
I am considering replacing a Java applet and have concerns that JSF and Ajax may not be adequate.

Some of the things the applet does is dynamically populate trees, tables, tabs, panes, comboBoxes, etc., on a page based on user
selections on the same page. The applet communicates with the server to get the required data when the information is not
available
at the client. It also presents multiple pages to the user (e.g., JFrames) where info on one page is based upon user selections
on
one or more other pages.

Besides keystroke editing, are there other things I will not be able to do with JSF?

Do you know what problems JSF and Ajax solve?
Browsers forget the GUI state with each page reload. But they reload the entire page every time you click a link submit a form.
This leads to annoying delays, and makes it very difficult to maintain the UI state of complex pages.

JSF is a component-oriented UI framework for the serverside. It takes care of the UI state, and a reliable language and
environment is available to manipute data.

Using AJAX, you can send a request without reloading the whole page, and just replace the changed elements [1]. This eliminates
the delays, and can preserve the UI state completely.
It should be possible to provide the functionality you have outlined with a server side framework in combination with AJAX. But do
you have to use JSF?

In a recent interview [2], Jacob Hookom replied to the question "Do you support Ajax natively?":

| For AJAX, we're planning on pursuing an extension to JSF 1.2 called
| Avatar, based on various EG members' ideas that will allow any and all
| parts of JSF to be used in AJAX applications. [...]
|
| The next revision of JSF (2.0) will probably include a case for a
| "Partial Faces Request" (AJAX). Also, there will probably be more use
| of annotations to ease the component development aspect of the spec.

In plain language: JSF has *no* support for AJAX right now.

I would definitely not try to build an AJAX app using JSF. You might want to read the answers of other developers representing
other java web frameworks. I found them very interesting.
The best java web framework with AJAX support might be Wicket. Have a look at the website [3] and ask for the current state of
AJAX support on the mailing list [4]. AFAIK, there already is Dojo and Scriptaculous support.
Timo

_______

1: Some people misunderstand AJAX as writing the complete application in
Javascript. This is possible, but it has some major drawbacks. The
Javascript implementations are equal, but the DOM implementations are
not. I am not the only one with this opinion:
http://www.loudthinking.com/arc/000428.html

2: http://www.virtuas.com/files/JavaWeb...SweetSpots.pdf

3: http://wicket.sourceforge.net/

4: http://lists.sourceforge.net/lists/listinfo/wicket-user

Apr 9 '06 #6
Thanks for your comments.

My customer has concerns about deploying JREs to all the client workstations and the maintenance involved. They have asked about
alternatives and suggested JSF with Ajax as a possibility. The environment is currently Tomcat (with JSPs), Spring, Hibernate, etc.

Steve

BTW, The prototype I showed them is a signed applet.

"Roedy Green" <my************ *************** ***@munged.inva lid> wrote in message news:84******** *************** *********@4ax.c om...
On Sat, 08 Apr 2006 22:54:04 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
Besides keystroke editing, are there other things I will not be able to do with JSF? In particular, do the above sound doable or
might I have some problems?


Vanilla HTML does not have much in the way of smarts. the Form and
table is about as clever at is gets.

You might also consider JAWS. see
http://mindprod.com/jgloss/javawebstart.html

What the disadvantages of signed Applet for you?
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Apr 9 '06 #7
On Sun, 09 Apr 2006 14:38:02 GMT, "Steve" <x@y.com> wrote, quoted or
indirectly quoted someone who said :
My customer has concerns about deploying JREs to all the client workstations and the maintenance involved


That is really no different that installing any other program. The
main problem is when talking to the public who may not be permitted to
install any program in a corporate environment or who may have been
lied to that Applets are dangerous.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Apr 9 '06 #8
"Steve" <x@y.com> wrote in message news:AFVZf.2299 $XI6.1491@trndd c05...
I need to build a very dynamic client and would be interested in knowing
the pros and
cons of using JSF and Ajax to accomplish this.


I've got the same issue. My guess is that the best approach is to buy a
pre-built Ajax framework and use that. That way somebody else has the
headache of dealing with cross-browser issues, bugs, flaky Javascript, etc.
This doesn't eliminate the other downsides of Ajax, which include making it
difficult for search engines to index your pages and losing the "back"
button, but that may not be a problem for you.

The question remains: which pre-built framework to use? I do not know which
ones work well and aren't outrageously expensive.
Apr 9 '06 #9
Steve wrote:
Thanks for your comments.

I constructed a prototype using a signed applet but my customer is concerned about deploying JREs to all the client workstations.
They suggested JSF as a possible alternative but I am concerned about using a server-side solution when a highly dynamic client is
needed.


I suggest you consider building a regular swing app and deploy it via Java Web
Start. You can configure it so that it works completely in-memory, so the only
thing you need is a JRE on every client. One click and a full swing rich
client - with all it's flexibility and responsiveness, as well as all the IDE
support for building one - starts up and clients just use it.
I'd say this approach has a number of advantages over AJAX-based solutions,
especially in terms of ease of development, reliability and flexibility. AJAX
development might be going in the right direction, but it's still a long way
away from everyone's favourite tool for highly interactive web apps...in my
opinion, anyway.

t.n.a.
Apr 11 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

112
10274
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please, share your experience in using IDENTITY as PK .
5
7621
by: Fred | last post by:
Not much expertise on XSLT and trying to understand it's uses when creating apps in VS.NET? If I wanted flexibility on the UI (View aspect of M.V.C.): - How does it compare with creating business components that can be consumed by WebForms, WinForms, mobile devices, etc? Is it even fair to compare the such technologies? - How about for...
2
2804
by: scott | last post by:
Hi, Just wondering what sort of problems and advantages people have found using stored procedures. I have an app developed in VB6 & VB.NET and our developers are starting to re-write some of the code in stored procedures (im advocating encryption of them). When deploying an application however stored procedure seem to add another level of...
175
8754
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be changed". This is very much against my instincts. Can anyone offer some solid design guidelines for me? Thanks in advance....
3
4220
by: Andrea | last post by:
Hello everyone, I'd like to know which are the main pros and cons of using XML implementation in business organizations. >From a technical perspective, I find XML powerful, but looks like it is being pushed more from technical people than from businessmen... So, some questions: 1. Pros and cons
42
3834
by: kenneth.m.mcdonald | last post by:
First, I don't intend this to be a flame war, please. Python and Ruby are the only two languages I'd willingly work in (at least amongst common languages), and TurboGears and Rails seem roughly equivalent. I'm much more knowledgable about Python, but that's a minor issue--I've been intending to learn more Ruby anyway. Here are the pros...
18
2372
by: Andrew Wan | last post by:
I have been developing web applications with ASP & Javascript for a long time. I have been using Visual Studio 2003.NET. While VS2003 is okay for intellisense of ASP & Javascript, it's still not that great. One of the cons of ASP & Javascript is that they're both interpreted, which means one has twice the amount of work to do interms of...
11
4688
by: Max Vit | last post by:
I have deployed few Access apps splitting it in Front End and Back End. Our environment uses Win XP SP2 for clients, Win 2k3 for servers and Access 2003. The max. number of clients is about 50 (concurrent users is estimated around 10). Whilst the Back End always lives on a server, I am not quite clear where the Front End should live. I...
2
1869
by: Romeo85 | last post by:
I have started learning about Ajax and SOAP Messaging, can someone tell me what are pros and cons of AJAX compared to SOAP messaging
0
7781
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
7699
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8027
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8202
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6421
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5292
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3733
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2216
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1304
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.