Developing the Server-side Layer of an Email Application in AJAX
(Page 1 of 4 )
Here you have it. Welcome to the concluding part of the series “Take AJAX to your email inbox.” In three parts, this series shows in a friendly format how to develop a simple web-based POP3 client which uses AJAX as the driving technology for fetching and displaying email messages on a web document.
Introduction
Stepping back for a moment to the second installment of the series, you'll probably recall that I focused my efforts on writing the full set of JavaScript functions that make up the POP3 client. Given that, I defined the functions responsible for sending out and handling HTTP requests, in order to retrieve and display email messages on the web page, as well as creating the functions tasked with adding the proper behaviors to each control of the corresponding user interface.
The end result was a fully-functional client-side application layer. This layer was capable of requesting the PHP file that talks directly to a specified POP3 server and pulls out messages to be displayed within the section of web document destined to that specific purpose. Although the user interface I developed during the previous article exposes the basic controls for visualizing and navigating back and forth across messages, perhaps you may want to add a little bit of your personal touch and create a better one. You can do this either by utilizing my example as the foundation for introducing your own improvements, or by creating a brand new interface, featuring more sophisticated navigational controls, or a truly professional look and feel. As you can see, there's plenty of room to experiment here.
In either case, in this last tutorial I'll tie the client-side application layer I wrote earlier to the server-side code that connects to the mail server and executes POP 3 commands, in order to retrieve email messages to be listed on the corresponding web page. How will this be done? To achieve this task, I'll develop an easy-to-follow PHP class, which will expose some useful methods for establishing a connection to the POP3 server, together with fetching the email messages in question.
Having outlined the guidelines for this tutorial, it's time to leap forward to creating the pertinent PHP POP3 processing class. Let's get going!
Next: Working with a POP3 server: defining the barebones of the "POP3Processor" class >>
More XML Articles
More By Alejandro Gervasio
|
| · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | · | | | | |
|