Part 2. Plugins and functions
The most common third-party extension is a plugin that operates on a collection of elements selected from the document. This part of the book looks at how to implement such extensions using best practice techniques.
Before launching into the plugin itself, chapter 4 discusses a number of best practice principles that you should apply to your own development efforts. These guidelines will help to ensure you produce a robust and useful plugin.
Chapter 5 goes through the process of developing a collection plugin—one that operates on a collection of elements on the page. The use of a plugin framework helps apply the principles described in the previous chapter, while allowing you to concentrate on the actual functionality of your plugin.
A function plugin doesn’t work with selected elements, but provides additional functionality for the page as a whole in a consistent manner. Chapter 6 examines two examples of this sort of extension to help deal with localization issues and with cookies for your pages.
To ensure the widest audience for your plugin you should test it, package it for distribution, document its abilities, and provide a showcase of what it can do. Chapter 7 covers all of these aspects of the development process.