Okay my next question would be a generic design question. Lets say I was
developing an IM application with Qooxdoo. So I would have a chat window but
it would be possible to have more than one chat window open at time. How
using Qooxdoo would I keep track of them?

So lets say I have on each window an input text field, a chat text field,
and a username text field.

One thought is to have a class that separates my AJAX calls from the User
Interface. When a new window is open each of the text fields would be passed
by reference to this master class and this class would keep track. When a
response from the server came back it would match up an ID, locate the
objects and manipulate them that way. When the window was closed I would
have another function remove reference to them such that any further
requests would simply be silently ignored.

The previous application merely suffixed the id to the end of every DOM
element so it was easy to track. i.e. it would merely find
chat_text_area_204. Ideally I'd like the most manageable and intuitive way
possible.



Steve Ramage
Software Developer
IP Applications Solutions Inc
Email: [EMAIL PROTECTED]

 


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Andreas
Junghans
Sent: Wednesday, May 23, 2007 1:45 PM
To: qooxdoo Development
Subject: Re: [qooxdoo-devel] Request Question in 0.6.6

Hi Steve,

Am 23.05.2007 um 21:00 schrieb Steve Ramage:

> Okay so I've received two responses and I'm not exactly 100% clear  
> on what
> they mean.
>
> So when you say with cross domain AJAX requests must be in  
> Javascript code,
> does that if I was on the same domain I could use the existing XML  
> system?

Yes. When you don't call setCrossDomain(true), qooxdoo automatically  
uses XmlHttpRequest for communication, and you can read XML responses  
from the server.

> If not short of rewriting the API to output JSON is there any way  
> to use
> Qooxdoo with it?

See above (same-domain requests should work fine for you). Should you  
ever need cross-domain calls, you have no other choice than to send  
JavaScript code from the server (wrapping the XML). The reason for  
this restriction is the browser security model. In theory, you can't  
read anything from a server in a different domain. However, there's  
sort of a loop hole using JavaScript code (although it doesn't really  
compromise the security model if used correctly), and this is  
leveraged by qooxdoo for cross-domain requests.

Regards,

   Andreas


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to