Hi Jeremy, I've done quite a bit of AJAX programming on my web sites, and even a little COMET.
If you were to only listen to one thing I say in my post, its this: use jQuery( http://jquery.com/ ). It may not be python like pyjamas is, but javascript is a VERY powerful language and it more than pays for itself to get familiar with it. If you want to build a RIA, it's of my opinion you should learn how to deal with javascript and how it works. Your questions were a little vague, so I'll try to answer it with a few practices that I use. The key rule I always adhere to is to make the web site work first without any of the bells and whistles of ajax / javascript, and then add it on afterward. That's very important - anyone with javascript turned off will be infuriated with the site if you need javascript turned on for it to function. That being said, chances are if the web site needs javascript to _function_, it's done wrong (there's obviously exceptions, but few). I tend to load the page via straight HTML and have javascript manipulate the DOM afterwards. Some people like to have the server generate the HTML on AJAX requests, as it may be more DRY, but I like to load code it in HTML, and then send JSON back on the AJAX requests and have the javascript insert the relevant data into the DOM as it sees fit. That tends to duplicate the HTML work to be done, but allows for some more flexibility in what can be done. If this didn't answer any of your questions, I apologize in advance :P -- Brian O'Connor -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
