The other day a friend called me with some problems he was having in creating an ASP script. This friend, who is relatively new to ASP but has been writing Visual Basic applications for several years, was in the midst of building a large, data-driven web site. During our conversation, he frustratedly commented that there seemed to be a lot of monotony involved in creating ASP pages.
After I asked him to elaborate, he explained there were several pages that did relatively similar things for his site: one set of ASP pages served as an administration tool for the database driving his site; another set of ASP pages allowed users to enter information into the database. Externally, these pages looked and acted differently, but their core functionality—accessing a database table and adding, editing, and removing entries—was identical. Despite these similarities, my friend was finding that he created separate ASP pages for each task, even if the tasks were related.
This friend is not alone. While the popularity and use of Active Server Pages has grown radically over the past couple of years, the quality of the code has not. As a consultant, author, and editor and founder of http://4GuysFromRolla.com—one of the largest online Active Server Pages resource sites—I’ve created thousands of ASP pages over the past three years. I’ve also worked in several teams designing large web sites using Active Server Pages and have reviewed other developers’ scripts.
When developing ASP pages, I find myself (and other developers) continually reinventing the wheel. Take a moment to think about how many database administration pages you have created. About how many ASP scripts have you written to perform server-side form validation? Why is it that we put so much time into design when developing a Visual Basic or Visual C++ application but so little time when developing ASP pages?
Simply put, this book looks at why and how Active Server Page design is lacking and examines the steps that can be taken to improve this design process. It is an important topic that has received very little attention in the past.
This book is intended for intermediate to advanced Active Server Pages developers who have solid ASP skills and are interested in learning techniques for creating reusable and robust ASP applications. Since this book focuses on writing maintainable, reusable code, if you work on large-scale ASP applications, especially with teams of ASP developers, you will find this book especially helpful.
This book is also for those who, like my friend, have found creating ASP pages to be monotonous. By spending time carefully developing Active Server Pages before writing the actual code, you will soon find yourself producing reusable, cleaner, and less error-prone code.
Finally, this book is also intended for all the ASP pros out there — those who are passionate about developing Active Server Pages, those who enjoy learning new ways to create ASP pages, and those who pride themselves on their ASP skills.