| << 16.0.0- Building Script Components for ASP | Chapter16 | 16.1.1- What is a Component? >> |
A Brief Introduction to Components
As you progress to building bigger and bigger web applications, you'll soon reach a point where your applications are sufficiently complex that it's not possible to solve the whole problem using one huge block of code. Instead, you need to consider a different approach:
- First, consider the best way of breaking your complex problem into smaller, more manageable chunks
- Second, solve each chunk by writing a piece of manageable 'standalone' code
- Third, bring together the solutions to each of those chunks to create an overall solution to your problem
In fact, we've already started to do this. If you've stepped through Chapter 15, then you'll know that the Wrox Classifieds application that we built there is divided into some 14 ASP pages that each performs some small part of the overall application. We've got pages that handle the registration, login, browsing, bidding and purchasing tasks that the user must accomplish when using the application.
In this book we have also had occasion to use procedures and functions. Recall that each function and procedure is just a block of code that is self-contained, and whose code is written in one place only. Once we've written the code once, we can call the function or procedure as many times as we need within our main code. And later, if you find that there's a bug in the function, you don't need to go through your entire application changing bits of code – instead, you just need to fix the bug in the one place.
| << 16.0.0- Building Script Components for ASP | Chapter16 | 16.1.1- What is a Component? >> |

RSS
