Jump to content

Reverse Ajax?


Citydev

Recommended Posts

In Ajax, JavaScript communicates with the server and changes DOM elements in real time. Has anybody come up with the reverse - where the browser sends event information to the server and the server sends back instructions to change DOM elements?

Link to comment
Share on other sites

I don't quite understand - how is that the reverse? In both situations, the browser is responsing to an event, sending data to the server, and the server responds with more data (which can be instructions, content, etc.).

Link to comment
Share on other sites

In the early hours of the morning, I thought I'd made a major breakthrough but it turns out this is a well-known model, sometimes called 'Comet' which apparently is a brand of household cleaner like Ajax. It seems the emphasis is generally on events coming from the server eg new share prices or new chat messages. My thinking was I maybe don't want to have all the control logic sitting on the browser just using the server to supply services. Instead the browser keeps asking the server what to do, so the browser is just providing rendering services. It's kind of back to a traditional web model but with a continuous rather than page-at-a-time connection. The rationale is you don't have to learn Ruby for the back-end and JavaScript for the front-end.

Link to comment
Share on other sites

So, you mean, the controller (i.e. MVC-esque) sits entirely on the server, instead of on the client? Why not? In fact, I believe most AJAX implementations are like that, and only heavy "AJAX applications" do processing client-side.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...