dev@javaserverfaces.java.net

Re: Comments on the Ajax code.

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Wed, 03 Sep 2008 03:05:07 -0700

>>>>> On Tue, 02 Sep 2008 17:33:19 -0700, Jim Driscoll <Jim.Driscoll_at_Sun.COM> said:

JD> Some comments on the Ajax code. Some of this requires a bit of writing,
JD> so I wanted to run it by the group before I made a change.

JD> Roger, I'm especially interested in your input.

JD> I'm still getting my head around the Javascript code, so there may be
JD> somethings I don't understand correctly.

JD> In AjaxEngine, we define a global, observer.

JD> It's a bad practice to define a global in general - I think we should
JD> resolve not to do this in any of our code... It's especially bad to
JD> define a global with a common name in a widely shared library.
JD> Similarly, the functions in Observer require overriding the Array
JD> prototypes - which is again bad practice in a library.

JD> We'll have to fix this, before ship, I think. I'm loath to just do it
JD> since it will have an API impact. If you want me to just do it and
JD> report back, let me know.

I think you should do this, but Roger has the final say.

JD> Also, though we register ourselves with the OpenAjax library, we don't
JD> actually use the pub/sub hub. We should, I think, plan to, as part of
JD> the Observer object.

Yes, we definately should.

Ed

-- 
| ed.burns_at_sun.com  | office: 408 884 9519 OR x31640
| homepage:         | http://ridingthecrest.com/