manning-sandbox.com/forum.jspa?forumID=329
4
Ajax
Ajax is a way of using JavaScript to create interactive web pages that send data to and from the server behind
the scenes so that the user doesn??™t see the full page refresh. This means that a web site is more responsive and
feels faster to a user. This allows for a web application, such as a web-based email client to behave more like
its desktop cousins. As a result, Ajax is gaining in popularity. Although it is server based, the Zend
Framework??™s MVC system that separates different layers of the application helps make it easier to add Ajax
functionality to your websites.
In this chapter we will look at what Ajax is and how it used in web applications and examine all the
components that make up a simple example in pure JavaScript and also using client libraries. We will also
integrate Ajax into a Zend Framework application so that we can investigate how Ajax interacts with the MVC
system. Let??™s consider exactly what Ajax is.
4.1 Introducing Ajax
Ajax enabled applications do not use full page refreshes to provide new information to the user. This can make
them more user friendly as they are more responsive. Figure 4.1 shows Google Suggest
(http://labs.google.com/suggest), which is an Ajax application that shows a dropdown list of sorted search
terms as you type into the search box.
Pages:
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119