Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on "gotchas" and risk points  RSS feed

 
Linda Walters
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jonas and John,

I work on the web-based application of a rather sophisticated enterprise IT management system. We will soon begin planning our next major version and that will us JSF (which the previous major version did not) and, hopefully, AJAX. Management is, rightfully, concerned about risks and hidden "gotchas" in mixing AJAX and JSF as it is Terra Incognita for most of them (as well as most of the engineers).

I'm sure that there are some risks, albeit minor as well as I am certain that there are more than a few hidden "gotchas", especially since we need to be browser independent.

Can you advise on where the major risks and hidden "gotchas" lay?

Thanks
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linda,

Not to jump on the authors of the JSF book, but I thought I would point you to some information. Read through my blog for the past couple of months. I have posted some things that developers over look such as sessions, errros, and other things. My JavaRanch Radio blog is here. I will also be doing talks in San Jose and San Fransisco where I talk about these issues.

Eric
 
Linda Walters
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Eric,

I'll be checking out the blog.
BTW - I'm in the middle of "AJAX in Action" and its the best of all the many AJAX books to hit the market so far.

When you say that you'll be talking in San Francisco, do you mean at JavaOne or the April AJAX event?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am talking at Ajax Experience and Real World Ajax

Eric
 
Jonas Jacobi
Author
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Linda,

Personally I think that Ajax and JSF is a very good marriged (and that is why we wrote the book .

There are "gotchas" to watch out for and we mention some in our book, but there are several good resources out there that discuss anything from Ajax usability to Ajax-overkill-by-resume development.

Currently there are several JSF projects in the works that will provide, or already provides, JSF Ajax components:

Apache MyFaces
- Tomahawk
- ADF Faces (to be renamed)
Oracle ADF Faces
Backbase
ICE Soft (ICEFaces)

To mention a few JSF component libraries/providers.

As Eric mentioned in his blog post - cross browser support is definitely an issue that many developers will be facing developing Ajax applications. As a JSF component writer you are facing the same issues, but with JSF you can encapsulate this "grunt" work into a JSF component that is easy to use.

A suggestion, and I think Eric will agree with me, look for an existing Ajax toolkit that provides the functionality you need (cross-browser, accessibility, features, etc.) and then use it to write your JSF Ajax enables components.

- Jonas
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The biggest pitfall/gotcha is this: Thinking that the response from the server is correct. I have seen frameworks/applications fall apart on this on fact. My whole talk in San Jose is based on this. Wacky stuff happens in the responseText and you will never see it in testing.

Frameworks are very good for people that are not good with JavaScript. It allows you to get the code without a lot of the hassle. Prototype.js is a great library to use also. They eliminate the need to figure out what Netscape needs verus IE and Opera and Mozilla, and Firefox, and so on.

Eric
 
Linda Walters
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jonas and Eric,

Thanks both for your replys. Eric's point of not trusting what comes from the server just because it comes from the server is a very good point!

Fortunately, I have an existing product that, while it is mostly (95%) non-AJAX, has a lot of JavaScript in which we have already solved most of the cross browser problems. Since our product is an enterprise application, the vast majority of our customers use the latest version of IE. A few use Firefox and those are the only two that we certify for use with our product. That makes life a lot easier than coding for a publicly accessible web site like Google or Amazon.

We are pretty cautious about using third-party products in our code and try as much as possible to stay with standards-based, OpenSource tools that have few if any licensing (or cost) problems.
 
Jonas Jacobi
Author
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you are already familiar with
Ajax
you know the two response types that you can be used to fetch data - and .

Which one to use? A good rule is to ask yourself if you control the syntax of the response. If you do, then you can
safely
use the responseText type in combination with JSON syntax and the function.

We have an example in our book on how to integrate Ajax data fetch with JSF - its in Chapter 7.

Eric, are you coming to the
Real-world Ajax
Conference in NYC May 5-6?

- Jonas
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not been invited to that one yet. Guess they are waiting to see how I do in San Jose!

Eric
 
Jonas Jacobi
Author
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John and I are presenting at the NYC conference, so if you are coming please let me know so we can plan for a beer or two

Jonas
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!