PhpRiot
Download This Article
Download this article or the entire “Eight Weeks of Prototype” series with all listings and files.




More information
Browse Articles
Ajax (4), APC (1), CAPTCHA (1), CSS (3), Debugging (1), File Upload (1), Google (3), Google Maps (2), JavaScript (12), JSON (2), MVC (1), MySQL (7), onbeforeunload (1), OOP (1), PHP (28), PhpDoc (1), PostgreSQL (6), Prototype (11), Reflection (1), RFC 1867 (1), Robots (1), Scriptaculous (1), SEO (1), Sessions (1), SimpleXML (1), Smarty (5), SOAP (1), SPL (1), Templates (2), W3C (1), XHTML (1), Zend Framework (1), Zend_Search_Lucene (1)

PhpRiot Newsletter
Your Email Address:

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

Summary

In this article we have created a simple contacts manager, which allows you to create contacts using a HTML form. The contacts are submitted via Ajax to the server which then processes the form values and saves the new contact to the database. 

Additionally, the contacts manager retrieves a list of existing contacts using Ajax and displays them on the page. When a new contact is added we use custom events so it can be added to the list of contacts. 

While the application isn't overly useful as it currently is (since it lacks several key features such as being able to edit and delete contacts), it does demonstrate the general thought process and structure of a larger application. 

This now concludes the Eight Weeks of Prototype series, which I hope has not only helped you learn the key aspects of the Prototype JavaScript framework, but also given you further ideas of how to develop JavaScript in general. 

In This Article


Tagged in , , ,