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

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.

  • Week 1, Beginning with Prototype: This article covers fundamentals of Prototype, including how to select elements; how to create elements and insert them into the DOM; and how to remove elements from the DOM.
  • Week 2, How Prototype Extends Elements: In this article I will show you some of the many ways Prototype extends DOM elements. This will include how to read and write an element's content and attributes, as well as how to modify classes and styles of elements in real-time.
  • Week 3, Prototype Data Types: In this article we will look at the various data types available in Prototype, such as Enumerable, Array and Hash.
  • Week 4, Event Handling in Prototype: This article will teach you how to respond to events that occur while a user is viewing a web page. This includes handling specific mouse and keyboard events.
  • Week 5, Ajax in Prototype: In this article I will show you how to develop Ajax code using Prototype and PHP. In addition to showing you how to initiate Ajax requests using Prototype, you will learn how to handle requests in PHP and how to handle the response using JavaScript.
  • Week 6, Writing JavaScript Classes with Prototype: At this point in your Prototype education you have a solid understanding of how Prototype works. This article will show you how to bring together many of these ideas by building custom JavaScript classes. Doing so will help you to build powerful and scalable web applications that work in all modern web browsers.
  • Week 7, Other Prototype Functionality: In this article I will show you some of the other goodies available in Prototype that haven't yet been covered, as well as various Prototype tips and tricks.
  • Week 8, A Complete Prototype Example: To finish off this article series, we will implement a fully functioning example of using Prototype as to develop a simple web application. We will create a simple Ajax-powered shopping cart that stores a user’s products in a MySQL database.

All articles have been written using Prototype 1.6.0.2. Since many improvements were introduced to Prototype in version 1.6.0, most code in these articles is not backwards compatible with earlier versions of Prototype.


Eight Weeks of Prototype: Week 1, Beginning with Prototype

Prototype is a JavaScript framework used to help with development of cross-browser code that is easy to maintain and extend. In this first article of "Eight Weeks of Prototype" I will teach you the fundamentals of Prototype, which you will hopefully find useful for all JavaScript code you write.

Eight Weeks of Prototype: Week 2, How Prototype Extends Elements

When you select elements from the Document Object Model (DOM) using the functions Prototype provides, each returned element is extended with extra functionality. In this, the second article in "Eight Weeks of Prototype," I will show you exactly how Prototype extends these elements.

Eight Weeks of Prototype: Week 3, Prototype Data Types

In this, the third article in the "Eight Weeks of Prototype" series, I will teach you about the different data types that can be used in Prototype (on top of the existing JavaScript data types). We will firstly look at the basic string and number types, then look at enumerable types such as arrays and hashes.

Eight Weeks of Prototype: Week 4, Event Handling in Prototype

One of the most useful and important aspects of JavaScript developments is that of event handling. Prototype simplifies this process by providing a number of helpful methods for doing so. In this, the fourth article of "Eight of Weeks of Prototype", we will look at how Prototype helps with handling events.

Eight Weeks of Prototype: Week 5, Ajax with Prototype

In addition to all of the other useful classes Prototype gives to developers, it also provides a number of classes and methods for development of Ajax-enabled web applications. That is, it allows developers to easily perform HTTP sub-requests using XmlHttpRequest and to handle the response accordingly. In this article I will show you how Prototype makes Ajax development for developers by covering the functionality it provides. Additionally, I will show you how to easily transfer data between your JavaScript code and web server using JSON data.

Eight Weeks of Prototype: Week 6, Writing JavaScript Classes with Prototype

While JavaScript is by design an object-oriented language, it hasn't always been the easiest language to create nicely structured code that is easily maintainable. Prototype helps with this by providing a number of useful features for creating classes, such as the ability to extend classes and to easily group all functions together by using function binding. In this article I will show you how to create classes using JavaScript and Prototype.

Eight Weeks of Prototype: Week 7, Other Prototype Functionality

So far in Eight Weeks of Prototype I have covered the most important aspects of developing robust JavaScript using Prototype; however I haven't covered every available feature. In this article I will briefly discuss other aspects of development with Prototype, that while aren't necessarily core knowledge are still useful.

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

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.
Download This Series
Download all articles in this series in PDF format with all listings and files.

Price: $12.00 AUD
(Approx. $12.00 USD)

More information