XML
  Home arrow XML arrow Take AJAX to Your Email Inbox: Developing ...
Iron Speed
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 68
    2006-03-29

    Table of Contents:
  • Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client
  • Styling the web-based POP 3 client: writing the CSS declarations
  • Defining the POP3 client's structure: coding the (X)HTML markup
  • Creating the skeleton of the client-side application layer: defining generic JavaScript functions

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Take AJAX to Your Email Inbox: Developing a Web-based POP 3 Client
    (Page 1 of 4 )

    In this article, the first of three parts, you will start creating a simple web-based POP 3 client using AJAX, which will use "XMLHttpRequest" objects to retrieve messages from a mail server.
    A downloadable file for this article is available here.

    Introduction

    Indeed, it isn't shocking news that AJAX has introduced considerable changes within the development of client-side Web applications. This brand new way of conceiving web programs, which send http requests in the background without page reloads, has brought a plethora of possible implementations for popular software that originally was designed and developed for running as desktop applications.

    Do you want to build web-based FTP clients, chatters, or full-fledged email applications, running all the stuff on the same web page? Fine, pick up a good understanding of AJAX, learn about its properties and methods, then develop the corresponding back and front-ends, and hopefully you'll end up with a http program that does its work at least decently. Of course, it may not meet everyone's needs, but what's the rush? After all, you can boost it with little hard work and effort, which can turn the program into a robust, reusable library.

    Admittedly, I got caught for the moment, since not all applications can be developed with the same ease. But there is enough room to write software that uses AJAX as the driving technology for doing all sorts of clever things, even when this means having to rethink - and fix - some issues related to accessibility and navigation between application states.

    As you may have guessed, in this article I'll make my contribution to the developing AJAX universe, by creating a simple web-based POP 3 client, which will utilize "XMLHttpRequest" objects for retrieving messages from a given mail server. The application I plan to develop will use a simple front-end for connecting to the mail host, displaying the messages and navigating back and forth across them. On the server-side terrain, I'll use PHP for accessing the mail server, pushing POP3 commands and reading messages from the inbox, which implies having the possibility of switching over to your preferred language and using it to create the application.

    With the formalities out of our way, it's time to begin building the web-based POP 3 client. Let's get started.

    Controlling the look and feel: creating the application's user interface

    The first step involved in the creation of the web-based POP 3 client rests on building the basic user interface. Stripped down to its bare bones, the building blocks of this interface will consist of three simple DIV elements, which will house the corresponding areas that comprise the mail client program. The first DIV box will contain the area for displaying the appropriate data fields. This will allow users to enter the usual information for connecting to the mail server, by specifying either its domain name or IP address, along with the name/password combination. For a better idea of how the overall user interface looks, below I've included a screenshot, which basically depicts its appearance:

    As the image above illustrates, the web-based POP 3 client shows the classic data fields for connecting to the mail server, in addition to providing some basic controls for navigating back and forth between messages. Also, I've added a little extra functionality to the program by including a "Clear" button, which will come in useful for clearing the area where messages are conveniently displayed.

    As you can appreciate, the user interface of my POP 3 client is very easy to use. Naturally, as you'll see later, both client and server-side application layers seamlessly support the development and implementation of an improved interface. However, for the educational purposes of this article, the functionality of the current one is more than enough.

    Now, after providing you with an example of how the look and feel of the POP 3 client will be created, it's time to move on and see how the above image can be translated to a few CSS declarations and the corresponding structural (X)HTML markup. So, let's no waste more time and learn how this is done.

    More XML Articles
    More By Alejandro Gervasio


       · Considering the numerous web applications that use AJAX to emulate desktop software,...
       · Thanks for writing this tutrial, I am eager to see what next week has prepared for...
       · Thank you for your kind comments about my AJAX tutorial. I hope the next ones will...
       · Oh and btw your php-code gives an error-message: Parse error: parse error,...
       · Kinda late, but he should have mentioned that this script requires PHP5.
       · Thank you for commenting on my article. I'm sorry that you had some problems getting...
       · I have read the artice. But i want to know how to implement this. I...
       · Thank you for your comments on my AJAX article. Concerning your question, using the...
       · Can't log in to the server .. a backslash has been slipped into one of the...
       · Thank you for commenting on my Ajax article. Now, regarding your problem, it’s easy...
     

    XML ARTICLES

    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE
    - UI Design with Java and XML Toolkits
    - Displaying ADO Retrieved Data with XML Islan...
    - Widget Walkthrough
    - Introduction to Widgets
    - The Why and How of XML Data Islands
    - Creating an XUL App Installer
    - Overlays in XUL
    - Skinning Your Custom XUL Applications


     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway