Chapter 5. Form Reuse
In general, the Web would be a pretty useless place if it weren’t for HTML forms. Forms provide an interface for the client to submit information to the web server. The most common form interfaces include search engine interfaces, e-commerce interfaces, and data administration interfaces.
This chapter and the next focus primarily on data administration interface forms. Data administration interfaces are common in many data-driven web sites. For example, if you ran a web site that sold widgets, you’d have a pretty extensive database structure, comprised of many tables containing an assortment of relevant information. This site would also likely contain an extensive set of administration pages, where each administration page permitted administrators to update, insert, and delete records into the various database tables.
This chapter does not focus on creating HTML forms, or reading form variables through an ASP page—it’s assumed you are familiar with those topics. (If you are a little rusty, don’t worry; there’s a brief discussion on each of these topics early in the chapter.) What we will be focusing on heavily throughout this chapter and the next is the art of form reuse.
The Importance of Code Reuse
Code reuse has many advantages, the paramount one being that developers who practice code reuse become more efficient developers, writing less buggy code. Code reuse obviously saves time in the long run, since you don’t have to continuously reinvent the wheel. Code ...