Chapter 3.6. MVC Meets Ajax

Recently, there has been a dramatic shift in web development paradigms. Ajax seems to be taking the world by storm, so now it is no longer a given that a user action is going to create an HTTP Post (or HTTP Get) that will then return a brand new page. Instead, user actions can be picked up by JavaScript on the page and turned into requests that go to the server and get a value back, which is then passed back to the in-page JavaScript by the browser.

Even with more JavaScript view logic, and dynamic updates on the same page, the MVC paradigm still works; you still use views to generate user actions, which are handled by the controller and returned to the browser. You don’t have to generate a new page every time something ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.