PhpRiot
Become Zend Certified

Prepare for the ZCE exam using our quizzes (web or iPad/iPhone). More info...


When you're ready get 7.5% off your exam voucher using voucher CJQNOV23 at the Zend Store

Eight Weeks of Prototype: Week 8, A Complete Prototype Example

This article is part of the series “Eight Weeks of Prototype”. Eight Weeks of Prototype is a series of articles covering the most important aspects of JavaScript development with the Prototype framework. Prototype is a JavaScript framework used to help developers easily create powerful web applications that work across all modern web browsers.. Read more about Eight Weeks of Prototype...

Introduction

So far in this series, "Eight Weeks of Prototype," I have shown you some of the extensive features the Prototype JavaScript framework provides. In this, the final article of the series, I will bring many of these features together into a simple example.

The example I show you will be an extremely simplified contact manager (address book, whatever you like to call it), in which you can view all contacts and add new contacts.

The example includes element selecting, event handling (including custom events), JavaScript classes and Ajax. Additionally, hopefully the example will serve to show you how JavaScript files can be structured and accessed in a scalable web application.

In order to use this code yourself you will need access to a web server with PHP 5 and MySQL. Note, however, that the important concepts in this article relate to the JavaScript code, so adapting the PHP code to instead use your preferred server configuration is not a problem.

In This Article