30.07.2013 Views

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

Visual Basic.NET How to Program (PDF)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 20 ASP .<strong>NET</strong>, Web Forms and Web Controls 945<br />

The server then sends one or more HTTP headers, which provide additional information<br />

about the data that will be sent. In this case, the server is sending an HTML text document,<br />

so the HTTP header for this example reads:<br />

Content-type: text/html<br />

The information provided in this header specifies the Multipurpose Internet Mail Extensions<br />

(MIME) type of the content that the server is transmitting <strong>to</strong> the browser. MIME is an<br />

Internet standard that specifies the way in which certain data must be formatted so that programs<br />

can interpret the data correctly. For example, the MIME type text/plain indicates<br />

that the sent information is text that can be displayed directly, without any<br />

interpretation of the content as HTML markup. Similarly, the MIME type image/gif indicates<br />

that the content is a GIF image. When the browser receives this MIME type, it attempts<br />

<strong>to</strong> display the image.<br />

The header or set of headers is followed by a blank line, which indicates <strong>to</strong> the client<br />

that the server is finished sending HTTP headers. The server then sends the contents of the<br />

requested HTML document (downloads.htm). The server terminates the connection<br />

when the transfer of the resource is complete. At this point, the client-side browser parses<br />

the HTML it has received and renders (or displays) the results.<br />

20.3 System Architecture<br />

Web-based applications are multi-tier applications, which sometimes are referred <strong>to</strong> as ntier<br />

applications. Multi-tier applications divide functionality in<strong>to</strong> separate tiers (i.e., logical<br />

groupings of functionality). Although tiers can be located on the same computer, the tiers<br />

of Web-based applications typically reside on separate computers. Figure 20.3 presents the<br />

basic structure of a three-tier Web-based application.<br />

The information tier (also called the data tier or the bot<strong>to</strong>m tier) maintains data pertaining<br />

<strong>to</strong> the application. This tier typically s<strong>to</strong>res data in a relational database management<br />

system (RDBMS). We discussed RDBMSs in Chapter 19. For example, a retail s<strong>to</strong>re<br />

might have a database for s<strong>to</strong>ring product information, such as descriptions, prices and<br />

quantities in s<strong>to</strong>ck. The same database also might contain cus<strong>to</strong>mer information, such as<br />

user names, billing addresses and credit-card numbers. This tier can be comprised of multiple<br />

databases, which <strong>to</strong>gether contain the data needed for our application.<br />

Fig. 20.3 Three-tier architecture.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!