Eight Weeks of Prototype: Week 8, A Complete Prototype Example
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.
- Download a PDF version of this article
- Put your PHP knowledge to the test with our online and iPad/iPhone quizzes
- View or post comments for this article
Read related articles:
- Eight Weeks of Prototype: Week 1, Beginning with Prototype
- Eight Weeks of Prototype: Week 2, How Prototype Extends Elements
- Eight Weeks of Prototype: Week 3, Prototype Data Types
- Eight Weeks of Prototype: Week 4, Event Handling in Prototype
- Eight Weeks of Prototype: Week 5, Ajax with Prototype
- Eight Weeks of Prototype: Week 7, Other Prototype Functionality