From: James Britt Date: 2005-02-26T09:41:49+09:00 Subject: Re: [OT] Ajax: A New Approach to Web Applications Curt Hibbs wrote: >> >>Ps. Maybe there should be a sub-project of Rails for components like this. >>There is a core framework piece, where you can specify standard XML >>responses which the client side grabs as a DOM and does certain >>things (runs >>Javascript functions, twiddles content in the DOM, adds into the DOM, etc >>etc). I would love to work on this with people. > > > I don't know of anyone who is working on this in Rails (if I'm wrong, maybe > this statement will bring them out into the light!). > > You should go ahead and create a RubyForge project for this and then invite > other interested developers to join you. I would do so myself if I weren't > already juggling too many Ruby "balls" along with my day job. I'd rather not see anything tied to Rails, but an framework-independent lib that Nitrons and Wee'ers and Railers and whomever can adapt for their needs. What I have right now (and mind you, most of this is mostly hooking together the good work of other people) lets you include a module in a WEBrick server and register services/classes. These services are then callable using JSON-RPC from a JavaScript client using a nice JavaScript lib designed for some Java stuff I came across. The client code you write yourself never messes with JSON or XmlHttpRequest. It calls server-side objects using their method names as i they were local objects, and gets back JavaScript objects courtesy of JSON serialization. The server-side code need not know anything about JSON or JavaScript. The objects returned to the client from server code are serialized using Florian's code. Anyway, with any luck I'll have enough cleaned up such that I can start a RubyForge project this weekend. I've only been using it via WEBrick, so I need to see what one has to do to get it to work with CGI, etc. See that it isn't coupled to any particular server tech. James